aws-samples / amazon-cloudwatch-alarms-controller-for-kubernetes
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
  • 19% duplication:
    • 1,883 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 369 duplicated lines
  • 28 duplicates
system19% (369 lines)
Duplication per Extension
yaml11% (140 lines)
yml27% (117 lines)
tpl50% (56 lines)
py32% (56 lines)
Duplication per Component (primary)
deployment/helm/charts/container-insights14% (132 lines)
deployment/helm/charts/k8s-cloudwatch-adapter29% (103 lines)
deployment68% (48 lines)
deployment/helm/charts/cloudwatch-alarms-operator15% (24 lines)
cwoperator/helpers26% (22 lines)
sample/consumer58% (17 lines)
sample/producer53% (17 lines)
deployment/sample_application3% (6 lines)
cwoperator0% (0 lines)
deployment/helm0% (0 lines)
deployment/eksctl0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 28 duplicates...
Size#FoldersFilesLinesCode
16 x 2 deployment
deployment
cloudwatch_alarm.yml
cloudwatch_alarm.yml
8:23 (22%)
40:55 (22%)
view
14 x 2 deployment/helm/charts/k...watch-adapter/templates
deployment/helm/charts/k...watch-adapter/templates
tpl
_helpers.tpl
_helpers.tpl
23:37 (12%)
83:97 (12%)
view
11 x 2 cwoperator/helpers
cwoperator/helpers
obj_parser.py
obj_parser.py
15:27 (21%)
52:64 (21%)
view
10 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/c...iner-insights/templates
metricsserver.yml
metricsserver.yml
60:69 (5%)
75:84 (5%)
view
9 x 2 sample/consumer
sample/producer
consumer.py
producer.py
20:37 (31%)
25:38 (28%)
view
9 x 2 deployment/helm/charts/c...arms-operator/templates
deployment/helm/charts/c...arms-operator/templates
crds.yaml
crds.yaml
6:14 (21%)
28:36 (21%)
view
8 x 2 deployment/helm/charts/k...watch-adapter/templates
deployment/helm/charts/k...watch-adapter/templates
tpl
_helpers.tpl
_helpers.tpl
41:49 (7%)
101:109 (7%)
view
8 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/c...iner-insights/templates
otlp-config-map.yaml
otlp-config-map.yaml
44:51 (5%)
79:86 (5%)
view
8 x 2 sample/consumer
sample/producer
consumer.py
producer.py
38:47 (27%)
47:55 (25%)
view
8 x 2 deployment
deployment
cloudwatch_alarm.yml
cloudwatch_alarm.yml
27:35 (11%)
59:67 (11%)
view
7 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/k...watch-adapter/templates
metricsserver.yml
rbac.yaml
55:61 (3%)
23:29 (7%)
view
6 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/c...iner-insights/templates
fluent-bit-config-map.yaml
fluent-bit-config-map.yaml
157:163 (2%)
168:174 (2%)
view
6 x 2 deployment/helm/charts/k...watch-adapter/templates
deployment/helm/charts/k...watch-adapter/templates
rbac.yaml
rbac.yaml
11:17 (6%)
44:50 (6%)
view
6 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/k...watch-adapter/templates
metricsserver.yml
rbac.yaml
71:76 (3%)
7:12 (6%)
view
6 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/c...iner-insights/templates
otlp-config-map.yaml
otlp-config-map.yaml
52:57 (4%)
100:105 (4%)
view
6 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/c...iner-insights/templates
metricsserver.yml
metricsserver.yml
24:29 (3%)
44:49 (3%)
view
6 x 2 deployment/helm/charts/k...watch-adapter/templates
deployment/helm/charts/k...watch-adapter/templates
tpl
_helpers.tpl
_helpers.tpl
15:21 (5%)
75:81 (5%)
view
6 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/c...iner-insights/templates
metricsserver.yml
metricsserver.yml
97:102 (3%)
113:118 (3%)
view
6 x 2 deployment/helm/charts/c...iner-insights/templates
deployment/helm/charts/c...iner-insights/templates
fluent-bit-config-map.yaml
fluent-bit-config-map.yaml
62:68 (2%)
157:163 (2%)
view
6 x 2 deployment/helm/charts/k...watch-adapter/templates
deployment/helm/charts/k...watch-adapter/templates
rbac.yaml
rbac.yaml
49:54 (6%)
62:67 (6%)
view