microsoft / service-fabric-client-dotnet
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
  • 31% duplication:
    • 51,211 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 15,920 duplicated lines
  • 17,851 duplicates
system31% (15,920 lines)
Duplication per Extension
cs31% (15,847 lines)
ps1xml46% (73 lines)
Duplication per Component (primary)
src/Microsoft.ServiceFabric.Client.Http/Generated33% (10,219 lines)
src/Microsoft.ServiceFabric.Powershell.Http/Generated42% (2,963 lines)
src/Microsoft.ServiceFabric.Common/Generated22% (2,059 lines)
src/Microsoft.ServiceFabric.Powershell.Http27% (231 lines)
src/Microsoft.ServiceFabric.Client/Generated17% (228 lines)
src/Microsoft.ServiceFabric.Client.Http/Extensions18% (150 lines)
src/Microsoft.ServiceFabric.Client.Http8% (51 lines)
src/Microsoft.ServiceFabric.Common4% (12 lines)
src/Microsoft.ServiceFabric.Client/Extensions10% (7 lines)
ROOT0% (0 lines)
properties0% (0 lines)
properties/stylecop0% (0 lines)
src/Microsoft.ServiceFabric.Client.Http/Serialization0% (0 lines)
src/Microsoft.ServiceFabric.Client0% (0 lines)
src/Microsoft.ServiceFabric.Client/Exceptions0% (0 lines)
src/Microsoft.ServiceFabric.Common/Exceptions0% (0 lines)
src/Microsoft.ServiceFabric.Common/Extensions0% (0 lines)
src/Microsoft.ServiceFabric.Common/Security0% (0 lines)
src/Microsoft.ServiceFabric.Common/Utilities0% (0 lines)
src/Microsoft.ServiceFabric.Powershell.Http/Extensions0% (0 lines)
src/Microsoft.ServiceFabric.Powershell.Http/manifest0% (0 lines)
src/netframework/Microsoft.ServiceFabric.Powershell.Http0% (0 lines)

Duplication Between Components (50+ lines)

G src/Microsoft.ServiceFabric.Client.Http/Extensions src/Microsoft.ServiceFabric.Client.Http/Extensions src/Microsoft.ServiceFabric.Client.Http/Generated src/Microsoft.ServiceFabric.Client.Http/Generated src/Microsoft.ServiceFabric.Client.Http/Extensions--src/Microsoft.ServiceFabric.Client.Http/Generated 903 src/Microsoft.ServiceFabric.Client/Generated src/Microsoft.ServiceFabric.Client/Generated src/Microsoft.ServiceFabric.Client.Http/Generated--src/Microsoft.ServiceFabric.Client/Generated 424 src/Microsoft.ServiceFabric.Powershell.Http/Generated src/Microsoft.ServiceFabric.Powershell.Http/Generated src/Microsoft.ServiceFabric.Powershell.Http src/Microsoft.ServiceFabric.Powershell.Http src/Microsoft.ServiceFabric.Powershell.Http/Generated--src/Microsoft.ServiceFabric.Powershell.Http 115

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 17,851 duplicates...
Size#FoldersFilesLinesCode
98 x 2 src/Microsoft.ServiceFab...wershell.Http/Generated
src/Microsoft.ServiceFab...wershell.Http/Generated
NewRepairTaskCmdlet.cs
UpdateRepairExecutionStateCmdlet.cs
22:273 (91%)
22:273 (91%)
view
83 x 2 src/Microsoft.ServiceFab...wershell.Http/Generated
src/Microsoft.ServiceFab...wershell.Http/Generated
NewBackupPolicyCmdlet.cs
UpdateBackupPolicyCmdlet.cs
22:193 (48%)
22:193 (47%)
view
81 x 2 src/Microsoft.ServiceFab...wershell.Http/Generated
src/Microsoft.ServiceFab...wershell.Http/Generated
StartClusterUpgradeCmdlet.cs
ValidateClusterUpgradeCmdlet.cs
22:304 (92%)
22:304 (89%)
view
50 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
StatefulReplicaHealthReportExpiredEve...
StatefulReplicaNewHealthReportEventCo...
36:120 (54%)
36:120 (54%)
view
50 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
DeployedApplicationHealthReportExpire...
DeployedApplicationNewHealthReportEve...
36:120 (54%)
36:120 (54%)
view
48 x 2 src/Microsoft.ServiceFab...wershell.Http/Generated
src/Microsoft.ServiceFab...wershell.Http/Generated
NewBackupPolicyCmdlet.cs
UpdateBackupPolicyCmdlet.cs
267:334 (28%)
273:340 (27%)
view
47 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
NodeHealthReportExpiredEventConverter.cs
NodeNewHealthReportEventConverter.cs
36:115 (54%)
36:115 (54%)
view
47 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
StatelessReplicaHealthReportExpiredEv...
StatelessReplicaNewHealthReportEventC...
36:115 (54%)
36:115 (54%)
view
47 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
ApplicationHealthReportExpiredEventCo...
ApplicationNewHealthReportEventConver...
36:115 (54%)
36:115 (54%)
view
47 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
ServiceHealthReportExpiredEventConver...
ServiceNewHealthReportEventConverter.cs
36:115 (54%)
36:115 (54%)
view
44 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
NodeAbortedEventConverter.cs
NodeOpenSucceededEventConverter.cs
36:110 (54%)
36:110 (54%)
view
44 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
PartitionHealthReportExpiredEventConv...
PartitionNewHealthReportEventConverte...
36:110 (54%)
36:110 (54%)
view
41 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
ClusterHealthReportExpiredEventConver...
ClusterNewHealthReportEventConverter.cs
36:105 (53%)
36:105 (53%)
view
38 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
NodeAddedToClusterEventConverter.cs
NodeRemovedFromClusterEventConverter.cs
36:100 (53%)
36:100 (53%)
view
34 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
StatefulServiceDescriptionConverter.cs
StatelessServiceDescriptionConverter.cs
64:129 (20%)
60:125 (23%)
view
33 x 2 src/Microsoft.ServiceFabric.Common/Generated
src/Microsoft.ServiceFabric.Common/Generated
DeployedApplicationHealthReportExpire...
DeployedApplicationNewHealthReportEve...
59:133 (61%)
59:133 (61%)
view
32 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
ChaosReplicaRemovalScheduledEventConv...
ChaosReplicaRestartScheduledEventConv...
36:90 (52%)
36:90 (52%)
view
31 x 2 src/Microsoft.ServiceFabric.Common/Generated
src/Microsoft.ServiceFabric.Common/Generated
StatefulReplicaHealthReportExpiredEve...
StatefulReplicaNewHealthReportEvent.cs
61:129 (59%)
61:129 (59%)
view
30 x 2 src/Microsoft.ServiceFabric.Common/Generated
src/Microsoft.ServiceFabric.Common/Generated
NodeHealthReportExpiredEvent.cs
NodeNewHealthReportEvent.cs
52:119 (60%)
52:119 (60%)
view
30 x 2 src/Microsoft.ServiceFabric.Common/Generated
src/Microsoft.ServiceFabric.Common/Generated
ApplicationHealthReportExpiredEvent.cs
ApplicationNewHealthReportEvent.cs
57:124 (60%)
57:124 (60%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 56 unit duplicates...
Size#FoldersFilesLinesCode
32 x 2 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
PartitionClient.cs
PartitionClient.cs
582:618 
621:657 
view
30 x 2 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
NodeClient.cs
NodeClient.cs
497:532 
535:570 
view
29 x 3 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
SecondaryActiveReplicatorStatusConver...
SecondaryIdleReplicatorStatusConverte...
SecondaryReplicatorStatusConverter.cs
91:127 
91:127 
97:133 
view
27 x 2 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
RepairManagementClient.cs
RepairManagementClient.cs
37:69 
242:274 
view
26 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
DeployedApplicationHealthReportExpire...
DeployedApplicationNewHealthReportEve...
145:174 
145:174 
view
26 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
StatefulReplicaHealthReportExpiredEve...
StatefulReplicaNewHealthReportEventCo...
145:174 
145:174 
view
25 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
ApplicationHealthReportExpiredEventCo...
ApplicationNewHealthReportEventConver...
139:167 
139:167 
view
25 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
NodeHealthReportExpiredEventConverter.cs
NodeNewHealthReportEventConverter.cs
139:167 
139:167 
view
25 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
ServiceHealthReportExpiredEventConver...
ServiceNewHealthReportEventConverter.cs
139:167 
139:167 
view
25 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
StatelessReplicaHealthReportExpiredEv...
StatelessReplicaNewHealthReportEventC...
139:167 
139:167 
view
24 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
NodeAbortedEventConverter.cs
NodeOpenSucceededEventConverter.cs
133:160 
133:160 
view
24 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
PartitionHealthReportExpiredEventConv...
PartitionNewHealthReportEventConverte...
133:160 
133:160 
view
23 x 2 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
ApplicationClient.cs
BackupRestoreClient.cs
534:561 
408:435 
view
23 x 3 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
BackupRestoreClient.cs
BackupRestoreClient.cs
PartitionClient.cs
629:656 
659:686 
384:411 
view
23 x 3 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
BackupRestoreClient.cs
BackupRestoreClient.cs
PartitionClient.cs
840:867 
870:897 
324:351 
view
23 x 2 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
ComposeDeploymentClient.cs
ComposeDeploymentClient.cs
167:194 
238:265 
view
23 x 2 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
NodeClient.cs
NodeClient.cs
293:320 
323:350 
view
23 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
ClusterHealthReportExpiredEventConver...
ClusterNewHealthReportEventConverter.cs
127:153 
127:153 
view
22 x 2 src/Microsoft.ServiceFab...Generated/Serialization
src/Microsoft.ServiceFab...Generated/Serialization
NodeAddedToClusterEventConverter.cs
NodeRemovedFromClusterEventConverter.cs
121:146 
121:146 
view
20 x 3 src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
src/Microsoft.ServiceFabric.Client.Http/Generated
ChaosClient.cs
ClusterClient.cs
PartitionClient.cs
102:126 
543:567 
414:438 
view