microsoft / azure-devops-auth-samples
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
  • 8% duplication:
    • 1,707 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 152 duplicated lines
  • 7 duplicates
system8% (152 lines)
Duplication per Extension
cs20% (66 lines)
ps110% (58 lines)
py9% (16 lines)
html8% (12 lines)
Duplication per Component (primary)
PersonalAccessTokenAPIAppSample/AppCreationScripts16% (44 lines)
DeviceProfileSample38% (19 lines)
ManagedClientConsoleAppSample38% (19 lines)
PersonalAccessTokenAPIAppSample9% (16 lines)
OAuthWebSample/PublishScripts4% (14 lines)
OAuthWebSample/OAuthWebSample2% (12 lines)
PersonalAccessTokenAPIAppSample/templates10% (12 lines)
ClientLibraryConsoleAppSample61% (8 lines)
ClientLibraryPatAppSample57% (8 lines)
DualSupportClientSample0% (0 lines)
DualSupportClientSample/Properties0% (0 lines)
JavascriptWebAppSample0% (0 lines)
NonInteractivePatGenerationSample/NonInteractivePatGenerationSample0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
22 x 2 PersonalAccessTokenAPIAppSample/AppCreationScripts
PersonalAccessTokenAPIAppSample/AppCreationScripts
Cleanup.ps1
Configure.ps1
24:46 (36%)
149:172 (10%)
view
19 x 2 DeviceProfileSample
ManagedClientConsoleAppSample
Program.cs
Program.cs
32:73 (38%)
31:70 (38%)
view
8 x 2 ClientLibraryConsoleAppSample
ClientLibraryPatAppSample
Program.cs
Program.cs
25:38 (61%)
26:39 (57%)
view
8 x 2 PersonalAccessTokenAPIAppSample
PersonalAccessTokenAPIAppSample
app.py
app.py
102:109 (5%)
123:130 (5%)
view
7 x 2 OAuthWebSample/PublishScripts
OAuthWebSample/PublishScripts
Publish-WebApplication.ps1
Publish-WebApplication.ps1
163:169 (2%)
211:217 (2%)
view
6 x 2 PersonalAccessTokenAPIAppSample/templates
PersonalAccessTokenAPIAppSample/templates
index.html
login.html
1:7 (7%)
1:7 (50%)
view
6 x 2 OAuthWebSample/OAuthWebSample/Controllers
OAuthWebSample/OAuthWebSample/Controllers
OAuthController.cs
OAuthController.cs
80:88 (7%)
174:184 (7%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
15 x 2 DeviceProfileSample
ManagedClientConsoleAppSample
Program.cs
Program.cs
34:52 
33:51 
view