Skip to main content

Module detect

Module detect 

Source

Structs§

PathFilters
Path-based clone pair filters, applied when a clone is flushed.
PreparedSource
A file ready for detection: pre-hashed, pre-filtered.

Constants§

MIN_GAP_SIMILARITY
Lowest similarity a gap merge may produce. Below it the merged span would hold more unmatched than matched tokens (one very long inserted line, say), which is not a near-miss copy: the halves stay separate.

Functions§

detect
Detect duplicate code clones across files using a rolling-hash sliding window.
detect_prepared
Detect clones from pre-prepared sources grouped by format.
detect_with_options
Detect clones with extended options.
merge_gapped_clones
Gap-tolerant merging (issue #999, stage 1).