microsoft / 2LCS
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:
    • 6,456 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 695 duplicated lines
  • 236 duplicates
system10% (695 lines)
Duplication per Extension
cs10% (695 lines)
Duplication per Component (primary)
2LCS/Forms12% (637 lines)
2LCS4% (58 lines)
2LCS/Cache0% (0 lines)
2LCS/Properties0% (0 lines)
2LCS/Utils0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 236 duplicates...
Size#FoldersFilesLinesCode
27 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
1124:1153 (1%)
1240:1269 (1%)
view
20 x 2 2LCS
2LCS
JsonObjects.cs
JsonObjects.cs
261:280 (3%)
514:533 (3%)
view
20 x 2 2LCS/Forms
2LCS/Forms
ChooseNSG.Designer.cs
ChooseProject.Designer.cs
39:64 (18%)
43:68 (13%)
view
15 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
327:343 (<1%)
1895:1910 (<1%)
view
15 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
839:854 (<1%)
866:881 (<1%)
view
11 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
261:283 (<1%)
1612:1634 (<1%)
view
10 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
373:383 (<1%)
1944:1954 (<1%)
view
10 x 2 2LCS/Forms
2LCS/Forms
ChooseMachine.cs
ChooseNSG.cs
20:38 (23%)
19:37 (23%)
view
10 x 2 2LCS/Forms
2LCS/Forms
ChooseMachine.cs
ChooseService.cs
20:38 (23%)
19:37 (27%)
view
10 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
306:315 (<1%)
1858:1867 (<1%)
view
10 x 2 2LCS/Forms
2LCS/Forms
ChooseNSG.cs
ChooseService.cs
19:37 (23%)
19:37 (27%)
view
10 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
1858:1867 (<1%)
1876:1885 (<1%)
view
10 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
306:315 (<1%)
1876:1885 (<1%)
view
9 x 2 2LCS/Forms
2LCS/Forms
ChooseNSG.Designer.cs
ChooseService.Designer.cs
8:32 (8%)
8:32 (17%)
view
9 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
2017:2029 (<1%)
2042:2054 (<1%)
view
9 x 2 2LCS/Forms
2LCS/Forms
ChooseMachine.Designer.cs
ChoosePackage.Designer.cs
8:32 (7%)
8:32 (4%)
view
9 x 2 2LCS/Forms
2LCS/Forms
ChoosePackage.Designer.cs
ChooseService.Designer.cs
8:32 (4%)
8:32 (17%)
view
9 x 2 2LCS/Forms
2LCS/Forms
ChooseNSG.Designer.cs
ChoosePackage.Designer.cs
8:32 (8%)
8:32 (4%)
view
9 x 2 2LCS/Forms
2LCS/Forms
ChooseMachine.Designer.cs
ChooseProject.Designer.cs
8:32 (7%)
8:32 (6%)
view
9 x 2 2LCS/Forms
2LCS/Forms
ChoosePackage.Designer.cs
ChooseProject.Designer.cs
8:32 (4%)
8:32 (6%)
view
Duplicated Units
The list of top 10 duplicated units.
See data for all 10 unit duplicates...
Size#FoldersFilesLinesCode
17 x 2 2LCS/Forms
2LCS/Forms
ChooseProject.cs
ChooseProject.cs
60:77 
79:96 
view
16 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
1433:1449 
2173:2189 
view
11 x 2 2LCS/Forms
2LCS/Forms
ChooseMachine.cs
ChooseMachine.cs
57:68 
70:81 
view
11 x 2 2LCS/Forms
2LCS/Forms
ChooseNSG.cs
ChooseNSG.cs
56:67 
69:80 
view
11 x 2 2LCS/Forms
2LCS/Forms
ChoosePackage.cs
ChoosePackage.cs
58:69 
71:82 
view
11 x 2 2LCS
2LCS
HttpClientHelper.cs
HttpClientHelper.cs
693:704 
719:730 
view
10 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
2129:2139 
2141:2151 
view
9 x 2 2LCS/Forms
2LCS/Forms
MainForm.cs
MainForm.cs
692:701 
703:712 
view
9 x 2 2LCS
2LCS
HttpClientHelper.cs
HttpClientHelper.cs
610:620 
762:772 
view
7 x 19 2LCS/Forms
2LCS/Forms
2LCS/Forms
2LCS/Forms
2LCS/Forms
2LCS/Forms
2LCS/Forms
2LCS/Forms
2LCS/Forms
2LCS/Forms
...
AddNSG.Designer.cs
AvailableKBs.Designer.cs
BuildInfoDetails.Designer.cs
ChooseMachine.Designer.cs
ChooseNSG.Designer.cs
ChoosePackage.Designer.cs
ChooseProject.Designer.cs
ChooseService.Designer.cs
CookieEdit.Designer.cs
Credentials.Designer.cs
...
14:21 
14:21 
14:21 
14:21 
14:21 
14:21 
14:21 
14:21 
14:21 
14:21 
...
view