detect_duplication
Find exact structural duplicate code blocks by comparing AST fingerprints, ignoring identifier names and literal values. Works on a single file or across a whole project.
Instructions
Detect duplicate code blocks by comparing AST structure fingerprints. Matches are exact structural duplicates, ignoring identifier and literal values, so renamed copies are found but near-misses with an extra statement are not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Path to file (relative to project root). Omit for project-wide analysis. | |
| minNodes | No | Minimum AST node count for a block to be considered (default: 20) | |
| minStatements | No | Minimum statements in a block (default: 3) |