aws / aws-app-mesh-controller-for-k8s
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
  • 43% duplication:
    • 20,649 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 9,051 duplicated lines
  • 2,275 duplicates
system43% (9,051 lines)
Duplication per Extension
yaml82% (7,446 lines)
go14% (1,605 lines)
Duplication per Component (primary)
config/crd88% (3,527 lines)
config/helm81% (3,343 lines)
apis/appmesh18% (514 lines)
config/rbac69% (361 lines)
pkg/conversions21% (282 lines)
pkg/inject15% (212 lines)
config/webhook63% (189 lines)
pkg/cloudmap8% (85 lines)
webhooks/appmesh11% (76 lines)
pkg/virtualservice21% (75 lines)
pkg/virtualgateway19% (68 lines)
pkg/virtualrouter13% (63 lines)
pkg/virtualnode22% (63 lines)
pkg/gatewayroute16% (52 lines)
pkg/webhook30% (40 lines)
mocks/aws-app-mesh-controller-for-k8s15% (33 lines)
pkg/mesh9% (30 lines)
config/default18% (18 lines)
pkg/k8s3% (12 lines)
config/controller12% (8 lines)
pkg/aws0% (0 lines)
pkg/runtime0% (0 lines)
pkg/references0% (0 lines)
pkg/equality0% (0 lines)
pkg/version0% (0 lines)
pkg/algorithm0% (0 lines)
controllers/appmesh0% (0 lines)
hack/api-docs0% (0 lines)
config/certmanager0% (0 lines)
config/prometheus0% (0 lines)
ROOT0% (0 lines)
webhooks/core0% (0 lines)
mocks/apimachinery0% (0 lines)
scripts0% (0 lines)

Duplication Between Components (50+ lines)

G config/crd config/crd config/helm config/helm config/crd--config/helm 4571 config/webhook config/webhook config/helm--config/webhook 160 pkg/virtualrouter pkg/virtualrouter pkg/virtualservice pkg/virtualservice pkg/virtualrouter--pkg/virtualservice 126 pkg/gatewayroute pkg/gatewayroute pkg/gatewayroute--pkg/virtualrouter 64 pkg/gatewayroute--pkg/virtualservice 88 pkg/virtualnode pkg/virtualnode pkg/gatewayroute--pkg/virtualnode 104 pkg/virtualgateway pkg/virtualgateway pkg/gatewayroute--pkg/virtualgateway 88 pkg/virtualnode--pkg/virtualrouter 78 pkg/virtualnode--pkg/virtualservice 102 pkg/virtualgateway--pkg/virtualrouter 78 pkg/virtualgateway--pkg/virtualservice 102 pkg/virtualgateway--pkg/virtualnode 102 pkg/mesh pkg/mesh pkg/mesh--pkg/virtualgateway 60

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 2,275 duplicates...
Size#FoldersFilesLinesCode
274 x 2 config/crd/bases
config/crd/bases
appmesh.k8s.aws_virtualrouters.yaml
appmesh.k8s.aws_virtualrouters.yaml
353:626 (26%)
630:903 (26%)
view
249 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
2578:2826 (7%)
2829:3077 (7%)
view
226 x 2 config/crd/bases
config/crd/bases
appmesh.k8s.aws_gatewayroutes.yaml
appmesh.k8s.aws_gatewayroutes.yaml
212:437 (30%)
440:665 (30%)
view
196 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
178:373 (5%)
376:571 (5%)
view
109 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
1411:1519 (3%)
1531:1639 (3%)
view
95 x 2 config/crd/bases
config/helm/appmesh-controller/crds
appmesh.k8s.aws_virtualrouters.yaml
crds.yaml
509:603 (9%)
2710:2804 (2%)
view
95 x 2 config/crd/bases
config/helm/appmesh-controller/crds
appmesh.k8s.aws_virtualrouters.yaml
crds.yaml
786:880 (9%)
2710:2804 (2%)
view
95 x 2 config/crd/bases
config/helm/appmesh-controller/crds
appmesh.k8s.aws_virtualrouters.yaml
crds.yaml
509:603 (9%)
2961:3055 (2%)
view
95 x 2 config/crd/bases
config/helm/appmesh-controller/crds
appmesh.k8s.aws_virtualrouters.yaml
crds.yaml
786:880 (9%)
2961:3055 (2%)
view
85 x 2 config/crd/bases
config/helm/appmesh-controller/crds
appmesh.k8s.aws_virtualrouters.yaml
crds.yaml
242:326 (8%)
2469:2553 (2%)
view
55 x 2 config/crd/bases
config/crd/bases
appmesh.k8s.aws_virtualrouters.yaml
appmesh.k8s.aws_virtualrouters.yaml
112:166 (5%)
630:684 (5%)
view
55 x 2 config/crd/bases
config/crd/bases
appmesh.k8s.aws_virtualrouters.yaml
appmesh.k8s.aws_virtualrouters.yaml
112:166 (5%)
353:407 (5%)
view
54 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
114:167 (1%)
2408:2461 (1%)
view
54 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
252:305 (1%)
2624:2677 (1%)
view
54 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
252:305 (1%)
2875:2928 (1%)
view
54 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
450:503 (1%)
2624:2677 (1%)
view
54 x 2 config/helm/appmesh-controller/crds
config/helm/appmesh-controller/crds
crds.yaml
crds.yaml
450:503 (1%)
2875:2928 (1%)
view
51 x 2 config/crd/bases
config/helm/appmesh-controller/crds
appmesh.k8s.aws_virtualrouters.yaml
crds.yaml
953:1003 (4%)
3115:3165 (1%)
view
47 x 2 config/crd/bases
config/crd/bases
appmesh.k8s.aws_virtualrouters.yaml
appmesh.k8s.aws_virtualrouters.yaml
116:162 (4%)
919:965 (4%)
view
47 x 2 config/crd/bases
config/crd/bases
appmesh.k8s.aws_virtualrouters.yaml
appmesh.k8s.aws_virtualrouters.yaml
634:680 (4%)
919:965 (4%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 28 unit duplicates...
Size#FoldersFilesLinesCode
27 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
513:540 
1300:1327 
view
18 x 2 pkg/conversions
pkg/conversions
virtualnode_types_conversion.go
virtualnode_types_conversion.go
343:362 
364:383 
view
18 x 2 webhooks/appmesh
webhooks/appmesh
gatewayroute_validator.go
gatewayroute_validator.go
126:144 
146:164 
view
17 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
2567:2584 
2817:2834 
view
16 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
605:621 
1650:1666 
view
13 x 4 pkg/virtualservice
pkg/virtualgateway
pkg/gatewayroute
pkg/virtualnode
resource_manager.go
resource_manager.go
resource_manager.go
resource_manager.go
37:50 
34:48 
37:51 
35:49 
view
12 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
553:565 
1275:1287 
view
12 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
972:984 
1201:1213 
view
12 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
1340:1352 
2357:2369 
view
12 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
2990:3002 
3556:3568 
view
10 x 2 pkg/inject
pkg/inject
sidecar_builder.go
sidecar_builder.go
315:325 
337:347 
view
10 x 2 pkg/virtualservice
pkg/virtualrouter
resource_manager.go
resource_manager.go
156:166 
160:170 
view
10 x 2 webhooks/appmesh
webhooks/appmesh
gatewayroute_validator.go
virtualrouter_validator.go
309:322 
70:82 
view
9 x 2 pkg/inject
pkg/inject
envoy.go
virtualgateway_envoy.go
160:169 
146:155 
view
9 x 2 pkg/cloudmap
pkg/virtualnode
resource_manager.go
resource_manager.go
168:177 
115:124 
view
9 x 2 pkg/conversions
pkg/conversions
virtualgateway_types_conversion.go
virtualnode_types_conversion.go
150:159 
184:193 
view
9 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
434:443 
1179:1188 
view
8 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
1507:1515 
2034:2042 
view
7 x 2 pkg/mesh
pkg/virtualgateway
members_finalizer.go
members_finalizer.go
27:34 
27:34 
view
7 x 2 apis/appmesh/v1beta2
apis/appmesh/v1beta2
zz_generated.deepcopy.go
zz_generated.deepcopy.go
711:718 
1825:1832 
view