Overview & Technical Approach
Why traditional token matching fails and how AST semantic analysis solves duplicate detection.
The False-Positive Trap
Traditional duplicate code detectors rely on raw string matching or line-by-line tokenization. This creates massive false-positive noise by flagging boilerplate getters, setters, import blocks, and common interfaces as duplicated code.
1. AST Method Parsing
Powered by JavaParser, SDD parses Java codebases into an Abstract Syntax Tree (AST), isolating functional methods while ignoring class-level noise.
2. Weighted Levenshtein Scoring
Compares method structure and logic using custom weighted Levenshtein distance, ignoring minor whitespace drift and variable renaming.