Hacker News new | ask | show | jobs
by msephton 25 days ago
I've used jscpd, it does "non-exact code duplication" (regardless of what its readme says) which is why I asked how Slopo compares. I'm surprised you've not tried the competition!
1 comments

"Non-exact" may be interpreted in different ways, so let's look at the example report: https://github.com/rafal-qa/slopo/tree/main/doc/example-repo...

* cluster-01.md has the highest similarity, and jscpd probably will detect this too.

* cluster-10.md has the lowest similarity still above the threshold, and I don't think jscpd will detect this as clones. Because they are not clones, this is a false positive that needs to be discarded. But in other cases this kind of similar code may be worth acting on.

I didn't compare with jscpd because I don't consider it a competition. Embedding-based duplication detection works differently, gives different results and has its own trade-offs.