Skip to main content

Module clones

Module clones 

Expand description

Clones analysis. Walks the working tree at HEAD, fingerprints every function in every Tier-1 file, groups by structural digest, emits one row per clone-family member.

This analysis is HEAD-only: clones are computed against the working tree the user has checked out. Historical clone tracking (when did this clone family appear?) is a v1.x follow-up.

Research basis: see docs/research-foundations.md entry “clones” (Koschke, Falke & Frenzel, WCRE 2006 — AST suffix-tree clone detection; Sajnani et al., ICSE 2016 — SourcererCC, the index-then-probe pattern CodeLore follows).

Structs§

ClonesRow
One row in the clones analysis output. Members of the same clone family share clone_group_id and fingerprint.

Functions§

run_clones
Run the clones analysis at HEAD. Walks opts.repo_path’s working tree, reads each Tier-1 file, fingerprints every function, groups, and returns one ClonesRow per clone-family member.