Tree-sitter based code similarity detection tool
Problem
Developers need to identify duplicated or structurally similar code blocks in large codebases, especially as AI‑generated code increases duplicate helper functions. Current tools typically match only line‑level text and lack AST‑aware similarity, causing performance issues or false positives.
Pain points
- Duplicate code detection in large codebases
- Need for AST‑level similarity to ignore identifiers and strings
- Performance limitations of existing vector‑search tools on large codebases
Questions to verify
- Is duplicate code a significant problem in your project?
- Do you prefer AST‑based similarity detection over plain text matching?
- Would you be willing to try and possibly adopt such a tool in your workflow?
Evidence
quote
This is what I wanted to help with duplicate code detection, which is now a real problem with agentic programming since the agent tends to duplicate helper functions a lot in bigger codebases. I ended up writing my own tool [1] that uses vector search, which works but can be unusably slow in large codebases. I will give this a shot.
quote
Thanks for posting this; I'm very interested in finding similar chunks of code in an AST-ish fashion, and using tree-sitter seems perfect.
quote
Nice approach. AST-level similarity seems much more useful than simple text matching.
Disclaimer: this card is distilled by AI from community discussions as “pain point evidence”. It is a starting point for need analysis and validation, not a “validated market need”. AI has analytical limits; please open the original discussion above to manually verify before key decisions.