microsoft / Docker-Provider
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
  • 26% duplication:
    • 26,082 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,036 duplicated lines
  • 1,430 duplicates
system26% (7,036 lines)
Duplication per Extension
yaml82% (2,625 lines)
rb16% (2,405 lines)
ps137% (1,753 lines)
go9% (199 lines)
py4% (54 lines)
Duplication per Component (primary)
source/plugins15% (2,285 lines)
scripts/preview84% (1,237 lines)
charts/azuremonitor-containers71% (860 lines)
scripts/onboarding49% (743 lines)
scripts/troubleshoot42% (708 lines)
kubernetes79% (697 lines)
build/common20% (220 lines)
kubernetes/windows16% (127 lines)
build/linux6% (97 lines)
build/windows7% (62 lines)
Kubecon0% (0 lines)
kubernetes/linux0% (0 lines)
scripts/build0% (0 lines)
source/toml-parser0% (0 lines)

Duplication Between Components (50+ lines)

G charts/azuremonitor-containers charts/azuremonitor-containers kubernetes kubernetes charts/azuremonitor-containers--kubernetes 1183 scripts/preview scripts/preview charts/azuremonitor-containers--scripts/preview 660 kubernetes--scripts/preview 682 scripts/onboarding scripts/onboarding scripts/troubleshoot scripts/troubleshoot scripts/onboarding--scripts/troubleshoot 886 scripts/onboarding--scripts/preview 405 scripts/preview--scripts/troubleshoot 301 build/windows build/windows source/plugins source/plugins build/windows--source/plugins 212 build/common build/common build/linux build/linux build/common--build/linux 139

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 1,430 duplicates...
Size#FoldersFilesLinesCode
294 x 2 scripts/preview/health
scripts/preview/health
omsagent-template-aks-engine.yaml
omsagent-template.yaml
1:328 (54%)
1:328 (53%)
view
111 x 2 scripts/onboarding/managed
scripts/onboarding/managed
disable-monitoring.ps1
enable-monitoring.ps1
64:192 (33%)
84:212 (21%)
view
108 x 2 scripts/preview/health
scripts/preview/health
omsagent-template-aks-engine.yaml
omsagent-template.yaml
396:504 (19%)
396:504 (19%)
view
75 x 2 charts/azuremonitor-containers/templates
kubernetes
omsagent-rs-configmap.yaml
omsagent.yaml
87:168 (30%)
135:216 (9%)
view
64 x 2 scripts/onboarding/aks/mdmonboarding
scripts/onboarding/aks/mdmonboarding
mdm_onboarding.ps1
mdm_onboarding_atscale.ps1
121:189 (30%)
112:180 (30%)
view
62 x 2 charts/azuremonitor-containers/templates
kubernetes
omsagent-rs-configmap.yaml
omsagent.yaml
212:277 (25%)
260:326 (7%)
view
60 x 2 charts/azuremonitor-containers/templates
kubernetes
omsagent-rs-configmap.yaml
omsagent.yaml
8:85 (24%)
55:133 (7%)
view
59 x 2 source/plugins/ruby
source/plugins/ruby/health
KubernetesApiClient.rb
health_kubernetes_resources.rb
675:735 (8%)
212:272 (22%)
view
57 x 2 scripts/preview/health
scripts/preview/health
omsagent-template-aks-engine.yaml
omsagent-template.yaml
332:388 (10%)
332:388 (10%)
view
54 x 2 source/plugins/ruby
source/plugins/ruby
filter_inventory2mdm.rb
podinventory_to_mdm.rb
26:80 (21%)
24:78 (19%)
view
46 x 2 kubernetes/windows/dockerbuild
kubernetes/windows/dockerbuild
build-and-publish-dev-docker-image.ps1
build-and-publish-docker-image.ps1
1:58 (90%)
1:58 (90%)
view
46 x 2 scripts/preview/health
scripts/preview/health
omsagent-template-aks-engine.yaml
omsagent-template.yaml
541:586 (8%)
541:586 (8%)
view
45 x 2 scripts/onboarding/managed
scripts/troubleshoot
enable-monitoring.ps1
TroubleshootError_nonAzureK8s.ps1
162:210 (8%)
148:196 (10%)
view
45 x 2 scripts/onboarding/managed
scripts/troubleshoot
disable-monitoring.ps1
TroubleshootError_nonAzureK8s.ps1
142:190 (13%)
148:196 (10%)
view
41 x 2 scripts/onboarding/managed
scripts/troubleshoot
disable-monitoring.ps1
TroubleshootError_nonAzureK8s.ps1
69:118 (12%)
72:121 (9%)
view
41 x 2 scripts/onboarding/managed
scripts/troubleshoot
enable-monitoring.ps1
TroubleshootError_nonAzureK8s.ps1
89:138 (8%)
72:121 (9%)
view
40 x 2 scripts/onboarding/managed
scripts/onboarding/managed
disable-monitoring.ps1
enable-monitoring.ps1
280:321 (11%)
301:342 (7%)
view
40 x 2 scripts/troubleshoot
scripts/troubleshoot
TroubleshootError.ps1
TroubleshootError_nonAzureK8s.ps1
178:219 (5%)
155:196 (8%)
view
40 x 2 scripts/onboarding/managed
scripts/troubleshoot
enable-monitoring.ps1
TroubleshootError.ps1
169:210 (7%)
178:219 (5%)
view
40 x 2 scripts/onboarding/managed
scripts/troubleshoot
disable-monitoring.ps1
TroubleshootError.ps1
149:190 (11%)
178:219 (5%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
11 x 2 build/windows/installer/...ubyKeepCertificateAlive
source/plugins/ruby
omsagenthelper.rb
proxy_utils.rb
196:213 
26:43 
view
9 x 9 source/plugins/ruby
source/plugins/ruby
source/plugins/ruby
source/plugins/ruby
source/plugins/ruby
source/plugins/ruby
source/plugins/ruby
source/plugins/ruby
source/plugins/ruby
in_cadvisor_perf.rb
in_containerinventory.rb
in_kube_events.rb
in_kube_health.rb
in_kube_nodes.rb
in_kube_podinventory.rb
in_kube_pvinventory.rb
in_kubestate_deployments.rb
in_kubestate_hpa.rb
47:57 
42:52 
69:79 
74:84 
104:114 
92:102 
47:57 
66:76 
63:73 
view
8 x 2 build/windows/installer/...ubyKeepCertificateAlive
source/plugins/ruby
in_heartbeat_request.rb
in_win_cadvisor_perf.rb
57:66 
45:54 
view
7 x 3 build/linux/installer/InstallBuilder
build/linux/installer/InstallBuilder
build/linux/installer/InstallBuilder
aixlpp.py
linuxdpkg.py
sunospkg.py
0:0 
0:0 
0:0 
view
7 x 3 build/linux/installer/InstallBuilder
build/linux/installer/InstallBuilder
build/linux/installer/InstallBuilder
sunospkg.py
aixlpp.py
linuxdpkg.py
0:0 
0:0 
0:0 
view
6 x 2 build/common/installer/scripts
build/linux/installer/scripts
tomlparser-prom-customconfig.rb
tomlparser-osm-config.rb
69:76 
59:66 
view