aws / amazon-vpc-cni-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
  • 57% duplication:
    • 23,711 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 13,723 duplicated lines
  • 2,611 duplicates
system57% (13,723 lines)
Duplication per Extension
yaml95% (13,306 lines)
go3% (355 lines)
jsonnet16% (62 lines)
Duplication per Component (primary)
config/master93% (6,422 lines)
charts/aws-calico96% (4,958 lines)
config/multus99% (1,728 lines)
charts/aws-vpc-cni41% (235 lines)
pkg/awsutils4% (104 lines)
pkg/networkutils7% (59 lines)
rpc10% (56 lines)
pkg/ipamd2% (52 lines)
charts/cni-metrics-helper17% (25 lines)
pkg/netlinkwrapper7% (24 lines)
cmd/routed-eni-cni-plugin2% (19 lines)
cmd/cni-metrics-helper3% (18 lines)
pkg/k8sapi21% (12 lines)
pkg/cri14% (11 lines)
pkg/publisher0% (0 lines)
pkg/rpcwrapper0% (0 lines)
pkg/procsyswrapper0% (0 lines)
pkg/ec2metadatawrapper0% (0 lines)
pkg/ipwrapper0% (0 lines)
pkg/eniconfig0% (0 lines)
pkg/nswrapper0% (0 lines)
pkg/cninswrapper0% (0 lines)
pkg/grpcwrapper0% (0 lines)
pkg/ec2wrapper0% (0 lines)
pkg/apis0% (0 lines)
pkg/utils0% (0 lines)
pkg/typeswrapper0% (0 lines)
pkg/version0% (0 lines)
rpc/mocks0% (0 lines)
cmd/egress-v4-cni-plugin0% (0 lines)
cmd/grpc-health-probe0% (0 lines)
cmd/aws-k8s-agent0% (0 lines)
scripts0% (0 lines)

Duplication Between Components (50+ lines)

G charts/aws-calico charts/aws-calico config/master config/master charts/aws-calico--config/master 10013 config/multus config/multus charts/aws-calico--config/multus 234 config/master--config/multus 374 charts/aws-vpc-cni charts/aws-vpc-cni charts/aws-vpc-cni--config/master 310 charts/cni-metrics-helper charts/cni-metrics-helper charts/cni-metrics-helper--config/master 95

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,611 duplicates...
Size#FoldersFilesLinesCode
1432 x 2 charts/aws-calico/templates/crds
config/master
operator.tigera.io_installations_crd....
calico-operator.yaml
1:1432 (99%)
3288:4719 (27%)
view
729 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_networkpolicies...
calico-operator.yaml
22:750 (97%)
2506:3234 (14%)
view
675 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_globalnetworkpo...
calico-operator.yaml
22:696 (96%)
982:1656 (13%)
view
662 x 2 config/master
config/master
calico-operator.yaml
calico-operator.yaml
1003:1664 (12%)
2516:3177 (12%)
view
662 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_networkpolicies...
calico-operator.yaml
32:693 (88%)
1003:1664 (12%)
view
654 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_globalnetworkpo...
calico-operator.yaml
43:696 (93%)
2516:3169 (12%)
view
654 x 2 charts/aws-calico/templates/crds
charts/aws-calico/templates/crds
crd.projectcalico.org_globalnetworkpo...
crd.projectcalico.org_networkpolicies...
43:696 (93%)
32:685 (87%)
view
538 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_felixconfigurat...
calico-operator.yaml
1:538 (99%)
409:946 (10%)
view
329 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_networkpolicies...
calico-operator.yaml
34:362 (43%)
2849:3177 (6%)
view
329 x 2 charts/aws-calico/templates/crds
charts/aws-calico/templates/crds
crd.projectcalico.org_networkpolicies...
crd.projectcalico.org_networkpolicies...
34:362 (43%)
365:693 (43%)
view
329 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_networkpolicies...
calico-operator.yaml
365:693 (43%)
2518:2846 (6%)
view
329 x 2 config/master
config/master
calico-operator.yaml
calico-operator.yaml
1336:1664 (6%)
2518:2846 (6%)
view
329 x 2 charts/aws-calico/templates/crds
charts/aws-calico/templates/crds
crd.projectcalico.org_globalnetworkpo...
crd.projectcalico.org_networkpolicies...
45:373 (47%)
365:693 (43%)
view
329 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_networkpolicies...
calico-operator.yaml
365:693 (43%)
1005:1333 (6%)
view
329 x 2 config/master
config/master
calico-operator.yaml
calico-operator.yaml
1005:1333 (6%)
2849:3177 (6%)
view
329 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_globalnetworkpo...
calico-operator.yaml
45:373 (47%)
1336:1664 (6%)
view
329 x 2 config/master
config/master
calico-operator.yaml
calico-operator.yaml
2518:2846 (6%)
2849:3177 (6%)
view
329 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_networkpolicies...
calico-operator.yaml
34:362 (43%)
1336:1664 (6%)
view
329 x 2 config/master
config/master
calico-operator.yaml
calico-operator.yaml
1005:1333 (6%)
1336:1664 (6%)
view
329 x 2 charts/aws-calico/templates/crds
config/master
crd.projectcalico.org_globalnetworkpo...
calico-operator.yaml
45:373 (47%)
2849:3177 (6%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 pkg/awsutils
pkg/awsutils
imds.go
imds.go
291:305 
308:322 
view
6 x 2 pkg/awsutils/mocks
pkg/awsutils/mocks
awsutils_mocks.go
awsutils_mocks.go
355:361 
370:376 
view
6 x 2 pkg/ec2metadatawrapper/mocks
pkg/ec2metadatawrapper/mocks
ec2metadatawrapper_mocks.go
ec2metadatawrapper_mocks.go
52:58 
105:111 
view
6 x 2 pkg/ec2metadatawrapper/mocks
pkg/ec2metadatawrapper/mocks
ec2metadatawrapper_mocks.go
ec2metadatawrapper_mocks.go
67:73 
120:126 
view