Expand description
Deep-dive helpers for the fallow dupes --trace inspector: a stable
content fingerprint that addresses a clone group across runs, a group-level
refactoring suggestion, and a best-effort “dominant identifier” name for the
extracted function.
These are pure functions over CloneInstance / CloneGroup so every
surface (human listing, --trace dup:<fp> lookup, the typed JSON wrappers,
and trace_clone) computes the same values without storing a field on the
core CloneGroup struct.
Structs§
- Clone
Fingerprint Key - Canonical identity for a clone group when assigning report-scoped handles.
- Clone
Fingerprint Set - Report-scoped clone fingerprint assignment.
Constants§
- FINGERPRINT_
PREFIX - Prefix marking a clone-group fingerprint addressable via
--trace.
Functions§
- clone_
fingerprint - Compute the legacy short content fingerprint for a clone group from its instances.
- dominant_
identifier - Best-effort name for the extracted function, derived from the most frequent non-generic identifier in the representative fragment.
- fingerprint_
for_ fragment - Compute the fingerprint directly from a representative source fragment.
- group_
refactoring_ suggestion - Build a per-group
ExtractFunctionrefactoring suggestion.