microsoft / SDN
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:
    • 30,797 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 9,758 duplicated lines
  • 5,322 duplicates
system31% (9,758 lines)
Duplication per Extension
cfg88% (3,629 lines)
ps120% (2,588 lines)
psm115% (1,075 lines)
yml98% (1,048 lines)
psd158% (527 lines)
c18% (470 lines)
h31% (299 lines)
toml55% (82 lines)
go3% (26 lines)
yaml4% (14 lines)
Duplication per Component (primary)
SwitchConfigExamples/Dell Force10 S4810 - Redundant TOR with Aggregate90% (2,363 lines)
SwitchConfigExamples/Cisco Nexus 3132 - Redundant TOR84% (1,266 lines)
Kubernetes/windows28% (1,230 lines)
SDNExpress/Tools20% (1,167 lines)
Kubernetes/flannel87% (1,094 lines)
NDKCI/RdmaSample21% (769 lines)
SDNExpress/scripts16% (752 lines)
VMM/Templates25% (531 lines)
VMM/VMM SDN Express16% (247 lines)
Diagnostics15% (169 lines)
Kubernetes/containerd21% (100 lines)
NCRESTExamples5% (30 lines)
Kubernetes/wincni3% (26 lines)
Kubernetes/linux3% (14 lines)
Containers0% (0 lines)
Kubernetes0% (0 lines)
VMM/scripts0% (0 lines)

Duplication Between Components (50+ lines)

G SDNExpress/Tools SDNExpress/Tools VMM/Templates VMM/Templates SDNExpress/Tools--VMM/Templates 157 SDNExpress/scripts SDNExpress/scripts SDNExpress/Tools--SDNExpress/scripts 56 Diagnostics Diagnostics Diagnostics--SDNExpress/scripts 50

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 5,322 duplicates...
Size#FoldersFilesLinesCode
403 x 2 Kubernetes/flannel/l2bridge/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
130:532 (76%)
132:534 (76%)
view
320 x 2 SwitchConfigExamples/Del...bsp;with Aggregate
SwitchConfigExamples/Del...bsp;with Aggregate
cfg
Dell S4810-AGG1.cfg
Dell S4810-AGG2.cfg
17:336 (58%)
17:336 (58%)
view
309 x 2 SwitchConfigExamples/Del...bsp;with Aggregate
SwitchConfigExamples/Del...bsp;with Aggregate
cfg
Dell S4810-TOR1.cfg
Dell S4810-TOR2.cfg
43:351 (40%)
43:351 (40%)
view
299 x 2 SwitchConfigExamples/Cis...nbsp;Redundant TOR
SwitchConfigExamples/Cis...nbsp;Redundant TOR
cfg
Cisco Nexus 3132-TOR1.cfg
Cisco Nexus 3132-TOR2.cfg
7:316 (39%)
7:316 (39%)
view
284 x 2 SwitchConfigExamples/Cis...nbsp;Redundant TOR
SwitchConfigExamples/Cis...nbsp;Redundant TOR
cfg
Cisco Nexus 3132-TOR1.cfg
Cisco Nexus 3132-TOR2.cfg
406:738 (37%)
406:738 (37%)
view
135 x 2 Kubernetes/windows/debug
Kubernetes/windows/debug
starthnstrace.ps1
startpacketcapture.ps1
26:179 (48%)
26:179 (47%)
view
112 x 2 SwitchConfigExamples/Del...bsp;with Aggregate
SwitchConfigExamples/Del...bsp;with Aggregate
cfg
Dell S4810-TOR1.cfg
Dell S4810-TOR2.cfg
643:754 (14%)
649:760 (14%)
view
102 x 2 SwitchConfigExamples/Del...bsp;with Aggregate
SwitchConfigExamples/Del...bsp;with Aggregate
cfg
Dell S4810-TOR1.cfg
Dell S4810-TOR2.cfg
363:464 (13%)
363:464 (13%)
view
101 x 2 Kubernetes/flannel/l2bridge/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
1:107 (19%)
1:107 (19%)
view
98 x 2 SwitchConfigExamples/Del...bsp;with Aggregate
SwitchConfigExamples/Del...bsp;with Aggregate
cfg
Dell S4810-AGG1.cfg
Dell S4810-AGG2.cfg
451:548 (17%)
451:548 (17%)
view
83 x 2 Kubernetes/windows/debug
Kubernetes/windows/debug
starthnstrace.ps1
startpacketcapture.ps1
225:318 (30%)
237:330 (29%)
view
66 x 2 SDNExpress/scripts
SDNExpress/scripts
Sample - Traditional VLAN networks.psd1
Sample - Virtualized networks.psd1
1:76 (62%)
1:76 (62%)
view
46 x 2 SDNExpress/scripts
SDNExpress/scripts
Sample - SDN Gateways.psd1
Sample - Software Load Balancer.psd1
1:54 (43%)
1:54 (43%)
view
44 x 2 Kubernetes/flannel/l2bridge/manifests
Kubernetes/flannel/l2bridge/manifests
kube-flannel-example.yml
kube-flannel-example.yml
333:376 (8%)
413:456 (8%)
view
44 x 2 Kubernetes/flannel/overlay/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
335:378 (8%)
415:458 (8%)
view
44 x 2 Kubernetes/flannel/overlay/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
255:298 (8%)
335:378 (8%)
view
44 x 2 Kubernetes/flannel/overlay/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
255:298 (8%)
415:458 (8%)
view
44 x 2 Kubernetes/flannel/l2bridge/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
173:216 (8%)
255:298 (8%)
view
44 x 2 Kubernetes/flannel/l2bridge/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
173:216 (8%)
415:458 (8%)
view
44 x 2 Kubernetes/flannel/l2bridge/manifests
Kubernetes/flannel/overlay/manifests
kube-flannel-example.yml
kube-flannel-example.yml
173:216 (8%)
335:378 (8%)
view