Developer reports
CPD duplicate-line union
Count each reported duplicated source line once per exact file path.
Your inputs
Start with an exampleYour result
Example resultAa — A small example of your colors.
How it works
Use each occurrence’s explicit endline, or the group line count when absent. Merge overlapping and adjacent inclusive ranges within each file.
Ranges 1–4 and 3–6 cover six lines. The sample has the equivalent overlap in two files, totaling twelve covered lines.
Limits
This reads a CPD report; it does not detect clones or compute a project duplication percentage. Paths are compared literally and source files are not opened.