kubernetes / examples
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
  • 36% duplication:
    • 5,669 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,089 duplicated lines
  • 225 duplicates
system36% (2,089 lines)
Duplication per Extension
yaml40% (2,065 lines)
go8% (16 lines)
yml13% (8 lines)
Duplication per Component (primary)
staging/volumes40% (479 lines)
staging/storage37% (334 lines)
guestbook/all-in-one93% (210 lines)
staging/elasticsearch51% (147 lines)
guestbook97% (127 lines)
staging/sysdig-cloud79% (100 lines)
volumes/storageos62% (85 lines)
mysql-wordpress-pd44% (84 lines)
staging/spark35% (82 lines)
guestbook/legacy87% (69 lines)
staging/persistent-volume-provisioning31% (54 lines)
staging/podsecuritypolicy32% (48 lines)
volumes/rbd65% (38 lines)
staging/javaweb-tomcat-sidecar68% (34 lines)
staging/nodesjs-mongodb32% (32 lines)
staging/newrelic-infrastructure50% (31 lines)
staging/newrelic44% (31 lines)
volumes/cephfs61% (30 lines)
staging/openshift-origin10% (20 lines)
staging/cockroachdb12% (16 lines)
volumes/iscsi23% (14 lines)
staging/https-nginx8% (8 lines)
staging/sharing-clusters33% (8 lines)
mysql-cinder-pd19% (8 lines)
cassandra0% (0 lines)
cassandra/image0% (0 lines)
cassandra/go0% (0 lines)
cassandra/java0% (0 lines)
guestbook/php-redis0% (0 lines)
guestbook-go/public0% (0 lines)
guestbook-go0% (0 lines)
staging/explorer0% (0 lines)
staging/storm0% (0 lines)
staging0% (0 lines)
staging/cpu-manager0% (0 lines)
staging/cluster-dns0% (0 lines)
staging/cloud-controller-manager0% (0 lines)
staging/javaee0% (0 lines)
volumes/glusterfs0% (0 lines)

Duplication Between Components (50+ lines)

G guestbook/all-in-one guestbook/all-in-one guestbook guestbook guestbook/all-in-one--guestbook 327 guestbook/legacy guestbook/legacy guestbook/all-in-one--guestbook/legacy 162 guestbook/legacy--guestbook 136 staging/volumes staging/volumes volumes/storageos volumes/storageos staging/volumes--volumes/storageos 76 staging/newrelic-infrastructure staging/newrelic-infrastructure staging/newrelic staging/newrelic staging/newrelic-infrastructure--staging/newrelic 62

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 225 duplicates...
Size#FoldersFilesLinesCode
43 x 2 guestbook/all-in-one
guestbook/all-in-one
frontend.yaml
guestbook-all-in-one.yaml
1:52 (100%)
98:149 (31%)
view
31 x 2 guestbook/all-in-one
guestbook/all-in-one
guestbook-all-in-one.yaml
redis-replica.yaml
61:96 (22%)
16:51 (67%)
view
28 x 2 guestbook/all-in-one
guestbook
guestbook-all-in-one.yaml
frontend-deployment.yaml
117:149 (20%)
1:33 (100%)
view
28 x 2 guestbook/all-in-one
guestbook
frontend.yaml
frontend-deployment.yaml
20:52 (65%)
1:33 (100%)
view
27 x 2 guestbook/all-in-one
guestbook
guestbook-all-in-one.yaml
redis-master-deployment.yaml
18:44 (20%)
1:27 (100%)
view
26 x 2 staging/sysdig-cloud
staging/sysdig-cloud
sysdig-daemonset.yaml
sysdig-rc.yaml
17:42 (40%)
12:37 (41%)
view
24 x 2 staging/sysdig-cloud
staging/sysdig-cloud
sysdig-daemonset.yaml
sysdig-rc.yaml
43:76 (37%)
41:78 (38%)
view
23 x 2 staging/volumes/flexvolume
staging/volumes/flexvolume
nginx-lvm.yaml
nginx.yaml
1:23 (100%)
1:23 (100%)
view
22 x 2 staging/storage/rethinkdb
staging/storage/rethinkdb
admin-pod.yaml
rc.yaml
8:29 (75%)
17:38 (57%)
view
20 x 2 guestbook/all-in-one
guestbook/legacy
guestbook-all-in-one.yaml
redis-replica-controller.yaml
72:96 (14%)
10:34 (68%)
view
20 x 2 staging/storage/mysql-galera
staging/storage/mysql-galera
pxc-node1.yaml
pxc-node3.yaml
38:57 (35%)
39:58 (35%)
view
20 x 2 staging/storage/mysql-galera
staging/storage/mysql-galera
pxc-node1.yaml
pxc-node2.yaml
38:57 (35%)
39:58 (35%)
view
20 x 2 staging/storage/mysql-galera
staging/storage/mysql-galera
pxc-node2.yaml
pxc-node3.yaml
39:58 (35%)
39:58 (35%)
view
20 x 2 guestbook/all-in-one
guestbook/legacy
redis-replica.yaml
redis-replica-controller.yaml
27:51 (43%)
10:34 (68%)
view
19 x 2 staging/volumes/azure_di...anaged-disk/managed-ssd
staging/volumes/azure_di...ovisioning/managed-disk
pod-uses-managed-ssd.yaml
pod-uses-existing-managed-disk.yaml
1:19 (90%)
1:19 (82%)
view
19 x 2 guestbook/all-in-one
guestbook
redis-replica.yaml
redis-replica-deployment.yaml
17:35 (41%)
1:19 (63%)
view
19 x 2 volumes/rbd
volumes/rbd
rbd-with-secret.yaml
rbd.yaml
5:23 (76%)
5:23 (73%)
view
19 x 2 guestbook/all-in-one
guestbook
guestbook-all-in-one.yaml
redis-replica-deployment.yaml
62:80 (14%)
1:19 (63%)
view
18 x 2 staging/persistent-volume-provisioning/cinder
staging/persistent-volume-provisioning/rbd
example-pod.yaml
pod.yaml
1:18 (78%)
1:18 (78%)
view
18 x 2 staging/persistent-volume-provisioning/quobyte
staging/persistent-volume-provisioning/rbd
example-pod.yaml
pod.yaml
1:18 (78%)
1:18 (78%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 staging/https-nginx
staging/sharing-clusters
make_secret.go
make_secret.go
46:52 
40:46 
view