Count the occurrences
How many times does this same concept show up across the codebase?
DUPLICATION CHECK
Score whether a repeated concept has crossed the threshold that justifies extracting a shared function, component, or module.
Planning guidance only. Validate important decisions with customer evidence and your delivery team.
YOUR INPUTS
Complete every field. The result updates only when you choose Calculate.
How many times does this same concept show up across the codebase?
Identical logic is a much stronger extraction signal than loosely related code that merely looks similar.
Logic that changes often multiplies the cost of keeping duplicates in sync.
Continue learning: When to extract a shared abstraction
The classic "rule of three" exists because premature abstraction — extracting after just one repeat — often produces an overly generic shared function that's harder to change than the duplication it replaced.
Some variation is fine for a shared abstraction, but if you'd need many configuration flags or special cases, the abstraction may be less honest than just leaving the code duplicated.
Duplicated logic that changes often means every change has to be made in multiple places and can drift out of sync — that maintenance cost is what an abstraction actually saves you.
Occurrence count, similarity, and change frequency each contribute points on a simple weighted scale; the total is capped at 100.
| Feature | MVPHub | SonarQube | Code Climate |
|---|---|---|---|
| Instant weighted extraction score | Included | Limited | Limited |
| No install or repo scan required | Included | Not included | Not included |
| Judgment-based similarity/frequency inputs | Included | Not included | Not included |
| Instant result, no scan or wait required | Included | Not included | Not included |
SonarQube and Code Climate scan an entire repo for literal duplication automatically. This tool is for a specific pattern you've already noticed, scoring whether it's worth extracting based on judgment inputs a scanner can't capture.
Add this tool to your site with the canonical iframe below. It remains hosted and maintained by MVPHub.