anchor.diff:    /// The analysis root path that this CompletionMetrics class will be computed.
     String get rootPath => _rootPath;
   
  -  void compute() async {
  +  void compute({bool corpus = false}) async {
       print('Analyzing root: \"$_rootPath\"');
   
       if (!io.Directory(_rootPath).existsSync()) {
  
positive.code:     return suggestions;
    }
  
    /// Given some [ResolvedUnitResult] return the first error of high severity
    /// if such an error exists, null otherwise.
    static err.AnalysisError getFirstErrorOrNull(
  
negative.code:       return;
      }
  
      var roots = _computeRootPaths(_rootPath, corpus);
      for (var root in roots) {
        final collection = AnalysisContextCollection(
          includedPaths: [root],
          resourceProvider: PhysicalResourceProvider.INSTANCE,
        );
  
        for (var context in collection.contexts) {
          // Set the DeclarationsTracker, only call doWork to build up the available
          // suggestions if doComputeCompletionsFromAnalysisServer is true.
          var declarationsTracker = DeclarationsTracker(
              MemoryByteStore(), PhysicalResourceProvider.INSTANCE);
          declarationsTracker.addContext(context);
          if (doComputeCompletionsFromAnalysisServer) {
            while (declarationsTracker.hasWork) {
              declarationsTracker.doWork();
            }
          }
  
          // Loop through each file, resolve the file and call
          // forEachExpectedCompletion
          for (var filePath in context.contextRoot.analyzedFiles()) {
            if (AnalysisEngine.isDartFileName(filePath)) {
              _currentFilePath = filePath;
              try {
                _resolvedUnitResult =
                    await context.currentSession.getResolvedUnit(filePath);
  
                var error = getFirstErrorOrNull(resolvedUnitResult);
                if (error != null) {
                  print('File $filePath skipped due to errors such as:');
                  print('  ${error.toString()}');
                  print('');
                  continue;
                }
  
                // Use the ExpectedCompletionsVisitor to compute the set of expected
                // completions for this CompilationUnit.
                final visitor = ExpectedCompletionsVisitor();
                resolvedUnitResult.unit.accept(visitor);
  
                for (var expectedCompletion in visitor.expectedCompletions) {
                  // Call forEachExpectedCompletion, passing in the computed
                  // suggestions only if doComputeCompletionsFromAnalysisServer is
                  // true:
                  forEachExpectedCompletion(
                      expectedCompletion,
                      doComputeCompletionsFromAnalysisServer
                          ? await _computeCompletionSuggestions(
                              resolvedUnitResult,
                              expectedCompletion.offset,
                              declarationsTracker)
                          : null);
                }
              } catch (e) {
                print('Exception caught analyzing: $filePath');
                print(e.toString());
              }
            }
          }
        }
  