public Set<String> findNearDuplicates(String text) {
        int[] signatures = computeMinHashSignatures(text);
        Iterator<Integer> duplicateIds = lsh.query(signatures);
        Set<String> keys = new HashSet<String>();
        while (duplicateIds.hasNext()) {
            int id = duplicateIds.next();
            keys.add(getUrlBy(id));
        }
        return keys;
    }
Builds a "index" of near-duplicate pages using locality-sensitive hashing.

@author aeciosantos
ache/src/main/java/achecrawler/minhash/DuplicatePageIndexer.java