anchor.diff:        resourceProvider: PhysicalResourceProvider.INSTANCE,
       );
       final collector = CodeShapeDataCollector(data);
  -
       for (var context in collection.contexts) {
  -      for (var filePath in context.contextRoot.analyzedFiles()) {
  -        if (AnalysisEngine.isDartFileName(filePath)) {
  -          try {
  -            var resolvedUnitResult =
  -                await context.currentSession.getResolvedUnit(filePath);
  -            //
  -            // Check for errors that cause the file to be skipped.
  -            //
  -            if (resolvedUnitResult.state != ResultState.VALID) {
  -              print('File $filePath skipped because it could not be analyzed.');
  -              print('');
  -              continue;
  -            } else if (hasError(resolvedUnitResult)) {
  -              print('File $filePath skipped due to errors:');
  -              for (var error in resolvedUnitResult.errors) {
  -                print('  ${error.toString()}');
  -              }
  -              print('');
  -              continue;
  -            }
  -
  -            resolvedUnitResult.unit.accept(collector);
  -          } catch (exception) {
  -            print('Exception caught analyzing: "$filePath"');
  -            print(exception.toString());
  -          }
  -        }
  -      }
  +      await _computeInContext(context.contextRoot, collector);
       }
     }
   
  
positive.code: import 'dart:io' as io;
  
  import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
  import 'package:analyzer/dart/analysis/results.dart';
  import 'package:analyzer/dart/ast/ast.dart';
  import 'package:analyzer/dart/ast/token.dart';
  
negative.code: 
      // Write normal information.
      _writeChildData(sink);
    }
  
    /// Compute the metrics for the files in the context [root], creating a
    /// separate context collection to prevent accumulating memory. The metrics
    /// should be captured in the [collector]. Include additional details in the
    /// output if [verbose] is `true`.
    void _computeInContext(
        ContextRoot root, CodeShapeDataCollector collector) async {
      // Create a new collection to avoid consuming large quantities of memory.
      final collection = AnalysisContextCollection(
        includedPaths: root.includedPaths.toList(),
        excludedPaths: root.excludedPaths.toList(),
        resourceProvider: PhysicalResourceProvider.INSTANCE,
      );
      var context = collection.contexts[0];
      for (var filePath in context.contextRoot.analyzedFiles()) {
        if (AnalysisEngine.isDartFileName(filePath)) {
          try {
            var resolvedUnitResult =
                await context.currentSession.getResolvedUnit(filePath);
            //
            // Check for errors that cause the file to be skipped.
            //
            if (resolvedUnitResult.state != ResultState.VALID) {
              print('File $filePath skipped because it could not be analyzed.');
              print('');
              continue;
            } else if (hasError(resolvedUnitResult)) {
              print('File $filePath skipped due to errors:');
              for (var error in resolvedUnitResult.errors) {
                print('  ${error.toString()}');
              }
              print('');
              continue;
            }
  
            resolvedUnitResult.unit.accept(collector);
          } catch (exception) {
            print('Exception caught analyzing: "$filePath"');
            print(exception.toString());
          }
        }
      }
    }
  
    /// Convert the contents of a single [map] into the values for each row in the
  