anchor.diff:    }
   }
   
  -Future<Stream<List<int>>> downloadPackage(
  -    String packageName, Client client) async {
  +Future<Map> getPackageInfo(String packageName, Client client) async {
     var pkgUri = 'https://pub.dartlang.org/api/packages/$packageName';
     log.info('Downloading $pkgUri');
   
     var response = await client.read(pkgUri);
   
  -  var json = JSON.decode(response);
  +  return JSON.decode(response);
  +}
   
  -  var latest = json['latest'];
  -
  -  var version = latest['version'];
  -  log.info('Version $version');
  -
  -  var archiveUri = Uri.parse(latest['archive_url']);
  -
  +Future<Null> downloadAndExtract(
  +    String tempDir, Uri archiveUri, Client client) async {
     log.info('Downloading $archiveUri');
     assert(archiveUri.toString().endsWith('.tar.gz'));
   
  
positive.code:   try {
      var client = new IOClient();
  
      Stream stream;
      try {
        stream = await downloadPackage(packageName, client);
  
        log.info('Extracting to ${tempDir.path}');
        await extractTarGz(stream, tempDir.path);
        log.info('Extracted to ${tempDir.path}');
      } finally {
        client.close();
      }
  
negative.code:         uri: archiveUri);
    }
  
    log.info('Extracting to $tempDir');
    await extractTarGz(streamedResponse.stream, tempDir);
    log.info('Extracted to $tempDir');
  }
  
  Future<Map<String, List<AnalyzerOutput>>> analyze(String projectDir,
      {bool strong}) async {
    // find all dart files in 'lib' directory
    var dir = new Directory(projectDir).absolute;
    projectDir = dir.path;
  