kubernetes / ingress-nginx
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
  • 33% duplication:
    • 22,452 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,410 duplicated lines
  • 6,804 duplicates
system33% (7,410 lines)
Duplication per Extension
yaml80% (7,006 lines)
go1% (211 lines)
lua9% (186 lines)
tpl3% (7 lines)
Duplication per Component (primary)
deploy/static98% (5,257 lines)
charts/ingress-nginx50% (1,509 lines)
rootfs/etc9% (186 lines)
internal/ingress1% (114 lines)
images/kube-webhook-certgen11% (54 lines)
cmd/plugin4% (42 lines)
cmd/dbg25% (37 lines)
images/nginx50% (33 lines)
images/go-grpc-greeter-server100% (21 lines)
images/httpbin100% (21 lines)
images/opentelemetry100% (21 lines)
images/cfssl100% (20 lines)
images/fastcgi-helloserver60% (20 lines)
images/test-runner95% (19 lines)
images/echo95% (19 lines)
images/custom-error-pages13% (19 lines)
internal/admission14% (12 lines)
internal/net1% (6 lines)
cmd/waitshutdown0% (0 lines)
cmd/nginx0% (0 lines)
ROOT0% (0 lines)
version0% (0 lines)
internal/task0% (0 lines)
internal/runtime0% (0 lines)
internal/nginx0% (0 lines)
internal/file0% (0 lines)
internal/k8s0% (0 lines)
internal/watch0% (0 lines)
internal/sets0% (0 lines)
deploy/prometheus0% (0 lines)
deploy/grafana0% (0 lines)
hack/manifest-templates0% (0 lines)
hack/boilerplate0% (0 lines)
hack0% (0 lines)

Duplication Between Components (50+ lines)

G charts/ingress-nginx charts/ingress-nginx deploy/static deploy/static charts/ingress-nginx--deploy/static 1387

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 6,804 duplicates...
Size#FoldersFilesLinesCode
415 x 2 deploy/static/provider/baremetal
deploy/static/provider/kind
deploy.yaml
deploy.yaml
2:416 (63%)
2:416 (61%)
view
351 x 2 deploy/static/provider/baremetal
deploy/static/provider/cloud
deploy.yaml
deploy.yaml
2:352 (53%)
2:352 (53%)
view
351 x 2 deploy/static/provider/cloud
deploy/static/provider/kind
deploy.yaml
deploy.yaml
2:352 (53%)
2:352 (52%)
view
342 x 2 deploy/static/provider/do
deploy/static/provider/scw
deploy.yaml
deploy.yaml
2:343 (51%)
2:343 (51%)
view
341 x 2 deploy/static/provider/aws
deploy/static/provider/exoscale
deploy.yaml
deploy.yaml
2:342 (51%)
2:342 (51%)
view
340 x 2 deploy/static/provider/aws
deploy/static/provider/kind
deploy.yaml
deploy.yaml
2:341 (51%)
2:341 (50%)
view
340 x 2 deploy/static/provider/exoscale
deploy/static/provider/kind
deploy.yaml
deploy.yaml
2:341 (50%)
2:341 (50%)
view
340 x 2 deploy/static/provider/baremetal
deploy/static/provider/exoscale
deploy.yaml
deploy.yaml
2:341 (51%)
2:341 (50%)
view
340 x 2 deploy/static/provider/aws
deploy/static/provider/baremetal
deploy.yaml
deploy.yaml
2:341 (51%)
2:341 (51%)
view
340 x 2 deploy/static/provider/cloud
deploy/static/provider/exoscale
deploy.yaml
deploy.yaml
2:341 (51%)
2:341 (50%)
view
340 x 2 deploy/static/provider/aws
deploy/static/provider/cloud
deploy.yaml
deploy.yaml
2:341 (51%)
2:341 (51%)
view
325 x 2 deploy/static/provider/a...lb-with-tls-termination
deploy/static/provider/scw
deploy.yaml
deploy.yaml
2:326 (48%)
2:326 (49%)
view
325 x 2 deploy/static/provider/exoscale
deploy/static/provider/scw
deploy.yaml
deploy.yaml
2:326 (48%)
2:326 (49%)
view
325 x 2 deploy/static/provider/cloud
deploy/static/provider/scw
deploy.yaml
deploy.yaml
2:326 (49%)
2:326 (49%)
view
325 x 2 deploy/static/provider/baremetal
deploy/static/provider/scw
deploy.yaml
deploy.yaml
2:326 (49%)
2:326 (49%)
view
325 x 2 deploy/static/provider/kind
deploy/static/provider/scw
deploy.yaml
deploy.yaml
2:326 (48%)
2:326 (49%)
view
325 x 2 deploy/static/provider/aws
deploy/static/provider/scw
deploy.yaml
deploy.yaml
2:326 (49%)
2:326 (49%)
view
325 x 2 deploy/static/provider/do
deploy/static/provider/kind
deploy.yaml
deploy.yaml
2:326 (49%)
2:326 (48%)
view
325 x 2 deploy/static/provider/a...lb-with-tls-termination
deploy/static/provider/cloud
deploy.yaml
deploy.yaml
2:326 (48%)
2:326 (49%)
view
325 x 2 deploy/static/provider/do
deploy/static/provider/exoscale
deploy.yaml
deploy.yaml
2:326 (49%)
2:326 (48%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 2 rootfs/etc/nginx/lua
rootfs/etc/nginx/lua
lua
balancer.lua
tcp_udp_balancer.lua
353:364 
200:211 
view