anchor.diff:     * it is possible to have an unreported unused import in situations where two imports use the same
      * prefix and at least one import directive is used.
      */
  -  HashMap<PrefixElement, List<ImportDirective>> _prefixElementMap;
  -
  -  /**
  -   * Create a new instance of the [ImportsVerifier].
  -   *
  -   * @param errorReporter the error reporter
  -   */
  -  ImportsVerifier(LibraryElement library) {
  -    this._currentLibrary = library;
  -    this._unusedImports = new List<ImportDirective>();
  -    this._duplicateImports = new List<ImportDirective>();
  -    this._libraryMap = new HashMap<LibraryElement, List<ImportDirective>>();
  -    this._namespaceMap = new HashMap<ImportDirective, Namespace>();
  -    this._prefixElementMap =
  -        new HashMap<PrefixElement, List<ImportDirective>>();
  -  }
  -
  -  void set inDefiningCompilationUnit(bool inDefiningCompilationUnit) {
  -    this._inDefiningCompilationUnit = inDefiningCompilationUnit;
  -  }
  -
  -  /**
  -   * Any time after the defining compilation unit has been visited by this visitor, this method can
  -   * be called to report an [HintCode.DUPLICATE_IMPORT] hint for each of the import directives
  -   * in the [duplicateImports] list.
  -   *
  -   * @param errorReporter the error reporter to report the set of [HintCode.DUPLICATE_IMPORT]
  -   *          hints to
  -   */
  -  void generateDuplicateImportHints(ErrorReporter errorReporter) {
  -    for (ImportDirective duplicateImport in _duplicateImports) {
  -      errorReporter.reportErrorForNode(
  -          HintCode.DUPLICATE_IMPORT, duplicateImport.uri);
  -    }
  -  }
  -
  -  /**
  -   * After all of the compilation units have been visited by this visitor, this method can be called
  -   * to report an [HintCode.UNUSED_IMPORT] hint for each of the import directives in the
  -   * [unusedImports] list.
  -   *
  -   * @param errorReporter the error reporter to report the set of [HintCode.UNUSED_IMPORT]
  -   *          hints to
  -   */
  -  void generateUnusedImportHints(ErrorReporter errorReporter) {
  -    for (ImportDirective unusedImport in _unusedImports) {
  -      // Check that the import isn't dart:core
  -      ImportElement importElement = unusedImport.element;
  -      if (importElement != null) {
  -        LibraryElement libraryElement = importElement.importedLibrary;
  -        if (libraryElement != null && libraryElement.isDartCore) {
  -          continue;
  +  final HashMap<PrefixElement, List<ImportDirective>> _prefixElementMap =
  +      new HashMap<PrefixElement, List<ImportDirective>>();
  +
  +  void addImports(CompilationUnit node) {
  +    for (Directive directive in node.directives) {
  +      if (directive is ImportDirective) {
  +        ImportDirective importDirective = directive;
  +        LibraryElement libraryElement = importDirective.uriElement;
  +        if (libraryElement != null) {
  +          _unusedImports.add(importDirective);
  +          //
  +          // Initialize prefixElementMap
  +          //
  +          if (importDirective.asKeyword != null) {
  +            SimpleIdentifier prefixIdentifier = importDirective.prefix;
  +            if (prefixIdentifier != null) {
  +              Element element = prefixIdentifier.staticElement;
  +              if (element is PrefixElement) {
  +                PrefixElement prefixElementKey = element;
  +                List<ImportDirective> list =
  +                    _prefixElementMap[prefixElementKey];
  +                if (list == null) {
  +                  list = new List<ImportDirective>();
  +                  _prefixElementMap[prefixElementKey] = list;
  +                }
  +                list.add(importDirective);
  +              }
  +              // TODO (jwren) Can the element ever not be a PrefixElement?
  +            }
  +          }
  +          //
  +          // Initialize libraryMap: libraryElement -> importDirective
  +          //
  +          _putIntoLibraryMap(libraryElement, importDirective);
  +          //
  +          // For this new addition to the libraryMap, also recursively add any
  +          // exports from the libraryElement.
  +          //
  +          _addAdditionalLibrariesForExports(
  +              libraryElement, importDirective, new List<LibraryElement>());
           }
         }
  -      errorReporter.reportErrorForNode(
  -          HintCode.UNUSED_IMPORT, unusedImport.uri);
  -    }
  -  }
  -
  -  @override
  -  Object visitCompilationUnit(CompilationUnit node) {
  -    if (_inDefiningCompilationUnit) {
  -      NodeList<Directive> directives = node.directives;
  -      for (Directive directive in directives) {
  -        if (directive is ImportDirective) {
  -          ImportDirective importDirective = directive;
  -          LibraryElement libraryElement = importDirective.uriElement;
  -          if (libraryElement != null) {
  -            _unusedImports.add(importDirective);
  -            //
  -            // Initialize prefixElementMap
  -            //
  -            if (importDirective.asKeyword != null) {
  -              SimpleIdentifier prefixIdentifier = importDirective.prefix;
  -              if (prefixIdentifier != null) {
  -                Element element = prefixIdentifier.staticElement;
  -                if (element is PrefixElement) {
  -                  PrefixElement prefixElementKey = element;
  -                  List<ImportDirective> list =
  -                      _prefixElementMap[prefixElementKey];
  -                  if (list == null) {
  -                    list = new List<ImportDirective>();
  -                    _prefixElementMap[prefixElementKey] = list;
  -                  }
  -                  list.add(importDirective);
  -                }
  -                // TODO (jwren) Can the element ever not be a PrefixElement?
  -              }
  -            }
  -            //
  -            // Initialize libraryMap: libraryElement -> importDirective
  -            //
  -            _putIntoLibraryMap(libraryElement, importDirective);
  -            //
  -            // For this new addition to the libraryMap, also recursively add any
  -            // exports from the libraryElement.
  -            //
  -            _addAdditionalLibrariesForExports(
  -                libraryElement, importDirective, new List<LibraryElement>());
  -          }
  -        }
  -      }
  -    }
  -    // If there are no imports in this library, don't visit the identifiers in
  -    // the library- there can be no unused imports.
  -    if (_unusedImports.isEmpty) {
  -      return null;
       }
       if (_unusedImports.length > 1) {
         // order the list of unusedImports to find duplicates in faster than
         // O(n^2) time
         List<ImportDirective> importDirectiveArray =
  -          new List.from(_unusedImports);
  +          new List<ImportDirective>.from(_unusedImports);
         importDirectiveArray.sort(ImportDirective.COMPARATOR);
         ImportDirective currentDirective = importDirectiveArray[0];
         for (int i = 1; i < importDirectiveArray.length; i++) {
  
positive.code: }
  
  /**
   * An [AstVisitor] that fills [UsedLocalElements].
   */
  class GatherUsedLocalElementsVisitor extends RecursiveAstVisitor {
  
negative.code:    */
    InheritanceManager _manager;
  
    GatherUsedLocalElementsVisitor _usedLocalElementsVisitor;
  
    HintGenerator(this._compilationUnits, this._context, this._errorListener) {
      _library = _compilationUnits[0].element.library;
      _usedImportedElementsVisitor =
          new GatherUsedImportedElementsVisitor(_library);
      _enableDart2JSHints = _context.analysisOptions.dart2jsHint;
      _manager = new InheritanceManager(_compilationUnits[0].element.library);
      _usedLocalElementsVisitor = new GatherUsedLocalElementsVisitor(_library);
    }
  
    void generateForLibrary() {
      PerformanceStatistics.hints.makeCurrentWhile(() {
        for (CompilationUnit unit in _compilationUnits) {
          CompilationUnitElement element = unit.element;
          if (element != null) {
            _generateForCompilationUnit(unit, element.source);
          }
        }
        CompilationUnit definingUnit = _compilationUnits[0];
        ErrorReporter definingUnitErrorReporter =
            new ErrorReporter(_errorListener, definingUnit.element.source);
        {
          ImportsVerifier importsVerifier = new ImportsVerifier();
          importsVerifier.addImports(definingUnit);
          importsVerifier
              .removeUsedElements(_usedImportedElementsVisitor.usedElements);
          importsVerifier.generateDuplicateImportHints(definingUnitErrorReporter);
          importsVerifier.generateUnusedImportHints(definingUnitErrorReporter);
        }
        _library.accept(new UnusedLocalElementsVerifier(
            _errorListener, _usedLocalElementsVisitor.usedElements));
      });
    }
  
    void _generateForCompilationUnit(CompilationUnit unit, Source source) {
      ErrorReporter errorReporter = new ErrorReporter(_errorListener, source);
      unit.accept(_usedImportedElementsVisitor);
      // dead code analysis
      unit.accept(new DeadCodeVerifier(errorReporter));
      unit.accept(_usedLocalElementsVisitor);
      // dart2js analysis
      if (_enableDart2JSHints) {
        unit.accept(new Dart2JSVerifier(errorReporter));
  