microsoft / NCM-Driver-for-Windows
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
  • 23% duplication:
    • 4,982 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,171 duplicated lines
  • 183 duplicates
system23% (1,171 lines)
Duplication per Extension
vcxproj76% (597 lines)
h23% (373 lines)
cpp7% (201 lines)
Duplication per Component (primary)
adapter24% (215 lines)
projects/function74% (161 lines)
projects/adapter82% (153 lines)
projects/common85% (153 lines)
projects/host64% (130 lines)
function11% (120 lines)
host12% (110 lines)
inc8% (68 lines)
common11% (61 lines)

Duplication Between Components (50+ lines)

G projects/adapter projects/adapter projects/common projects/common projects/adapter--projects/common 306 projects/function projects/function projects/adapter--projects/function 66 projects/host projects/host projects/adapter--projects/host 66 projects/common--projects/host 66 projects/common--projects/function 66 projects/function--projects/host 262 function function host host function--host 166

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 183 duplicates...
Size#FoldersFilesLinesCode
74 x 2 projects/function
projects/host
vcxproj
function.vcxproj
host.vcxproj
45:129 (34%)
45:129 (36%)
view
54 x 2 projects/adapter
projects/common
vcxproj
adapter.vcxproj
common.vcxproj
162:231 (29%)
156:225 (30%)
view
46 x 2 projects/adapter
projects/common
vcxproj
adapter.vcxproj
common.vcxproj
86:138 (24%)
80:132 (25%)
view
35 x 2 adapter
adapter
rxqueue.h
txqueue.h
32:81 (24%)
34:83 (31%)
view
33 x 2 function
host
device.h
device.h
51:89 (13%)
19:57 (19%)
view
28 x 2 projects/adapter
projects/common
vcxproj
adapter.vcxproj
common.vcxproj
1:37 (15%)
1:37 (15%)
view
28 x 2 projects/function
projects/host
vcxproj
function.vcxproj
host.vcxproj
1:37 (12%)
1:37 (13%)
view
27 x 2 projects/common
projects/host
vcxproj
common.vcxproj
host.vcxproj
1:34 (15%)
1:34 (13%)
view
27 x 2 projects/adapter
projects/function
vcxproj
adapter.vcxproj
function.vcxproj
1:34 (14%)
1:34 (12%)
view
27 x 2 projects/common
projects/function
vcxproj
common.vcxproj
function.vcxproj
1:34 (15%)
1:34 (12%)
view
27 x 2 projects/adapter
projects/host
vcxproj
adapter.vcxproj
host.vcxproj
1:34 (14%)
1:34 (13%)
view
25 x 2 projects/adapter
projects/common
vcxproj
adapter.vcxproj
common.vcxproj
57:83 (13%)
52:78 (13%)
view
25 x 2 adapter
adapter
rxqueue.h
txqueue.h
130:158 (17%)
109:137 (22%)
view
11 x 2 adapter
adapter
rxqueue.cpp
txqueue.cpp
25:40 (6%)
26:41 (9%)
view
11 x 2 function
host
driver.cpp
driver.cpp
38:54 (12%)
38:54 (12%)
view
11 x 2 function
host
device.h
device.h
232:244 (4%)
69:81 (6%)
view
9 x 2 common
inc
ntb.cpp
ntb.h
450:458 (2%)
14:22 (20%)
view
9 x 2 adapter
adapter
rxqueue.cpp
txqueue.cpp
77:85 (5%)
79:87 (7%)
view
9 x 2 projects/function
projects/host
vcxproj
function.vcxproj
host.vcxproj
213:223 (4%)
201:211 (4%)
view
9 x 2 function
host
driver.cpp
driver.cpp
17:28 (10%)
17:28 (10%)
view