microsoft / PartsUnlimited
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:
    • 9,220 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,189 duplicated lines
  • 55 duplicates
system23% (2,189 lines)
Duplication per Extension
cs30% (1,221 lines)
ps158% (707 lines)
scss8% (125 lines)
cshtml5% (104 lines)
psm14% (16 lines)
yaml20% (16 lines)
Duplication per Component (primary)
src/PartsUnlimited.Mobile67% (618 lines)
src/PartsUnlimited.Models47% (490 lines)
src/PartsUnlimitedWebsite6% (314 lines)
Labfiles/Devops200.4x-ConfigMgmtForContainerizedDelivery33% (301 lines)
Labfiles/AZ-400T05_Implementing_Application_Infrastructure28% (149 lines)
Labfiles/Devops200.2x-InfrastructureasCode89% (133 lines)
env35% (70 lines)
env/Scripts72% (70 lines)
scripts27% (16 lines)
src/PartsUnlimited.WebJobs.ProcessOrder18% (14 lines)
src/PartsUnlimited.WebJobs.UpdateProductInventory35% (14 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G Labfiles/AZ-400T05_Implementing_Application_Infrastructure Labfiles/AZ-400T05_Implementing_Application_Infrastructure Labfiles/Devops200.2x-InfrastructureasCode Labfiles/Devops200.2x-InfrastructureasCode Labfiles/AZ-400T05_Implementing_Application_Infrastructure--Labfiles/Devops200.2x-InfrastructureasCode 266 env env env/Scripts env/Scripts env--env/Scripts 140

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 55 duplicates...
Size#FoldersFilesLinesCode
309 x 2 src/PartsUnlimited.Mobil...rtsUnlimited/Properties
src/PartsUnlimited.Mobil...rtsUnlimited/Properties
Annotations.cs
Annotations1.cs
1:1038 (100%)
1:1038 (100%)
view
230 x 2 src/PartsUnlimited.Models/Migrations
src/PartsUnlimited.Models/Migrations
20151222030342_InitialMigration.Desig...
PartsUnlimitedContextModelSnapshot.cs
15:380 (98%)
15:380 (98%)
view
121 x 2 Labfiles/AZ-400T05_Imple...tion_Infrastructure/M02
Labfiles/Devops200.2x-InfrastructureasCode/Mod01
Provision-lab-textual-workflow-v1.ps1
Provision-lab-textual-workflow-v1.ps1
1:147 (100%)
1:147 (100%)
view
88 x 2 Labfiles/Devops200.4x-Co...abs/ARM/acs-swarm-linux
Labfiles/Devops200.4x-Co...ery/M03/Labs/ARM/SF-OMS
deploy.ps1
deploy.ps1
1:109 (95%)
1:109 (95%)
view
58 x 2 env
env/Scripts
Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
32:104 (49%)
25:97 (60%)
view
27 x 2 Labfiles/Devops200.4x-Co...abs/ARM/acs-swarm-linux
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
85:113 (29%)
93:121 (27%)
view
23 x 2 Labfiles/Devops200.4x-Co...ery/M03/Labs/ARM/SF-OMS
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
39:66 (25%)
44:71 (23%)
view
23 x 2 Labfiles/Devops200.4x-Co...abs/ARM/acs-swarm-linux
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
39:66 (25%)
44:71 (23%)
view
23 x 2 Labfiles/Devops200.4x-Co...ery/M03/Labs/ARM/SF-OMS
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
85:109 (25%)
93:117 (23%)
view
21 x 2 Labfiles/Devops200.4x-Co...ery/M03/Labs/ARM/SF-OMS
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
1:29 (22%)
1:29 (21%)
view
21 x 2 Labfiles/Devops200.4x-Co...abs/ARM/acs-swarm-linux
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
1:29 (22%)
1:29 (21%)
view
16 x 2 src/PartsUnlimitedWebsite/Areas/Admin/Controllers
src/PartsUnlimitedWebsite/Controllers
OrdersController.cs
OrdersController.cs
40:60 (55%)
73:93 (34%)
view
14 x 2 Labfiles/Devops200.4x-Co...ery/M03/Labs/ARM/SF-OMS
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
67:83 (15%)
75:91 (14%)
view
14 x 2 Labfiles/Devops200.4x-Co...abs/ARM/acs-swarm-linux
Labfiles/Devops200.4x-Co...ree_3node_linux_secured
deploy.ps1
deploy.ps1
67:83 (15%)
75:91 (14%)
view
14 x 2 src/PartsUnlimitedWebsite/Content
src/PartsUnlimitedWebsite/Content
Site.scss
Site.scss
460:473 (1%)
526:539 (1%)
view
14 x 2 src/PartsUnlimited.WebJobs.ProcessOrder
src/PartsUnlimited.WebJobs.UpdateProductInventory
Program.cs
Program.cs
1:30 (73%)
1:30 (77%)
view
13 x 2 src/PartsUnlimitedWebsite/Models
src/PartsUnlimitedWebsite/Models
AccountViewModels.cs
AccountViewModels.cs
75:89 (17%)
94:108 (17%)
view
12 x 2 src/PartsUnlimitedWebsite/Areas/Admin/Views/Orders
src/PartsUnlimitedWebsite/Views/Orders
cshtml
Details.cshtml
Details.cshtml
1:14 (100%)
1:13 (100%)
view
12 x 2 env
env/Scripts
Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
106:119 (10%)
99:112 (12%)
view
12 x 2 Labfiles/AZ-400T05_Imple...tion_Infrastructure/M02
Labfiles/Devops200.2x-InfrastructureasCode/Mod02
LabConfig.ps1
LabConfig.ps1
1:12 (100%)
1:12 (100%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
253 x 2 src/PartsUnlimited.Models/Migrations
src/PartsUnlimited.Models/Migrations
20151222030342_InitialMigration.Desig...
PartsUnlimitedContextModelSnapshot.cs
13:381 
13:381 
view
10 x 2 src/PartsUnlimitedWebsite/Controllers
src/PartsUnlimitedWebsite/Controllers
AccountController.cs
ManageController.cs
455:465 
374:384 
view
6 x 2 src/PartsUnlimitedWebsite/Controllers
src/PartsUnlimitedWebsite/Controllers
AccountController.cs
ManageController.cs
442:448 
338:344 
view