anchor.diff:      if (uri.hasAuthority != baseUri.hasAuthority) return uri;
       if (uri.hasAuthority) {
         if (uri.userInfo != baseUri.userInfo ||
  -      uri.host.toLowerCase() != baseUri.host.toLowerCase() ||
  -      uri.port != baseUri.port) {
  +          uri.host.toLowerCase() != baseUri.host.toLowerCase() ||
  +          uri.port != baseUri.port) {
           return uri;
         }
       }
   
  +    baseUri = baseUri.normalizePath();
       List<String> base = baseUri.pathSegments.toList();
  -    base = base.normalizePath();
       if (base.isNotEmpty) {
         base = new List<String>.from(base)..removeLast();
       }
  +    uri = uri.normalizePath();
       List<String> target = uri.pathSegments.toList();
  -    target = target.normalizePath();
       int index = 0;
       while (index < base.length && index < target.length) {
         if (base[index] != target[index]) {
  
positive.code:     return buffer.toString();
    }
  
    static Uri relativize(Uri uri,
                          Uri baseUri) {
      if (uri.hasQuery || uri.hasFragment) {
        uri = new Uri(scheme: uri.scheme,
        userInfo: uri.hasAuthority ? uri.userInfo : null,
        host: uri.hasAuthority ? uri.host : null,
        port: uri.hasAuthority ? uri.port : null,
        path: uri.path);
      }
      if (!baseUri.isAbsolute) {
        throw new ArgumentError("Base uri '$baseUri' must be absolute.");
  
negative.code: 
        var packageLocation = Uri.parse(source, eqIndex + 1, end);
        if (!packageLocation.path.endsWith('/')) {
          packageLocation =
              packageLocation.replace(path: packageLocation.path + "/");
        }
        packageLocation = baseLocation.resolveUri(packageLocation);
        if (result.containsKey(packageName)) {
          throw new FormatException(
              "Same package name occured twice.", source, start);
        }
        result[packageName] = packageLocation;
      }
  