anchor.diff:        if (_unusedImports.isEmpty && _unusedShownNamesMap.isEmpty) {
           return;
         }
  -      // Prepare import directives for this element's library.
  -      LibraryElement library = element.library;
  -      List<ImportDirective> importsLibrary = _libraryMap[library];
  -      if (importsLibrary == null) {
  -        // element's library is not imported. Must be the current library.
  -        continue;
  -      }
  -      // If there is only one import directive for this library, then it must be
  -      // the directive that this element is imported with, remove it from the
  -      // unusedImports list.
  -      if (importsLibrary.length == 1) {
  -        ImportDirective usedImportDirective = importsLibrary[0];
  -        _unusedImports.remove(usedImportDirective);
  -        _removeFromUnusedShownNamesMap(element, usedImportDirective);
  -        continue;
  -      }
  -      // Otherwise, find import directives using namespaces.
  -      String name = element.displayName;
  -      for (ImportDirective importDirective in importsLibrary) {
  +      // Find import directives using namespaces.
  +      String name = element.name;
  +      for (ImportDirective importDirective in _allImports) {
           Namespace namespace = _computeNamespace(importDirective);
           if (namespace?.get(name) != null) {
             _unusedImports.remove(importDirective);
             _removeFromUnusedShownNamesMap(element, importDirective);
           }
         }
  -    }
  -  }
  -
  -  /**
  -   * Recursively add any exported library elements into the [libraryMap].
  -   */
  -  void _addAdditionalLibrariesForExports(LibraryElement library,
  -      ImportDirective importDirective, Set<LibraryElement> visitedLibraries) {
  -    if (library == null || !visitedLibraries.add(library)) {
  -      return;
  -    }
  -    List<ExportElement> exports = library.exports;
  -    int length = exports.length;
  -    for (int i = 0; i < length; i++) {
  -      ExportElement exportElt = exports[i];
  -      LibraryElement exportedLibrary = exportElt.exportedLibrary;
  -      _putIntoLibraryMap(exportedLibrary, importDirective);
  -      _addAdditionalLibrariesForExports(
  -          exportedLibrary, importDirective, visitedLibraries);
       }
     }
   
  
positive.code:   final List<ImportDirective> _duplicateImports = <ImportDirective>[];
  
    /**
     * This is a map between the set of [LibraryElement]s that the current library imports, and the
     * list of [ImportDirective]s that import each [LibraryElement]. In cases where the current
     * library imports a library with a single directive (such as `import lib1.dart;`), the library
     * element will map to a list of one [ImportDirective], which will then be removed from the
     * [unusedImports] list. In cases where the current library imports a library with multiple
     * directives (such as `import lib1.dart; import lib1.dart show C;`), the [LibraryElement] will
     * be mapped to a list of the import directives, and the namespace will need to be used to
     * compute the correct [ImportDirective] being used; see [_namespaceMap].
     */
    final HashMap<LibraryElement, List<ImportDirective>> _libraryMap =
        new HashMap<LibraryElement, List<ImportDirective>>();
  
    /**
     * In cases where there is more than one import directive per library element, this mapping is
     * used to determine which of the multiple import directives are used by generating a
     * [Namespace] for each of the imports to do lookups in the same way that they are done from
     * the [ElementResolver].
     */
    final HashMap<ImportDirective, Namespace> _namespaceMap =
        new HashMap<ImportDirective, Namespace>();
  
negative.code:       }
      }
      return namespace;
    }
  
    /**
  