anchor.diff:  
       for (var context in collection.contexts) {
         for (var filePath in context.contextRoot.analyzedFiles()) {
  -        if (AnalysisEngine.isDartFileName(filePath) &&
  -            !filePath.endsWith("_test.dart")) {
  -          print("file name $filePath");
  +        if (AnalysisEngine.isDartFileName(filePath)) {
  +          print("  Analyzing file: $filePath");
             try {
               final result =
                   await context.currentSession.getResolvedUnit(filePath);
               final visitor = CompletionMetricVisitor();
   
               result.unit.accept(visitor);
  -            var offsets = visitor.offsets;
  -            assert(offsets.isNotEmpty);
  +            var entities = visitor.entities;
  +
  +            for (var entity in entities) {
  +              var completionContributor = DartCompletionManager();
  +              var completionRequestImpl = CompletionRequestImpl(
  +                result,
  +                entity.offset,
  +                CompletionPerformance(),
  +              );
  +              var suggestions = await completionContributor
  +                  .computeSuggestions(completionRequestImpl);
  +              suggestions.sort(_completionComparator);
  +
  +              var fraction =
  +                  _placementInSuggestionList(suggestions, entity.toString());
  +              if (fraction.y != 0) {
  +                includedCount++;
  +//                print(
  +//                    "  Bug - $filePath@${entity.offset} did not include ${entity.toString()}");
  +              } else {
  +                notIncludedCount++;
  +              }
  +            }
             } catch (e) {
               print('Exception caught analyzing: $filePath');
               print(e.toString());
  
positive.code: import 'package:analyzer/file_system/physical_file_system.dart';
  import 'package:analyzer/src/generated/engine.dart';
  
  main() {
    List<String> analysisRoots = [""];
    _computeCompletionMetrics(PhysicalResourceProvider.INSTANCE, analysisRoots);
  }
  
  Future _computeCompletionMetrics(
      ResourceProvider resourceProvider, List<String> analysisRoots) async {
    for (var root in analysisRoots) {
      print('Analyzing... $root');
      final collection = AnalysisContextCollection(
        includedPaths: [root],
        resourceProvider: resourceProvider,
  
negative.code: // BSD-style license that can be found in the LICENSE file.
  
  import 'dart:async';
  import 'dart:math';
  
  import 'package:analysis_server/src/protocol_server.dart';
  import 'package:analysis_server/src/services/completion/completion_core.dart';
  import 'package:analysis_server/src/services/completion/completion_performance.dart';
  import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
  import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
  import 'package:analyzer/dart/ast/ast.dart';
  import 'package:analyzer/dart/ast/syntactic_entity.dart';
  