anchor.diff:  import 'package:analyzer/src/generated/engine.dart';
   import 'package:args/args.dart';
   import 'package:meta/meta.dart';
  -import 'package:path/path.dart' as path;
   
   /// Compute metrics to determine whether they should be used to compute a
   /// relevance score for completion suggestions.
  
positive.code:   /// Compute the metrics for the file(s) in the [rootPath].
    /// If [corpus] is true, treat rootPath as a container of packages, creating
    /// a new context collection for each subdirectory.
    void compute(String rootPath,
        {@required bool corpus, @required bool verbose}) async {
      final collector = RelevanceDataCollector(data);
      var roots = _computeRootPaths(rootPath, corpus);
      for (var root in roots) {
        final collection = AnalysisContextCollection(
          includedPaths: [root],
          resourceProvider: PhysicalResourceProvider.INSTANCE,
        );
        for (var context in collection.contexts) {
          for (var filePath in context.contextRoot.analyzedFiles()) {
            if (AnalysisEngine.isDartFileName(filePath)) {
              try {
                ResolvedUnitResult resolvedUnitResult =
                    await context.currentSession.getResolvedUnit(filePath);
                //
                // Check for errors that cause the file to be skipped.
                //
                if (resolvedUnitResult == null) {
                  print('File $filePath skipped because resolved unit was null.');
                  if (verbose) {
                    print('');
                  }
                  continue;
                } else if (resolvedUnitResult.state != ResultState.VALID) {
                  print(
                      'File $filePath skipped because it could not be analyzed.');
                  if (verbose) {
                    print('');
                  }
                  continue;
                } else if (hasError(resolvedUnitResult)) {
                  if (verbose) {
                    print('File $filePath skipped due to errors:');
                    for (var error in resolvedUnitResult.errors
                        .where((e) => e.severity == Severity.error)) {
                      print('  ${error.toString()}');
                    }
                    print('');
                  } else {
                    print('File $filePath skipped due to analysis errors.');
                  }
                  continue;
                }
  
                collector.initializeFrom(resolvedUnitResult);
                resolvedUnitResult.unit.accept(collector);
              } catch (exception, stacktrace) {
                print('Exception caught analyzing: "$filePath"');
                print(exception);
                print(stacktrace);
              }
            }
          }
        }
      }
    }
  
  
negative.code: import 'package:analysis_server/src/services/completion/dart/feature_computer.dart';
  import 'package:analysis_server/src/utilities/flutter.dart';
  import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
  import 'package:analyzer/dart/analysis/context_root.dart';
  import 'package:analyzer/dart/analysis/results.dart';
  import 'package:analyzer/dart/ast/ast.dart';
  import 'package:analyzer/dart/ast/token.dart';
  