aws / cluster-api-provider-cloudstack
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
  • 34% duplication:
    • 2,869 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 980 duplicated lines
  • 95 duplicates
system34% (980 lines)
Duplication per Extension
yaml56% (934 lines)
go3% (46 lines)
Duplication per Component (primary)
templates93% (369 lines)
config/crd44% (211 lines)
config/rbac63% (196 lines)
config/webhook55% (85 lines)
config/default21% (29 lines)
api/v1beta16% (28 lines)
controllers7% (18 lines)
config/dev75% (15 lines)
config75% (15 lines)
config/manager18% (14 lines)
pkg/webhook_utilities0% (0 lines)
pkg/cloud0% (0 lines)
pkg/mocks0% (0 lines)
hack/debugging0% (0 lines)
ROOT0% (0 lines)
config/certmanager0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 95 duplicates...
Size#FoldersFilesLinesCode
66 x 2 templates
templates
cluster-template-managed-ssh.yaml
cluster-template.yaml
1:66 (56%)
1:66 (57%)
view
64 x 2 templates
templates
cluster-template-ssh-material.yaml
cluster-template.yaml
55:118 (51%)
50:113 (55%)
view
49 x 2 templates
templates
cluster-template-managed-ssh.yaml
cluster-template-ssh-material.yaml
1:49 (41%)
1:49 (39%)
view
49 x 2 templates
templates
cluster-template-ssh-material.yaml
cluster-template.yaml
1:49 (39%)
1:49 (42%)
view
33 x 2 templates
templates
cluster-template-managed-ssh.yaml
cluster-template-ssh-material.yaml
68:100 (28%)
72:104 (26%)
view
33 x 2 templates
templates
cluster-template-managed-ssh.yaml
cluster-template.yaml
68:100 (28%)
67:99 (28%)
view
17 x 2 templates
templates
cluster-template-managed-ssh.yaml
cluster-template-ssh-material.yaml
50:66 (14%)
55:71 (13%)
view
17 x 2 config/webhook
config/webhook
manifests.yaml
manifests.yaml
17:33 (14%)
64:80 (14%)
view
16 x 2 templates
templates
cluster-template-managed-ssh.yaml
cluster-template.yaml
102:117 (13%)
100:115 (13%)
view
15 x 2 config/rbac
config/rbac
cloudstackcluster_editor_role.yaml
role.yaml
7:21 (65%)
46:60 (15%)
view
15 x 2 config/dev
config
insecure_manager.yaml
insecure_manager.yaml
1:15 (100%)
1:15 (100%)
view
15 x 2 config/rbac
config/rbac
cloudstackmachine_editor_role.yaml
role.yaml
7:21 (65%)
72:86 (15%)
view
14 x 2 config/crd/bases
config/crd/bases
infrastructure.cluster.x-k8s.io_cloud...
infrastructure.cluster.x-k8s.io_cloud...
23:36 (11%)
48:61 (9%)
view
14 x 2 templates
templates
cluster-template-managed-ssh.yaml
cluster-template-ssh-material.yaml
102:115 (11%)
105:118 (11%)
view
14 x 2 config/crd/bases
config/crd/bases
infrastructure.cluster.x-k8s.io_cloud...
infrastructure.cluster.x-k8s.io_cloud...
23:36 (11%)
24:37 (12%)
view
14 x 2 config/crd/bases
config/crd/bases
infrastructure.cluster.x-k8s.io_cloud...
infrastructure.cluster.x-k8s.io_cloud...
48:61 (9%)
24:37 (12%)
view
13 x 2 config/crd/bases
config/crd/bases
infrastructure.cluster.x-k8s.io_cloud...
infrastructure.cluster.x-k8s.io_cloud...
62:74 (10%)
77:89 (8%)
view
12 x 2 config/crd/bases
config/crd/bases
infrastructure.cluster.x-k8s.io_cloud...
infrastructure.cluster.x-k8s.io_cloud...
112:123 (9%)
104:115 (10%)
view
12 x 2 config/crd/bases
config/crd/bases
infrastructure.cluster.x-k8s.io_cloud...
infrastructure.cluster.x-k8s.io_cloud...
140:151 (8%)
104:115 (10%)
view
12 x 2 config/crd/bases
config/crd/bases
infrastructure.cluster.x-k8s.io_cloud...
infrastructure.cluster.x-k8s.io_cloud...
63:74 (8%)
49:60 (10%)
view