Overview of detect-dupe
masterThe detect-dupe utility is a cross-file similar-function detector for .das files. It walks a directory tree, normalizes user functions into an alpha-renamed token stream (collapsing identifiers, types, and literals), and identifies two types of duplicates:
- Exact-clone clusters: Functions that hash to the same canonical text (pure structural duplicates).
- Fuzzy near-duplicates: Pairs scored using a MinHash signature and a Jaccard similarity estimate, subject to a length ratio threshold to prevent false positives from periodic boilerplate.
It is useful for finding test-suite boilerplate, near-clones that have drifted, or copy-pasted helpers.