microsoft / azure-pipelines-agent
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
  • 14% duplication:
    • 41,052 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,965 duplicated lines
  • 664 duplicates
system14% (5,965 lines)
Duplication per Extension
cs15% (5,710 lines)
ps17% (219 lines)
proj18% (20 lines)
js3% (16 lines)
Duplication per Component (primary)
src/Agent.Worker14% (2,317 lines)
src/Agent.Plugins35% (2,201 lines)
src/Microsoft.VisualStudio.Services.Agent9% (506 lines)
src/Agent.Sdk12% (365 lines)
src/Agent.Listener4% (321 lines)
src/Misc7% (219 lines)
src11% (20 lines)
release3% (16 lines)
ROOT0% (0 lines)
src/Agent.PluginHost0% (0 lines)
src/Agent.Service0% (0 lines)
tools/CredScanRegexes0% (0 lines)
tools/FindPipelinesUsingRetiredImages0% (0 lines)

Duplication Between Components (50+ lines)

G src/Agent.Plugins src/Agent.Plugins src/Agent.Worker src/Agent.Worker src/Agent.Plugins--src/Agent.Worker 2671 src/Microsoft.VisualStudio.Services.Agent src/Microsoft.VisualStudio.Services.Agent src/Agent.Worker--src/Microsoft.VisualStudio.Services.Agent 151 src/Agent.Sdk src/Agent.Sdk src/Agent.Sdk--src/Microsoft.VisualStudio.Services.Agent 352 src/Agent.Sdk--src/Agent.Worker 68

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 664 duplicates...
Size#FoldersFilesLinesCode
113 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TFCliManager.cs
TFCommandManager.cs
323:522 (43%)
321:520 (44%)
view
95 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TeeCliManager.cs
TeeCommandManager.cs
316:497 (39%)
314:495 (39%)
view
84 x 2 src/Agent.Sdk
src/Microsoft.VisualStudio.Services.Agent
ProcessInvoker.cs
ProcessInvoker.cs
73:169 (25%)
126:222 (32%)
view
57 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
103:218 (11%)
205:314 (11%)
view
54 x 2 src/Agent.Plugins/TestFilePublisher/Telemetry
src/Agent.Plugins/TestResultParser/Telemetry
TelemetryDataCollector.cs
TelemetryDataCollector.cs
29:147 (88%)
29:147 (88%)
view
50 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
749:828 (10%)
832:911 (9%)
view
47 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TfsVCSourceProvider.cs
TfsVCSourceProvider.cs
163:254 (12%)
149:240 (11%)
view
41 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
334:403 (8%)
425:494 (8%)
view
38 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TfsVCCliManager.cs
TfsVCCommandManager.cs
326:421 (18%)
322:417 (17%)
view
35 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
547:605 (7%)
638:696 (6%)
view
31 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TeeCliManager.cs
TeeCommandManager.cs
117:178 (12%)
114:174 (12%)
view
27 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
607:647 (5%)
698:738 (5%)
view
27 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TfsVCSourceProvider.cs
TfsVCSourceProvider.cs
324:383 (7%)
310:369 (6%)
view
27 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
470:522 (5%)
561:613 (5%)
view
25 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
674:716 (5%)
761:803 (4%)
view
25 x 2 src/Microsoft.VisualStudio.Services.Agent/Blob
src/Microsoft.VisualStudio.Services.Agent/Blob
DedupManifestArtifactClientFactory.cs
DedupManifestArtifactClientFactory.cs
77:109 (26%)
117:147 (26%)
view
24 x 2 src/Agent.Plugins/TestFilePublisher
src/Agent.Plugins/TestResultParser
SimpleTimer.cs
SimpleTimer.cs
26:74 (92%)
26:74 (92%)
view
24 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TFCliManager.cs
TFCommandManager.cs
168:223 (9%)
165:220 (9%)
view
24 x 2 src/Agent.Plugins
src/Agent.Worker/Build
GitSourceProvider.cs
GitSourceProvider.cs
391:428 (3%)
352:389 (3%)
view
24 x 2 src/Agent.Worker/Build
src/Agent.Worker/Release
TrackingConfig.cs
ReleaseTrackingConfig.cs
178:222 (18%)
60:104 (50%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 58 unit duplicates...
Size#FoldersFilesLinesCode
52 x 2 src/Microsoft.VisualStud...nt/AgentCredentialStore
src/Microsoft.VisualStud...nt/AgentCredentialStore
MacOSAgentCredentialStore.cs
MacOSAgentCredentialStore.cs
321:378 
380:437 
view
40 x 2 src/Agent.Plugins/TestFilePublisher/Telemetry
src/Agent.Plugins/TestResultParser/Telemetry
TelemetryDataCollector.cs
TelemetryDataCollector.cs
50:99 
50:99 
view
39 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
338:383 
429:474 
view
30 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
172:210 
274:312 
view
27 x 2 src/Agent.Plugins
src/Agent.Plugins
GitCliManager.cs
GitCliManager.cs
519:549 
552:582 
view
27 x 2 src/Agent.Sdk
src/Agent.Sdk
LogPlugin.cs
TaskPlugin.cs
208:240 
286:318 
view
27 x 2 src/Agent.Worker/TestResults/Legacy
src/Agent.Worker/TestResults/Legacy
TrxResultReader.cs
TrxResultReader.cs
596:627 
629:660 
view
26 x 2 src/Agent.Worker/Build
src/Agent.Worker/Build
GitCommandManager.cs
GitCommandManager.cs
546:576 
579:609 
view
23 x 2 src/Agent.Plugins
src/Agent.Plugins
GitCliManager.cs
GitCliManager.cs
584:610 
645:671 
view
21 x 2 src/Agent.Plugins/TestFilePublisher/Telemetry
src/Agent.Plugins/TestResultParser/Telemetry
TelemetryDataCollector.cs
TelemetryDataCollector.cs
101:126 
101:126 
view
21 x 2 src/Agent.Worker/Build
src/Agent.Worker/Build
GitCommandManager.cs
GitCommandManager.cs
610:634 
674:698 
view
20 x 2 src/Agent.Plugins/PipelineArtifact
src/Agent.Plugins/PipelineArtifact
PipelineArtifactPlugin.cs
PipelineArtifactPluginV1.cs
121:143 
169:191 
view
20 x 2 src/Agent.Sdk
src/Microsoft.VisualStudio.Services.Agent
ProcessInvoker.cs
ProcessInvoker.cs
127:147 
180:200 
view
19 x 2 src/Agent.Plugins
src/Agent.Worker/Build
GitSourceProvider.cs
GitSourceProvider.cs
1352:1376 
1260:1284 
view
18 x 2 src/Agent.Sdk
src/Microsoft.VisualStudio.Services.Agent
ProcessInvoker.cs
ProcessInvoker.cs
107:125 
160:178 
view
17 x 2 src/Agent.Plugins/TestFilePublisher/Telemetry
src/Agent.Plugins/TestResultParser/Telemetry
TelemetryDataCollector.cs
TelemetryDataCollector.cs
129:148 
129:148 
view
16 x 2 src/Agent.Plugins/BuildArtifact
src/Agent.Plugins/PipelineArtifact
BuildArtifactPluginV1.cs
PipelineArtifactPluginV2.cs
440:460 
409:429 
view
16 x 2 src/Agent.Plugins
src/Agent.Worker/Build
SvnCliManager.cs
SvnCommandManager.cs
385:401 
476:492 
view
16 x 2 src/Agent.Sdk
src/Microsoft.VisualStudio.Services.Agent
ProcessInvoker.cs
ProcessInvoker.cs
89:105 
142:158 
view
15 x 2 src/Agent.Plugins
src/Agent.Worker/Build
TeeCliManager.cs
TeeCommandManager.cs
145:164 
141:160 
view