Skip to main content

Module deepdive

Module deepdive 

Source
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§

CloneFingerprintKey
Canonical identity for a clone group when assigning report-scoped handles.
CloneFingerprintSet
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 ExtractFunction refactoring suggestion.