microsoft / cppwinrt
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
  • 15% duplication:
    • 17,062 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,566 duplicated lines
  • 322 duplicates
system15% (2,566 lines)
Duplication per Extension
vcxproj74% (1,214 lines)
h7% (816 lines)
vstemplate50% (149 lines)
vsixmanifest95% (126 lines)
filters38% (115 lines)
cpp5% (80 lines)
props31% (36 lines)
xaml51% (18 lines)
targets2% (12 lines)
Duplication per Component (primary)
vsix/ProjectTemplates67% (865 lines)
cppwinrt11% (562 lines)
strings5% (381 lines)
scratch84% (202 lines)
natvis12% (172 lines)
prebuild75% (155 lines)
vsix/ItemTemplates54% (78 lines)
vsix/Dev1784% (66 lines)
vsix/Dev1683% (60 lines)
fast_fwd1% (13 lines)
nuget2% (12 lines)
ROOT0% (0 lines)
fast_fwd/arm0% (0 lines)
fast_fwd/arm640% (0 lines)
fast_fwd/win320% (0 lines)
fast_fwd/x640% (0 lines)
vsix0% (0 lines)

Duplication Between Components (50+ lines)

G cppwinrt cppwinrt scratch scratch cppwinrt--scratch 198 prebuild prebuild cppwinrt--prebuild 178 vsix/ProjectTemplates vsix/ProjectTemplates cppwinrt--vsix/ProjectTemplates 119 natvis natvis cppwinrt--natvis 68 scratch--vsix/ProjectTemplates 119 prebuild--scratch 176 prebuild--vsix/ProjectTemplates 119 vsix/Dev16 vsix/Dev16 vsix/Dev17 vsix/Dev17 vsix/Dev16--vsix/Dev17 80 vsix/ItemTemplates vsix/ItemTemplates vsix/ItemTemplates--vsix/ProjectTemplates 54

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 322 duplicates...
Size#FoldersFilesLinesCode
79 x 2 vsix/ProjectTemplates/VC...nbsp;Universal/BlankApp
vsix/ProjectTemplates/VC... Universal/CoreApp
vcxproj
BlankApp.vcxproj
CoreApp.vcxproj
7:109 (63%)
6:108 (75%)
view
64 x 2 cppwinrt
prebuild
vcxproj
cppwinrt.vcxproj
prebuild.vcxproj
124:210 (22%)
40:126 (37%)
view
60 x 2 cppwinrt
scratch
vcxproj
cppwinrt.vcxproj
scratch.vcxproj
125:206 (21%)
42:123 (25%)
view
60 x 2 prebuild
scratch
vcxproj
prebuild.vcxproj
scratch.vcxproj
41:122 (35%)
42:123 (25%)
view
44 x 2 vsix/ProjectTemplates/VC...ktop/ConsoleApplication
vsix/ProjectTemplates/VC...ktop/WindowsApplication
vcxproj
ConsoleApplication.vcxproj
WindowsApplication.vcxproj
15:70 (48%)
15:70 (49%)
view
38 x 2 vsix/ProjectTemplates/VC...Universal/StaticLibrary
vsix/ProjectTemplates/VC...WindowsRuntimeComponent
vcxproj
StaticLibrary.vcxproj
WindowsRuntimeComponent.vcxproj
8:55 (35%)
7:54 (34%)
view
33 x 2 vsix/Dev17/Component
vsix/Dev17/Standalone
vsixmanifest
source.extension.vsixmanifest
source.extension.vsixmanifest
1:40 (97%)
1:40 (94%)
view
32 x 2 vsix/ProjectTemplates/VC...nbsp;Universal/BlankApp
vsix/ProjectTemplates/VC...Universal/StaticLibrary
vcxproj
BlankApp.vcxproj
StaticLibrary.vcxproj
13:54 (25%)
14:55 (29%)
view
32 x 2 vsix/ProjectTemplates/VC... Universal/CoreApp
vsix/ProjectTemplates/VC...Universal/StaticLibrary
vcxproj
CoreApp.vcxproj
StaticLibrary.vcxproj
12:53 (30%)
14:55 (29%)
view
32 x 2 vsix/ProjectTemplates/VC...nbsp;Universal/BlankApp
vsix/ProjectTemplates/VC...WindowsRuntimeComponent
vcxproj
BlankApp.vcxproj
WindowsRuntimeComponent.vcxproj
13:54 (25%)
13:54 (29%)
view
32 x 2 vsix/ProjectTemplates/VC... Universal/CoreApp
vsix/ProjectTemplates/VC...WindowsRuntimeComponent
vcxproj
CoreApp.vcxproj
WindowsRuntimeComponent.vcxproj
12:53 (30%)
13:54 (29%)
view
30 x 2 vsix/Dev16/Component
vsix/Dev16/Standalone
vsixmanifest
source.extension.vsixmanifest
source.extension.vsixmanifest
1:34 (96%)
1:34 (93%)
view
29 x 2 vsix/ProjectTemplates/VC...Universal/StaticLibrary
vsix/ProjectTemplates/VC...WindowsRuntimeComponent
vcxproj
StaticLibrary.vcxproj
WindowsRuntimeComponent.vcxproj
57:92 (26%)
56:91 (26%)
view
28 x 2 prebuild
scratch
vcxproj
prebuild.vcxproj
scratch.vcxproj
1:37 (16%)
1:37 (11%)
view
27 x 2 vsix/ProjectTemplates/VC...Universal/StaticLibrary
vsix/ProjectTemplates/VC...WindowsRuntimeComponent
vcxproj
StaticLibrary.vcxproj
WindowsRuntimeComponent.vcxproj
94:134 (25%)
93:133 (24%)
view
25 x 2 cppwinrt
prebuild
vcxproj
cppwinrt.vcxproj
prebuild.vcxproj
4:35 (8%)
3:34 (14%)
view
25 x 2 cppwinrt
scratch
vcxproj
cppwinrt.vcxproj
scratch.vcxproj
4:35 (8%)
3:34 (10%)
view
22 x 2 vsix/ProjectTemplates/VC...nbsp;Universal/BlankApp
vsix/ProjectTemplates/VC... Universal/CoreApp
vstemplate
cppwinrt_BlankApp.vstemplate
cppwinrt_CoreApp.vstemplate
29:55 (44%)
22:48 (52%)
view
20 x 2 strings
strings
base_com_ptr.h
base_windows.h
139:175 (11%)
196:232 (9%)
view
19 x 2 vsix/ProjectTemplates/VC...Universal/StaticLibrary
vsix/ProjectTemplates/VC...WindowsRuntimeComponent
filters
StaticLibrary.vcxproj.filters
WindowsRuntimeComponent.vcxproj.filters
1:26 (86%)
1:26 (79%)
view
Duplicated Units
The list of top 11 duplicated units.
See data for all 11 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 cppwinrt
cppwinrt
code_writers.h
code_writers.h
359:375 
377:393 
view
13 x 2 strings
strings
base_com_ptr.h
base_windows.h
158:171 
215:228 
view
10 x 2 strings
strings
base_coroutine_threadpool.h
base_coroutine_threadpool.h
421:431 
527:537 
view
8 x 3 strings
strings
strings
base_agile_ref.h
base_delegate.h
base_error.h
105:115 
136:146 
116:126 
view
7 x 2 strings
strings
base_array.h
base_array.h
79:87 
89:97 
view
7 x 2 strings
strings
base_coroutine_system.h
base_coroutine_system_winui.h
26:33 
26:33 
view
6 x 2 cppwinrt
cppwinrt
code_writers.h
code_writers.h
289:295 
297:303 
view
6 x 2 strings
strings
base_collections_base.h
base_collections_base.h
373:380 
580:587 
view
6 x 2 strings
strings
base_com_ptr.h
base_windows.h
221:227 
250:256 
view
6 x 2 strings
strings
base_coroutine_foundation.h
base_coroutine_foundation.h
719:725 
802:808 
view
6 x 2 strings
strings
base_events.h
base_events.h
184:190 
244:250 
view