microsoft / Omex
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
  • 5% duplication:
    • 2,990 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 166 duplicated lines
  • 20 duplicates
system5% (166 lines)
Duplication per Extension
cs5% (166 lines)
Duplication per Component (primary)
src/Logging19% (90 lines)
src/Services.Remoting13% (26 lines)
src/Activities6% (24 lines)
src/Diagnostics.HealthChecks4% (14 lines)
src/Hosting.Services.Remoting16% (12 lines)
ROOT0% (0 lines)
src/Abstractions0% (0 lines)
src/CodeGenerators0% (0 lines)
src0% (0 lines)
src/Hosting.Services.Web0% (0 lines)
src/Hosting.Services0% (0 lines)
src/Hosting0% (0 lines)
src/ServiceFabricGuest.Abstractions0% (0 lines)
src/Testing.Helpers0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 20 duplicates...
Size#FoldersFilesLinesCode
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
16:33 (15%)
39:56 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
62:79 (15%)
108:125 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
39:56 (15%)
62:79 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
16:33 (15%)
108:125 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
39:56 (15%)
108:125 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
16:33 (15%)
62:79 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
85:102 (15%)
108:125 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
62:79 (15%)
85:102 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
39:56 (15%)
85:102 (15%)
view
18 x 2 src/Logging/Internal/EventSource
src/Logging/Internal/EventSource
OmexLogEventSource.cs
OmexLogEventSource.cs
16:33 (15%)
85:102 (15%)
view
7 x 2 src/Services.Remoting/Internal/Client
src/Services.Remoting/Runtime
ServiceRemotingClientWrapper.cs
OmexServiceRemotingDispatcher.cs
68:80 (16%)
80:92 (17%)
view
7 x 2 src/Diagnostics.HealthChecks/Internal
src/Diagnostics.HealthChecks/Internal
RestHealthStatusSender.cs
ServiceContextHealthStatusSender.cs
50:57 (28%)
71:78 (20%)
view
6 x 2 src/Activities/Internal/EventSource
src/Activities/Internal/EventSource
ActivityEventSource.cs
ActivityEventSource.cs
19:24 (20%)
32:37 (20%)
view
6 x 2 src/Services.Remoting/Internal/Client
src/Services.Remoting/Runtime
ServiceRemotingClientWrapper.cs
OmexServiceRemotingDispatcher.cs
91:100 (13%)
80:89 (15%)
view
6 x 2 src/Services.Remoting/Runtime
src/Services.Remoting/Runtime
OmexServiceRemotingDispatcher.cs
OmexServiceRemotingDispatcher.cs
54:63 (15%)
80:89 (15%)
view
6 x 2 src/Services.Remoting/Internal/Client
src/Services.Remoting/Internal/Client
ServiceRemotingClientWrapper.cs
ServiceRemotingClientWrapper.cs
68:77 (13%)
91:100 (13%)
view
6 x 2 src/Services.Remoting/Internal/Client
src/Services.Remoting/Runtime
ServiceRemotingClientWrapper.cs
OmexServiceRemotingDispatcher.cs
68:77 (13%)
54:63 (15%)
view
6 x 2 src/Activities/Internal/EventSource
src/Activities/Internal/EventSource
ActivityEventSender.cs
ActivityEventSender.cs
84:89 (7%)
98:103 (7%)
view
6 x 2 src/Services.Remoting/Internal/Client
src/Services.Remoting/Runtime
ServiceRemotingClientWrapper.cs
OmexServiceRemotingDispatcher.cs
91:100 (13%)
54:63 (15%)
view
6 x 2 src/Hosting.Services.Remoting
src/Hosting.Services.Remoting
HostBuilderExtensions.cs
HostBuilderExtensions.cs
23:28 (17%)
35:40 (17%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
7 x 2 src/Diagnostics.HealthChecks/Internal
src/Diagnostics.HealthChecks/Internal
RestHealthStatusSender.cs
ServiceContextHealthStatusSender.cs
50:57 
71:78 
view
7 x 2 src/Logging/Scrubbing
src/Logging/Scrubbing
ServiceCollectionExtensions.cs
ServiceCollectionExtensions.cs
30:37 
43:50 
view