@Override
    public boolean accept(String path) {
      if (path.endsWith(".class")) {
        String normalized = fixPath(path);
        String simple = getSimpleName(normalized);
        List<String> fullPaths = map.get(simple);
        if (fullPaths != null) {
          for (String fullPath : fullPaths) {
            if (normalized.endsWith(fullPath)) {
              return true;
            }
          }
        }
        return false;
      } else {
        return true;
      }
    }
A best effort conservative filter for when file path can <b>not</b> be trusted.
android/android_framework/dex-maker/src/main/java/com/android/dx/command/dexer/Main.java