Re:Show HN: CLI tool for detecting non-exact code duplicatio...
by msephton on Thursday July 02, 2026 @09:02PM
(#48769390)
How does it compare to jscpd? https://github.com/kucherenko/jscpd
[ Parent
| on HN ]
Re:Show HN: CLI tool for detecting non-exact code duplicatio...
by rkochanowski on Friday July 03, 2026 @05:39AM
(#48772972)
It's the opposite.
jscpd is advertised as "Copy/paste detector", Slopo is advertised as "non-exact code duplication".
Slopo also detects copy/pasted code, but this is not the main goal and the report focuses more on similar code units.
Re:Show HN: CLI tool for detecting non-exact code duplicatio...
by msephton on Friday July 03, 2026 @04:27PM
(#48779580)
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!
Re:Show HN: CLI tool for detecting non-exact code duplicatio...
by rkochanowski on Saturday July 04, 2026 @05:45AM
(#48784149)
"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.