class RepositoryLookupUncached implements RepositoryLookup {
    private static final Logger LOGGER = LoggerFactory.getLogger(RepositoryLookupUncached.class);

    @Override
    public Repository getRepository(final Path filePath, Set<String> repoParentDirs,
        Map<String, Repository> repositories, PathCanonicalizer canonicalizer) {<FILL_FUNCTION_BODY>}

    @Override
    public void clear() {
        // Do nothing
    }

    @Override
    public void repositoriesRemoved(Collection<Repository> removedRepos) {
        // Do nothings
    }
}

        Path path = filePath;

        while (path != null) {
            String nextPath = path.toString();
            for (String rootKey : repoParentDirs) {
                String rel;
                try {
                    rel = canonicalizer.resolve(path, path.getFileSystem().getPath(rootKey));
                } catch (IOException e) {
                    LOGGER.log(Level.WARNING, e, () ->
                        "Failed to get relative to canonical for " + nextPath);
                    return null;
                }
                Repository repo;
                if (rel.equals(nextPath)) {
                    repo = repositories.get(nextPath);
                } else {
                    String inRootPath = Paths.get(rootKey, rel).toString();
                    repo = repositories.get(inRootPath);
                }
                if (repo != null) {
                    return repo;
                }
            }

            path = path.getParent();
        }

        return null;
    
<no_super_class>