microsoft / clr-samples
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
  • 67% duplication:
    • 1,740 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,167 duplicated lines
  • 34 duplicates
system67% (1,167 lines)
Duplication per Extension
cpp47% (466 lines)
h99% (350 lines)
vcxproj87% (216 lines)
asm78% (78 lines)
S85% (57 lines)
Duplication per Component (primary)
ReJITEnterLeaveHooks52% (522 lines)
ELTProfiler87% (510 lines)
ELTProfiler/asmhelpers/amd64/windows78% (78 lines)
ELTProfiler/asmhelpers/amd64/systemv85% (57 lines)

Duplication Between Components (50+ lines)

G ELTProfiler ELTProfiler ReJITEnterLeaveHooks ReJITEnterLeaveHooks ELTProfiler--ReJITEnterLeaveHooks 1012

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 34 duplicates...
Size#FoldersFilesLinesCode
137 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
CorProfiler.cpp
CorProfiler.cpp
227:567 (56%)
179:519 (63%)
view
121 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
CorProfiler.h
CorProfiler.h
10:148 (100%)
10:148 (100%)
view
51 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
24:85 (40%)
24:85 (42%)
view
43 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
CorProfiler.cpp
CorProfiler.cpp
118:222 (17%)
54:158 (19%)
view
38 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
CComPtr.h
CComPtr.h
6:81 (100%)
6:81 (100%)
view
26 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
ClassFactory.cpp
ClassFactory.cpp
7:63 (100%)
7:63 (100%)
view
17 x 2 ProfilingAPI/ELTProfiler/asmhelpers/amd64/windows
ProfilingAPI/ELTProfiler/asmhelpers/amd64/windows
asmhelpers.asm
asmhelpers.asm
53:71 (17%)
94:112 (17%)
view
17 x 2 ProfilingAPI/ELTProfiler/asmhelpers/amd64/windows
ProfilingAPI/ELTProfiler/asmhelpers/amd64/windows
asmhelpers.asm
asmhelpers.asm
12:30 (17%)
94:112 (17%)
view
17 x 2 ProfilingAPI/ELTProfiler/asmhelpers/amd64/windows
ProfilingAPI/ELTProfiler/asmhelpers/amd64/windows
asmhelpers.asm
asmhelpers.asm
12:30 (17%)
53:71 (17%)
view
17 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
1:22 (13%)
1:22 (14%)
view
14 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
103:117 (11%)
101:115 (11%)
view
14 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ELTProfiler
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
104:118 (11%)
122:136 (11%)
view
14 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
121:135 (11%)
118:132 (11%)
view
14 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
dllmain.cpp
dllmain.cpp
6:36 (100%)
6:36 (100%)
view
13 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
104:117 (10%)
119:132 (10%)
view
13 x 2 ProfilingAPI/ReJITEnterLeaveHooks
ProfilingAPI/ReJITEnterLeaveHooks
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
102:115 (10%)
119:132 (10%)
view
13 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
122:135 (10%)
102:115 (10%)
view
12 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
ClassFactory.h
ClassFactory.h
9:21 (100%)
9:21 (100%)
view
10 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ELTProfiler
vcxproj
ClrProfiler.vcxproj
ClrProfiler.vcxproj
76:86 (8%)
90:100 (8%)
view
10 x 2 ProfilingAPI/ELTProfiler/asmhelpers/amd64/systemv
ProfilingAPI/ELTProfiler/asmhelpers/amd64/systemv
S
asmhelpers.S
asmhelpers.S
19:28 (14%)
65:74 (14%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
CorProfiler.h
CorProfiler.h
111:130 
111:130 
view
13 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
ClassFactory.cpp
ClassFactory.cpp
44:59 
44:59 
view
10 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
ClassFactory.cpp
ClassFactory.cpp
15:26 
15:26 
view
8 x 4 ProfilingAPI/ELTProfiler
ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
ProfilingAPI/ReJITEnterLeaveHooks
ClassFactory.cpp
CorProfiler.h
ClassFactory.cpp
CorProfiler.h
33:42 
137:147 
33:42 
137:147 
view
8 x 2 ProfilingAPI/ELTProfiler
ProfilingAPI/ReJITEnterLeaveHooks
CorProfiler.cpp
CorProfiler.cpp
121:130 
57:66 
view