microsoft / WinDbg-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
  • 10% duplication:
    • 13,762 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,485 duplicated lines
  • 117 duplicates
system10% (1,485 lines)
Duplication per Extension
js18% (444 lines)
vcxproj50% (432 lines)
cpp5% (339 lines)
h6% (228 lines)
filters22% (42 lines)
Duplication per Component (primary)
Exdi/exdigdbsrv5% (396 lines)
TTDQueries/app-sample7% (259 lines)
SyntheticTypes16% (250 lines)
DataModelHelloWorld/RawCOM45% (220 lines)
ImageInfo32% (194 lines)
DataModelHelloWorld/Cpp53% (166 lines)
CodeFlow0% (0 lines)
DataModelHelloWorld/JavaScript0% (0 lines)
FileSystem0% (0 lines)
Manifest0% (0 lines)

Duplication Between Components (50+ lines)

G DataModelHelloWorld/Cpp DataModelHelloWorld/Cpp DataModelHelloWorld/RawCOM DataModelHelloWorld/RawCOM DataModelHelloWorld/Cpp--DataModelHelloWorld/RawCOM 284 ImageInfo ImageInfo SyntheticTypes SyntheticTypes ImageInfo--SyntheticTypes 256 Exdi/exdigdbsrv Exdi/exdigdbsrv TTDQueries/app-sample TTDQueries/app-sample Exdi/exdigdbsrv--TTDQueries/app-sample 58

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 117 duplicates...
Size#FoldersFilesLinesCode
50 x 2 DataModelHelloWorld/Cpp/SimpleIntroClientLibrary
DataModelHelloWorld/RawCOM/SimpleIntroRawCOM
vcxproj
SimpleIntroClientLibrary.vcxproj
SimpleIntroRawCOM.vcxproj
26:90 (33%)
26:90 (35%)
view
32 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
327:381 (5%)
539:593 (2%)
view
28 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
47:96 (4%)
99:148 (1%)
view
27 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
157:213 (4%)
328:384 (1%)
view
24 x 2 ImageInfo
ImageInfo
ImageInfo.js
ImageInfo.js
255:292 (4%)
334:371 (4%)
view
24 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
255:292 (4%)
546:583 (1%)
view
24 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
263:307 (4%)
469:513 (1%)
view
19 x 2 SyntheticTypes
SyntheticTypes
SynTypes.js
SynTypes.js
1220:1250 (1%)
2673:2703 (1%)
view
17 x 2 SyntheticTypes
SyntheticTypes
SynTypes.js
SynTypes.js
469:498 (1%)
554:583 (1%)
view
17 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
342:371 (2%)
469:498 (1%)
view
17 x 2 DataModelHelloWorld/Cpp/SimpleIntroClientLibrary
DataModelHelloWorld/RawCOM/SimpleIntroRawCOM
vcxproj
SimpleIntroClientLibrary.vcxproj
SimpleIntroRawCOM.vcxproj
1:22 (11%)
1:22 (12%)
view
16 x 2 Exdi/exdigdbsrv/ExdiGdbSrv
Exdi/exdigdbsrv/GdbSrvControllerLib
vcxproj
ExdiGdbSrv.vcxproj
GdbSrvControllerLib.vcxproj
1:21 (6%)
1:21 (10%)
view
16 x 2 SyntheticTypes
SyntheticTypes
SynTypes.js
SynTypes.js
1303:1331 (1%)
2735:2763 (1%)
view
15 x 2 DataModelHelloWorld/Cpp/SimpleIntroClientLibrary
DataModelHelloWorld/RawCOM/SimpleIntroRawCOM
vcxproj
SimpleIntroClientLibrary.vcxproj
SimpleIntroRawCOM.vcxproj
134:150 (9%)
128:144 (10%)
view
15 x 2 Exdi/exdigdbsrv/GdbSrvControllerLib
Exdi/exdigdbsrv/GdbSrvControllerLib
AsynchronousGdbSrvController.cpp
AsynchronousGdbSrvController.cpp
335:354 (4%)
402:420 (4%)
view
14 x 2 Exdi/exdigdbsrv/ExdiGdbSrv
TTDQueries/app-sample
vcxproj
ExdiGdbSrv.vcxproj
DShowPlayer.vcxproj
3:21 (5%)
3:21 (8%)
view
14 x 2 Exdi/exdigdbsrv/GdbSrvControllerLib
TTDQueries/app-sample
vcxproj
GdbSrvControllerLib.vcxproj
DShowPlayer.vcxproj
3:21 (8%)
3:21 (8%)
view
14 x 2 Exdi/exdigdbsrv/ExdiGdbSrv
Exdi/exdigdbsrv/ExdiGdbSrv
BasicExdiBreakpoint.h
BasicExdiBreakpoint.h
73:95 (11%)
180:203 (11%)
view
14 x 2 ImageInfo
ImageInfo
ImageInfo.js
ImageInfo.js
433:446 (2%)
464:477 (2%)
view
14 x 2 Exdi/exdigdbsrv/GdbSrvControllerLib
Exdi/exdigdbsrv/GdbSrvControllerLib
AsynchronousGdbSrvController.cpp
AsynchronousGdbSrvController.cpp
187:204 (4%)
253:269 (4%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
34 x 2 Exdi/exdigdbsrv/GdbSrvControllerLib
Exdi/exdigdbsrv/GdbSrvControllerLib
TargetGdbServerHelpers.h
TargetGdbServerHelpers.h
37:72 
74:110 
view
20 x 2 TTDQueries/app-sample
TTDQueries/app-sample
video.cpp
video.cpp
51:79 
217:245 
view
18 x 2 TTDQueries/app-sample
TTDQueries/app-sample
video.cpp
video.cpp
81:102 
250:271 
view
14 x 2 Exdi/exdigdbsrv/GdbSrvControllerLib
Exdi/exdigdbsrv/GdbSrvControllerLib
TargetGdbServerHelpers.h
TargetGdbServerHelpers.h
117:142 
144:168 
view
10 x 2 Exdi/exdigdbsrv/ExdiGdbSrv
Exdi/exdigdbsrv/ExdiGdbSrv
BasicExdiBreakpoint.h
BasicExdiBreakpoint.h
79:91 
187:199 
view
10 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
108:118 
182:192 
view
10 x 2 ImageInfo
SyntheticTypes
ImageInfo.js
SynTypes.js
223:236 
409:422 
view
8 x 2 TTDQueries/app-sample
TTDQueries/app-sample
video.cpp
video.cpp
104:113 
273:282 
view
8 x 2 TTDQueries/app-sample
TTDQueries/app-sample
video.cpp
video.cpp
115:126 
284:295 
view