microsoft / Windows-Machine-Learning
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:
    • 13,601 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,071 duplicated lines
  • 556 duplicates
system15% (2,071 lines)
Duplication per Extension
vcxproj74% (1,353 lines)
h13% (480 lines)
cpp3% (108 lines)
yml19% (42 lines)
filters19% (26 lines)
css8% (24 lines)
cs5% (20 lines)
tsx1% (18 lines)
Duplication per Component (primary)
Testing/WinMLRunnerTest52% (693 lines)
Tools/WinMLRunner67% (657 lines)
Tools/WinMLRunner/src8% (494 lines)
Tools/WinMLDashboard/src/cpp15% (123 lines)
ROOT19% (42 lines)
Tools/WinMLDashboard/src/view3% (36 lines)
Testing/SamplesTest/SamplesTest5% (20 lines)
Tools/WinMLDashboard/src/components2% (6 lines)
Testing/SamplesTest/SamplesTest/Properties0% (0 lines)
Tools/WinMLDashboard0% (0 lines)
Tools/WinMLDashboard/public0% (0 lines)
Tools/WinMLDashboard/scripts0% (0 lines)
Tools/WinMLDashboard/src0% (0 lines)
Tools/WinMLDashboard/src/datastore0% (0 lines)
Tools/WinMLDashboard/src/fonts0% (0 lines)
Tools/WinMLDashboard/src/native0% (0 lines)
Tools/WinMLDashboard/src/schema0% (0 lines)

Duplication Between Components (50+ lines)

G Tools/WinMLDashboard/src/cpp Tools/WinMLDashboard/src/cpp Tools/WinMLRunner Tools/WinMLRunner Tools/WinMLDashboard/src/cpp--Tools/WinMLRunner 264 Testing/WinMLRunnerTest Testing/WinMLRunnerTest Testing/WinMLRunnerTest--Tools/WinMLRunner 180

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 556 duplicates...
Size#FoldersFilesLinesCode
66 x 2 Tools/WinMLRunner
Tools/WinMLRunner
vcxproj
WinMLRunnerScenarios.vcxproj
WinMLRunnerStaticLib.vcxproj
55:139 (24%)
66:150 (22%)
view
33 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2306:2342 (1%)
2399:2435 (1%)
view
30 x 2 Tools/WinMLRunner
Tools/WinMLRunner
vcxproj
WinMLRunner.vcxproj
WinMLRunnerScenarios.vcxproj
1:39 (8%)
1:39 (10%)
view
30 x 2 Tools/WinMLRunner
Tools/WinMLRunner
vcxproj
WinMLRunner.vcxproj
WinMLRunnerScenarios.vcxproj
114:155 (8%)
105:146 (10%)
view
26 x 2 Tools/WinMLRunner
Tools/WinMLRunner
vcxproj
WinMLRunner.vcxproj
WinMLRunnerStaticLib.vcxproj
5:39 (7%)
5:39 (8%)
view
26 x 2 Tools/WinMLRunner
Tools/WinMLRunner
vcxproj
WinMLRunnerScenarios.vcxproj
WinMLRunnerStaticLib.vcxproj
5:39 (9%)
5:39 (8%)
view
25 x 2 Testing/WinMLRunnerTest
Tools/WinMLRunner
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerStaticLib.vcxproj
3:34 (3%)
5:36 (8%)
view
25 x 2 Testing/WinMLRunnerTest
Tools/WinMLRunner
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerScenarios.vcxproj
3:34 (3%)
5:36 (9%)
view
25 x 2 Testing/WinMLRunnerTest
Tools/WinMLRunner
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunner.vcxproj
3:34 (3%)
5:36 (7%)
view
24 x 2 Tools/WinMLRunner
Tools/WinMLRunner
vcxproj
WinMLRunner.vcxproj
WinMLRunnerStaticLib.vcxproj
114:148 (7%)
116:150 (8%)
view
21 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2284:2304 (<1%)
2378:2398 (<1%)
view
20 x 2 Testing/WinMLRunnerTest
Tools/WinMLRunner
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerScenarios.vcxproj
106:135 (2%)
110:139 (7%)
view
20 x 2 Testing/WinMLRunnerTest
Tools/WinMLRunner
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunner.vcxproj
106:135 (2%)
119:148 (5%)
view
20 x 2 Testing/WinMLRunnerTest
Tools/WinMLRunner
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerStaticLib.vcxproj
106:135 (2%)
121:150 (6%)
view
20 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2253:2272 (<1%)
2350:2369 (<1%)
view
19 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2932:2960 (<1%)
2999:3027 (<1%)
view
18 x 2 Testing/WinMLRunnerTest
Testing/WinMLRunnerTest
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerTest.vcxproj
413:432 (2%)
795:814 (2%)
view
17 x 2 Testing/WinMLRunnerTest
Testing/WinMLRunnerTest
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerTest.vcxproj
510:526 (2%)
719:735 (2%)
view
17 x 2 Testing/WinMLRunnerTest
Testing/WinMLRunnerTest
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerTest.vcxproj
394:410 (2%)
548:564 (2%)
view
17 x 2 Testing/WinMLRunnerTest
Testing/WinMLRunnerTest
vcxproj
WinMLRunnerTest.vcxproj
WinMLRunnerTest.vcxproj
643:659 (2%)
662:678 (2%)
view
Duplicated Units
The list of top 13 duplicated units.
See data for all 13 unit duplicates...
Size#FoldersFilesLinesCode
25 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2306:2331 
2399:2424 
view
8 x 2 Tools/WinMLDashboard/src/view/convert
Tools/WinMLDashboard/src/view/run
View.tsx
View.tsx
87:103 
115:131 
view
13 x 2 Testing/WinMLRunnerTest
Tools/WinMLRunner/src
Filehelper.cpp
Filehelper.cpp
9:24 
9:24 
view
12 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2932:2944 
2999:3011 
view
9 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
OutputHelper.cpp
OutputHelper.cpp
32:41 
43:52 
view
9 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2332:2341 
2425:2434 
view
7 x 3 Testing/SamplesTest/SamplesTest
Testing/SamplesTest/SamplesTest
Testing/SamplesTest/SamplesTest
MnistTest.cs
SqueezenetTest.cs
StyleTransferTest.cs
44:51 
36:43 
61:68 
view
7 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
1057:1064 
1431:1438 
view
6 x 2 Tools/WinMLDashboard/src/cpp/DebugRunner
Tools/WinMLRunner/src
Common.h
Common.h
41:47 
85:91 
view
6 x 2 Tools/WinMLDashboard/src/cpp/DebugRunner
Tools/WinMLRunner/src
Common.h
Common.h
56:62 
100:106 
view
6 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2946:2952 
2953:2959 
view
6 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
2967:2973 
3095:3101 
view
6 x 2 Tools/WinMLRunner/src
Tools/WinMLRunner/src
d3dx12.h
d3dx12.h
3074:3080 
3081:3087 
view