get_duplication_metrics
Identify exact and structural code clones to measure code duplication. Reports ratio, groups, and largest blocks.
Instructions
Detect code duplication using two methods: exact clones (Type 1, line-based fingerprinting) and structural clones (Type 2, AST node-type sequences). Reports duplication ratio, clone groups, and largest clone blocks.
No prior indexing required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| min_lines | No | Minimum lines for clone (3-50, default: 6) | |
| top_n | No | Number of top results (1-100, default: 20) | |
| exclude_tests | No | Exclude test files (default: true) |