Hacker News new | ask | show | jobs
by mjschultz 5351 days ago
Does anyone know if there are tools out there that look at a code base and find "similar" snippets of code?

I would expect such a tool to parse the language into AST form and find branches that are the same except some identifiers and a few other details. It is probably intractable in general, but I think it is feasible for most code bases.