Expand description
Code duplication / clone detection module.
This module implements suffix array + LCP based clone detection for JavaScript/TypeScript source files. It supports multiple detection modes from strict (exact matches only) to semantic (structure-aware matching that ignores identifier names and literal values).
Modules§
- detect
- Suffix Array + LCP based clone detection engine.
- families
- Clone family grouping and refactoring suggestion generation.
- normalize
- tokenize
Structs§
- Clone
Family - A clone family: a set of clone groups that share the same file set.
- Clone
Group - A group of code clones – the same (or normalized-equivalent) code appearing in multiple places.
- Clone
Instance - A single instance of duplicated code at a specific location.
- Duplicates
Config - Configuration for code duplication detection.
- Duplication
Report - Overall duplication analysis report.
- Duplication
Stats - Aggregate duplication statistics.
- Refactoring
Suggestion - A refactoring suggestion for a clone family.
Enums§
- Detection
Mode - Detection mode controlling how aggressively tokens are normalized.
- Refactoring
Kind - The kind of refactoring suggested for a clone family.
Functions§
- find_
duplicates - Run duplication detection on the given files.
- find_
duplicates_ in_ project - Run duplication detection on a project directory using auto-discovered files.