microsoft / Windows-AppConsult-PWALab
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
  • 99% duplication:
    • 16,753 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 16,638 duplicated lines
  • 5,033 duplicates
system99% (16,638 lines)
Duplication per Extension
html99% (10,858 lines)
scss100% (2,082 lines)
css100% (1,962 lines)
js93% (1,145 lines)
cs93% (303 lines)
cshtml96% (288 lines)
Duplication per Component (primary)
Exercise3/01-Start/Contoso.Dashboard100% (2,689 lines)
Exercise2/02-End/Contoso.Dashboard99% (2,688 lines)
Exercise3/02-End/Contoso.Dashboard97% (2,678 lines)
Exercise1/02-End/Contoso.Dashboard99% (2,639 lines)
Exercise2/01-Start/Contoso.Dashboard99% (2,639 lines)
Exercise1/01-Start/Contoso.Dashboard100% (2,630 lines)
Exercise3/02-End/Contoso.PushServer96% (255 lines)
Exercise3/01-Start/Contoso.PushServer95% (254 lines)
Exercise3/01-Start/Contoso.WebAPI100% (83 lines)
Exercise3/02-End/Contoso.WebAPI87% (83 lines)

Duplication Between Components (50+ lines)

G Exercise2/02-End/Contoso.Dashboard Exercise2/02-End/Contoso.Dashboard Exercise3/01-Start/Contoso.Dashboard Exercise3/01-Start/Contoso.Dashboard Exercise2/02-End/Contoso.Dashboard--Exercise3/01-Start/Contoso.Dashboard 5376 Exercise3/02-End/Contoso.Dashboard Exercise3/02-End/Contoso.Dashboard Exercise2/02-End/Contoso.Dashboard--Exercise3/02-End/Contoso.Dashboard 5345 Exercise3/01-Start/Contoso.Dashboard--Exercise3/02-End/Contoso.Dashboard 5353 Exercise1/02-End/Contoso.Dashboard Exercise1/02-End/Contoso.Dashboard Exercise2/01-Start/Contoso.Dashboard Exercise2/01-Start/Contoso.Dashboard Exercise1/02-End/Contoso.Dashboard--Exercise2/01-Start/Contoso.Dashboard 5278 Exercise1/02-End/Contoso.Dashboard--Exercise3/01-Start/Contoso.Dashboard 5230 Exercise1/02-End/Contoso.Dashboard--Exercise2/02-End/Contoso.Dashboard 5230 Exercise1/02-End/Contoso.Dashboard--Exercise3/02-End/Contoso.Dashboard 5213 Exercise2/01-Start/Contoso.Dashboard--Exercise2/02-End/Contoso.Dashboard 5230 Exercise2/01-Start/Contoso.Dashboard--Exercise3/01-Start/Contoso.Dashboard 5230 Exercise2/01-Start/Contoso.Dashboard--Exercise3/02-End/Contoso.Dashboard 5213 Exercise1/01-Start/Contoso.Dashboard Exercise1/01-Start/Contoso.Dashboard Exercise1/01-Start/Contoso.Dashboard--Exercise2/01-Start/Contoso.Dashboard 5260 Exercise1/01-Start/Contoso.Dashboard--Exercise1/02-End/Contoso.Dashboard 5260 Exercise1/01-Start/Contoso.Dashboard--Exercise3/01-Start/Contoso.Dashboard 5214 Exercise1/01-Start/Contoso.Dashboard--Exercise2/02-End/Contoso.Dashboard 5214 Exercise1/01-Start/Contoso.Dashboard--Exercise3/02-End/Contoso.Dashboard 5199 Exercise3/01-Start/Contoso.PushServer Exercise3/01-Start/Contoso.PushServer Exercise3/02-End/Contoso.PushServer Exercise3/02-End/Contoso.PushServer Exercise3/01-Start/Contoso.PushServer--Exercise3/02-End/Contoso.PushServer 508 Exercise3/01-Start/Contoso.WebAPI Exercise3/01-Start/Contoso.WebAPI Exercise3/01-Start/Contoso.PushServer--Exercise3/01-Start/Contoso.WebAPI 56 Exercise3/02-End/Contoso.WebAPI Exercise3/02-End/Contoso.WebAPI Exercise3/01-Start/Contoso.PushServer--Exercise3/02-End/Contoso.WebAPI 56 Exercise3/02-End/Contoso.PushServer--Exercise3/02-End/Contoso.WebAPI 58 Exercise3/01-Start/Contoso.WebAPI--Exercise3/02-End/Contoso.WebAPI 166 Exercise3/01-Start/Contoso.WebAPI--Exercise3/02-End/Contoso.PushServer 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 5,033 duplicates...
Size#FoldersFilesLinesCode
584 x 2 Lab/Exercise3/01-Start/Contoso.Dashboard
Lab/Exercise3/02-End/Contoso.Dashboard
index.html
index.html
1:774 (100%)
1:774 (100%)
view
584 x 2 Lab/Exercise2/02-End/Contoso.Dashboard
Lab/Exercise3/01-Start/Contoso.Dashboard
index.html
index.html
1:774 (100%)
1:774 (100%)
view
584 x 2 Lab/Exercise2/02-End/Contoso.Dashboard
Lab/Exercise3/02-End/Contoso.Dashboard
index.html
index.html
1:774 (100%)
1:774 (100%)
view
584 x 2 Lab/Exercise1/02-End/Contoso.Dashboard
Lab/Exercise2/01-Start/Contoso.Dashboard
index.html
index.html
1:775 (100%)
1:775 (100%)
view
581 x 2 Lab/Exercise1/02-End/Contoso.Dashboard
Lab/Exercise3/02-End/Contoso.Dashboard
index.html
index.html
1:769 (99%)
1:769 (99%)
view
581 x 2 Lab/Exercise1/02-End/Contoso.Dashboard
Lab/Exercise3/01-Start/Contoso.Dashboard
index.html
index.html
1:769 (99%)
1:769 (99%)
view
581 x 2 Lab/Exercise2/01-Start/Contoso.Dashboard
Lab/Exercise2/02-End/Contoso.Dashboard
index.html
index.html
1:769 (99%)
1:769 (99%)
view
581 x 2 Lab/Exercise1/02-End/Contoso.Dashboard
Lab/Exercise2/02-End/Contoso.Dashboard
index.html
index.html
1:769 (99%)
1:769 (99%)
view
581 x 2 Lab/Exercise2/01-Start/Contoso.Dashboard
Lab/Exercise3/02-End/Contoso.Dashboard
index.html
index.html
1:769 (99%)
1:769 (99%)
view
581 x 2 Lab/Exercise2/01-Start/Contoso.Dashboard
Lab/Exercise3/01-Start/Contoso.Dashboard
index.html
index.html
1:769 (99%)
1:769 (99%)
view
574 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise2/01-Start/Contoso.Dashboard
index.html
index.html
14:773 (98%)
14:773 (98%)
view
574 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise1/02-End/Contoso.Dashboard
index.html
index.html
14:773 (98%)
14:773 (98%)
view
572 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise3/01-Start/Contoso.Dashboard
index.html
index.html
14:769 (98%)
14:769 (97%)
view
572 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise2/02-End/Contoso.Dashboard
index.html
index.html
14:769 (98%)
14:769 (97%)
view
572 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise3/02-End/Contoso.Dashboard
index.html
index.html
14:769 (98%)
14:769 (97%)
view
534 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise2/01-Start/Contoso.Dashboard
tables.html
tables.html
1:694 (100%)
1:694 (100%)
view
534 x 2 Lab/Exercise2/02-End/Contoso.Dashboard
Lab/Exercise3/01-Start/Contoso.Dashboard
tables.html
tables.html
1:694 (100%)
1:694 (100%)
view
534 x 2 Lab/Exercise2/01-Start/Contoso.Dashboard
Lab/Exercise3/01-Start/Contoso.Dashboard
tables.html
tables.html
1:694 (100%)
1:694 (100%)
view
534 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise2/02-End/Contoso.Dashboard
tables.html
tables.html
1:694 (100%)
1:694 (100%)
view
534 x 2 Lab/Exercise1/01-Start/Contoso.Dashboard
Lab/Exercise3/01-Start/Contoso.Dashboard
tables.html
tables.html
1:694 (100%)
1:694 (100%)
view
Duplicated Units
The list of top 13 duplicated units.
See data for all 13 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 Lab/Exercise3/01-Start/Contoso.WebAPI/Controllers
Lab/Exercise3/02-End/Contoso.WebAPI/Controllers
PushController.cs
PushController.cs
35:51 
35:51 
view
13 x 2 Lab/Exercise3/01-Start/Contoso.PushServer
Lab/Exercise3/02-End/Contoso.PushServer
Startup.cs
Startup.cs
38:53 
38:53 
view
13 x 2 Lab/Exercise3/01-Start/Contoso.WebAPI
Lab/Exercise3/02-End/Contoso.WebAPI
Startup.cs
Startup.cs
27:41 
27:41 
view
63 x 3 Lab/Exercise1/01-Start/Contoso.Dashboard/js
Lab/Exercise1/02-End/Contoso.Dashboard/js
Lab/Exercise2/01-Start/Contoso.Dashboard/js
sb-admin.js
sb-admin.js
sb-admin.js
1:85 
1:85 
1:85 
view
11 x 2 Lab/Exercise2/02-End/Contoso.Dashboard/js
Lab/Exercise2/02-End/Contoso.Dashboard/js
sb-admin.js
sb-admin.js
6:19 
21:34 
view
79 x 2 Lab/Exercise3/01-Start/Contoso.Dashboard/js
Lab/Exercise3/02-End/Contoso.Dashboard/js
sb-admin.js
sb-admin.js
1:105 
1:105 
view
9 x 3 Lab/Exercise3/01-Start/Contoso.Dashboard/js
Lab/Exercise3/01-Start/Contoso.Dashboard/js
Lab/Exercise3/02-End/Contoso.Dashboard/js
sb-admin.js
sb-admin.js
sb-admin.js
6:17 
19:30 
6:17 
view
8 x 2 Lab/Exercise3/01-Start/Contoso.PushServer
Lab/Exercise3/02-End/Contoso.PushServer
Startup.cs
Startup.cs
24:35 
24:35 
view
8 x 2 Lab/Exercise3/01-Start/Contoso.WebAPI
Lab/Exercise3/02-End/Contoso.WebAPI
Startup.cs
Startup.cs
44:53 
44:53 
view
7 x 6 Lab/Exercise1/01-Start/Contoso.Dashboard/js
Lab/Exercise1/02-End/Contoso.Dashboard/js
Lab/Exercise2/01-Start/Contoso.Dashboard/js
Lab/Exercise2/02-End/Contoso.Dashboard/js
Lab/Exercise3/01-Start/Contoso.Dashboard/js
Lab/Exercise3/02-End/Contoso.Dashboard/js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
57:64 
57:64 
57:64 
85:92 
77:84 
77:84 
view
7 x 6 Lab/Exercise1/01-Start/Contoso.Dashboard/js
Lab/Exercise1/02-End/Contoso.Dashboard/js
Lab/Exercise2/01-Start/Contoso.Dashboard/js
Lab/Exercise2/02-End/Contoso.Dashboard/js
Lab/Exercise3/01-Start/Contoso.Dashboard/js
Lab/Exercise3/02-End/Contoso.Dashboard/js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
67:74 
67:74 
67:74 
95:102 
87:94 
87:94 
view
6 x 6 Lab/Exercise1/01-Start/Contoso.Dashboard/js
Lab/Exercise1/02-End/Contoso.Dashboard/js
Lab/Exercise2/01-Start/Contoso.Dashboard/js
Lab/Exercise2/02-End/Contoso.Dashboard/js
Lab/Exercise3/01-Start/Contoso.Dashboard/js
Lab/Exercise3/02-End/Contoso.Dashboard/js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
sb-admin.js
77:83 
77:83 
77:83 
105:111 
97:103 
97:103 
view
6 x 2 Lab/Exercise3/01-Start/Contoso.PushServer/Pages
Lab/Exercise3/02-End/Contoso.PushServer/Pages
Index.cshtml.cs
Index.cshtml.cs
24:30 
24:30 
view