Prevent NPEs in the fix processor

Change-Id: I2a5c12bf6f3aec4c8a504590f39b666c9934e4e4
Reviewed-on: https://dart-review.googlesource.com/68435
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 65931a3..fb2cd3e 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -289,6 +289,11 @@
     node = new NodeLocator2(errorOffset).searchWithin(unit);
     coveredNode =
         new NodeLocator2(errorOffset, errorEnd - 1).searchWithin(unit);
+    if (coveredNode == null) {
+      // TODO(brianwilkerson) Figure out why the coveredNode is sometimes null.
+      return fixes;
+    }
+
     // analyze ErrorCode
     ErrorCode errorCode = error.errorCode;
     if (errorCode == StaticWarningCode.UNDEFINED_CLASS_BOOLEAN) {
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index da87c3d..00c0fe1 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -7377,11 +7377,6 @@
 
   @failingTest
   @override
-  test_createConstructorSuperImplicit_private() =>
-      super.test_createConstructorSuperImplicit_private();
-
-  @failingTest
-  @override
   test_createConstructorSuperImplicit_typeArgument() =>
       super.test_createConstructorSuperImplicit_typeArgument();