class TreeWalkResolver {

    public String getFullPath(String packageName) throws IOException {
        List<Map.Entry<String, String>> tree = getCommitTree();
        String reversed = new StringBuilder(packageName).reverse().toString();
        int index = Collections.binarySearch(tree, new AbstractMap.SimpleEntry<>(reversed, packageName),
                (o1, o2) -> o1.getKey().startsWith(o2.getKey()) ? 0 : o1.getKey().compareTo(o2.getKey()));
        return index >= 0 ? tree.get(index).getValue() : null;
    }

    public  TreeWalkResolver(Repository repository, String commitId);

}