GerritCodeReview / k8s-gerrit
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
  • 54% duplication:
    • 11,627 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 6,373 duplicated lines
  • 1,610 duplicates
system54% (6,373 lines)
Duplication per Extension
yaml57% (6,345 lines)
tpl77% (28 lines)
Duplication per Component (primary)
istio/src60% (4,587 lines)
helm-charts/gerrit-replica/templates52% (819 lines)
helm-charts/gerrit/templates58% (433 lines)
helm-charts/gerrit-replica54% (138 lines)
istio21% (122 lines)
helm-charts/gerrit67% (113 lines)
supplements60% (99 lines)
helm-charts/gerrit/supplements100% (31 lines)
helm-charts/gerrit-replica/supplements100% (31 lines)
ROOT0% (0 lines)
container-images/gerrit-init/tools0% (0 lines)
container-images/gerrit-init/config0% (0 lines)

Duplication Between Components (50+ lines)

G helm-charts/gerrit-replica/templates helm-charts/gerrit-replica/templates helm-charts/gerrit/templates helm-charts/gerrit/templates helm-charts/gerrit-replica/templates--helm-charts/gerrit/templates 670 helm-charts/gerrit-replica helm-charts/gerrit-replica helm-charts/gerrit helm-charts/gerrit helm-charts/gerrit-replica--helm-charts/gerrit 249 supplements supplements helm-charts/gerrit-replica--supplements 60 helm-charts/gerrit--supplements 50 istio istio istio/src istio/src istio--istio/src 142 helm-charts/gerrit-replica/supplements helm-charts/gerrit-replica/supplements helm-charts/gerrit/supplements helm-charts/gerrit/supplements helm-charts/gerrit-replica/supplements--helm-charts/gerrit/supplements 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 1,610 duplicates...
Size#FoldersFilesLinesCode
224 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
73:296 (19%)
829:1052 (19%)
view
98 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
658:755 (8%)
884:981 (8%)
view
98 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
128:225 (8%)
658:755 (8%)
view
76 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
367:442 (6%)
894:969 (6%)
view
76 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
138:213 (6%)
367:442 (6%)
view
76 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
367:442 (6%)
668:743 (6%)
view
72 x 2 istio/src
istio/src
httpapispecs.config.istio.io-crd.yaml
httpapispecs.config.istio.io-crd.yaml
93:164 (26%)
180:251 (26%)
view
68 x 2 istio/src
istio/src
servicerolebindings.rbac.istio.io-crd...
serviceroles.rbac.istio.io-crd.yaml
48:115 (33%)
36:103 (60%)
view
67 x 2 istio/src
istio/src
sidecars.networking.istio.io-crd.yaml
sidecars.networking.istio.io-crd.yaml
51:117 (19%)
233:299 (19%)
view
64 x 2 istio/src
istio/src
clusterrbacconfigs.rbac.istio.io-crd....
rbacconfigs.rbac.istio.io-crd.yaml
25:88 (72%)
26:89 (71%)
view
50 x 2 istio/src
istio/src
kiali-cr.yaml
kiali-viewer-cr.yaml
7:56 (75%)
5:54 (79%)
view
40 x 2 istio/src
istio/src
virtualservices.networking.istio.io-c...
virtualservices.networking.istio.io-c...
222:261 (4%)
606:645 (4%)
view
37 x 2 istio/src
istio/src
httpapispecbindings.config.istio.io-c...
quotaspecbindings.config.istio.io-crd...
59:95 (38%)
46:82 (45%)
view
36 x 2 istio/src
istio/src
istio-ingressgateway-deployment.yaml
prometheus-deployment.yaml
31:66 (17%)
21:56 (21%)
view
35 x 2 istio/src
istio/src
virtualservices.networking.istio.io-c...
virtualservices.networking.istio.io-c...
694:728 (4%)
767:801 (4%)
view
35 x 2 istio/src
istio/src
kiali-deployment.yaml
prometheus-deployment.yaml
26:60 (31%)
21:55 (20%)
view
35 x 2 istio/src
istio/src
istio-ingressgateway-deployment.yaml
kiali-deployment.yaml
31:65 (16%)
26:60 (31%)
view
34 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
568:601 (2%)
1058:1091 (2%)
view
33 x 2 istio/src
istio/src
destinationrules.networking.istio.io-...
destinationrules.networking.istio.io-...
558:590 (2%)
1083:1115 (2%)
view
32 x 2 helm-charts/gerrit-replica/templates
helm-charts/gerrit-replica/templates
gerrit-replica.deployment.yaml
git-backend.deployment.yaml
32:63 (9%)
29:60 (25%)
view