kubernetes / cloud-provider-openstack
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:
    • 14,589 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,134 duplicated lines
  • 214 duplicates
system14% (2,134 lines)
Duplication per Extension
yaml49% (1,379 lines)
go6% (705 lines)
tpl21% (50 lines)
Duplication per Component (primary)
charts/cinder-csi-plugin49% (349 lines)
charts/manila-csi-plugin49% (330 lines)
manifests/cinder-csi-plugin59% (260 lines)
pkg/csi6% (230 lines)
manifests/manila-csi-plugin56% (220 lines)
manifests/controller-manager66% (181 lines)
pkg/openstack5% (170 lines)
charts/openstack-cloud-controller-manager24% (89 lines)
pkg/util5% (70 lines)
pkg/ingress5% (64 lines)
pkg/autohealing6% (63 lines)
pkg/identity4% (42 lines)
cmd/client-keystone-auth18% (26 lines)
cmd/manila-csi-plugin12% (12 lines)
cmd/cinder-csi-plugin24% (12 lines)
cmd/barbican-kms-plugin31% (10 lines)
cmd/k8s-keystone-auth24% (6 lines)
cmd/magnum-auto-healer0% (0 lines)
cmd/octavia-ingress-controller0% (0 lines)
cmd/openstack-cloud-controller-manager0% (0 lines)
manifests/magnum-auto-healer0% (0 lines)
manifests/barbican-kms0% (0 lines)
pkg/client0% (0 lines)
pkg/kms0% (0 lines)
pkg/metrics0% (0 lines)
pkg/version0% (0 lines)

Duplication Between Components (50+ lines)

G charts/cinder-csi-plugin charts/cinder-csi-plugin manifests/cinder-csi-plugin manifests/cinder-csi-plugin charts/cinder-csi-plugin--manifests/cinder-csi-plugin 422 charts/manila-csi-plugin charts/manila-csi-plugin charts/cinder-csi-plugin--charts/manila-csi-plugin 96 charts/openstack-cloud-controller-manager charts/openstack-cloud-controller-manager manifests/controller-manager manifests/controller-manager charts/openstack-cloud-controller-manager--manifests/controller-manager 186 manifests/manila-csi-plugin manifests/manila-csi-plugin charts/manila-csi-plugin--manifests/manila-csi-plugin 114

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 214 duplicates...
Size#FoldersFilesLinesCode
41 x 2 charts/openstack-cloud-c...oller-manager/templates
manifests/controller-manager
clusterrole.yaml
cloud-controller-manager-roles.yaml
5:45 (47%)
7:47 (35%)
view
37 x 2 charts/manila-csi-plugin/templates
manifests/manila-csi-plugin
controllerplugin-rules-clusterrole.yaml
csi-controllerplugin-rbac.yaml
12:48 (77%)
30:66 (32%)
view
36 x 2 charts/cinder-csi-plugin/templates
manifests/cinder-csi-plugin
controllerplugin-rbac.yaml
cinder-csi-controllerplugin-rbac.yaml
128:168 (22%)
136:178 (22%)
view
34 x 2 charts/cinder-csi-plugin/templates
manifests/cinder-csi-plugin
controllerplugin-rbac.yaml
cinder-csi-controllerplugin-rbac.yaml
39:73 (21%)
42:77 (21%)
view
33 x 2 charts/cinder-csi-plugin/templates
manifests/cinder-csi-plugin
controllerplugin-rbac.yaml
cinder-csi-controllerplugin-rbac.yaml
86:126 (21%)
93:134 (20%)
view
32 x 2 charts/openstack-cloud-c...oller-manager/templates
manifests/controller-manager
clusterrole.yaml
cloud-controller-manager-roles.yaml
56:87 (36%)
58:89 (27%)
view
29 x 2 charts/cinder-csi-plugin/templates
manifests/cinder-csi-plugin
controllerplugin-rbac.yaml
cinder-csi-controllerplugin-rbac.yaml
9:37 (18%)
10:40 (18%)
view
27 x 2 manifests/controller-manager
manifests/controller-manager
openstack-cloud-controller-manager-ds...
openstack-cloud-controller-manager-po...
37:63 (36%)
12:38 (51%)
view
23 x 2 manifests/manila-csi-plugin
manifests/manila-csi-plugin
csi-controllerplugin.yaml
csi-nodeplugin.yaml
74:100 (19%)
47:73 (24%)
view
17 x 2 charts/cinder-csi-plugin
charts/manila-csi-plugin
values.yaml
values.yaml
14:30 (16%)
75:93 (26%)
view
17 x 2 charts/cinder-csi-plugin/templates
manifests/cinder-csi-plugin
nodeplugin-rbac.yaml
cinder-csi-nodeplugin-rbac.yaml
6:23 (62%)
8:25 (62%)
view
15 x 2 manifests/controller-manager
manifests/controller-manager
cloud-controller-manager-roles.yaml
cloud-controller-manager-roles.yaml
24:38 (12%)
95:109 (12%)
view
15 x 2 charts/cinder-csi-plugin/templates
charts/cinder-csi-plugin/templates
controllerplugin-deployment.yaml
nodeplugin-daemonset.yaml
119:134 (9%)
69:84 (12%)
view
15 x 2 charts/openstack-cloud-c...oller-manager/templates
manifests/controller-manager
clusterrole.yaml
cloud-controller-manager-roles.yaml
22:36 (17%)
95:109 (12%)
view
14 x 2 charts/manila-csi-plugin/templates
charts/manila-csi-plugin/templates
controllerplugin-clusterrolebinding.yaml
controllerplugin-rolebinding.yaml
2:15 (77%)
2:15 (77%)
view
14 x 2 pkg/csi/cinder/openstack
pkg/csi/cinder/openstack
openstack_snapshots.go
openstack_volumes.go
110:130 (15%)
95:115 (6%)
view
13 x 2 pkg/ingress/controller
pkg/ingress/controller
controller.go
controller.go
786:803 (2%)
831:848 (2%)
view
13 x 2 charts/manila-csi-plugin/templates
manifests/manila-csi-plugin
nodeplugin-rules-clusterrole.yaml
csi-nodeplugin-rbac.yaml
12:24 (54%)
30:42 (22%)
view
12 x 2 pkg/util/metadata
pkg/util/metadata
metadata_mock.go
metadata_mock.go
12:28 (42%)
33:49 (42%)
view
12 x 2 pkg/util/metadata
pkg/util/mount
metadata_mock.go
mount_mock.go
12:28 (42%)
55:71 (12%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
15 x 4 pkg/util/metadata
pkg/util/metadata
pkg/util/mount
pkg/csi/cinder/openstack
metadata_mock.go
metadata_mock.go
mount_mock.go
openstack_mock.go
11:29 
32:50 
54:72 
327:344 
view
15 x 2 pkg/csi/cinder/openstack
pkg/csi/cinder/openstack
openstack_mock.go
openstack_mock.go
59:77 
139:157 
view
11 x 2 pkg/ingress/controller/openstack
pkg/ingress/controller
octavia.go
controller.go
50:63 
243:256 
view
9 x 2 pkg/csi/cinder/openstack
pkg/csi/cinder/openstack
openstack_mock.go
openstack_mock.go
125:136 
160:171 
view
7 x 2 pkg/util
pkg/autohealing/utils
util.go
utils.go
55:62 
20:27 
view