microsoft / Detours
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 18% duplication:
    • 8,568 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,543 duplicated lines
  • 549 duplicates
system18% (1,543 lines)
Duplication per Extension
cpp17% (1,233 lines)
vcxproj41% (216 lines)
h17% (94 lines)
Duplication per Component (primary)
src17% (1,327 lines)
vc23% (216 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 549 duplicates...
Size#FoldersFilesLinesCode
72 x 2 src
src
detours.cpp
detours.cpp
214:323 (4%)
439:548 (4%)
view
28 x 2 src
src
disasm.cpp
disasm.cpp
1012:1048 (1%)
1024:1060 (1%)
view
25 x 2 src
src
creatwth.cpp
creatwth.cpp
1396:1430 (2%)
1501:1535 (2%)
view
21 x 2 vc
vc
vcxproj
Detours.vcxproj
Detours.vcxproj
366:390 (4%)
394:418 (4%)
view
19 x 2 src
src
disasm.cpp
disasm.cpp
1012:1036 (<1%)
1036:1060 (<1%)
view
19 x 2 vc
vc
vcxproj
Detours.vcxproj
Detours.vcxproj
264:286 (3%)
290:312 (3%)
view
18 x 2 src
src
detours.cpp
detours.cpp
1253:1277 (1%)
1303:1327 (1%)
view
18 x 2 src
src
creatwth.cpp
creatwth.cpp
1549:1571 (1%)
1672:1694 (1%)
view
18 x 2 src
src
creatwth.cpp
creatwth.cpp
1610:1632 (1%)
1733:1755 (1%)
view
17 x 2 src
src
disasm.cpp
disasm.cpp
963:983 (<1%)
988:1008 (<1%)
view
16 x 2 src
src
disasm.cpp
disasm.cpp
963:981 (<1%)
1001:1019 (<1%)
view
16 x 2 src
src
disasm.cpp
disasm.cpp
988:1006 (<1%)
1001:1019 (<1%)
view
15 x 2 src
src
modules.cpp
modules.cpp
299:319 (2%)
687:707 (2%)
view
15 x 2 src
src
detours.cpp
detours.cpp
187:210 (1%)
400:423 (1%)
view
15 x 2 src
src
modules.cpp
modules.cpp
299:319 (2%)
372:392 (2%)
view
15 x 2 src
src
modules.cpp
modules.cpp
372:392 (2%)
687:707 (2%)
view
13 x 2 src
src
creatwth.cpp
creatwth.cpp
932:953 (1%)
989:1010 (1%)
view
12 x 2 src
src
creatwth.cpp
detours.h
1721:1732 (1%)
777:788 (2%)
view
12 x 2 src
src
modules.cpp
modules.cpp
379:394 (2%)
426:441 (2%)
view
12 x 2 src
src
detours.cpp
detours.cpp
826:849 (<1%)
1129:1154 (<1%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
54 x 2 src
src
detours.cpp
detours.cpp
258:315 
483:540 
view
27 x 2 src
src
detours.cpp
detours.cpp
229:256 
454:481 
view
9 x 2 src
src
detours.cpp
detours.cpp
835:846 
1138:1152 
view
6 x 2 src
src
detours.cpp
detours.cpp
133:139 
345:351 
view
6 x 2 src
src
detours.cpp
detours.cpp
149:155 
362:368 
view