aws-samples / amazon-cloudwatch-auto-alarms
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
  • 23% duplication:
    • 1,042 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 244 duplicated lines
  • 24 duplicates
system23% (244 lines)
Duplication per Extension
yaml29% (183 lines)
py14% (61 lines)
Duplication per Component (primary)
ROOT29% (183 lines)
src14% (61 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 24 duplicates...
Size#FoldersFilesLinesCode
20 x 2 ROOT
src
EC2Tagger.yaml
actions.py
38:58 (16%)
15:35 (7%)
view
19 x 2 ROOT
ROOT
CloudWatchAutoAlarms.yaml
EC2Tagger.yaml
59:77 (10%)
100:118 (15%)
view
11 x 2 src
src
cw_auto_alarms.py
cw_auto_alarms.py
75:85 (7%)
114:124 (7%)
view
9 x 2 ROOT
ROOT
CloudWatchAutoAlarms-Config-SNS.yaml
CloudWatchAutoAlarms-SNS.yaml
27:35 (23%)
34:42 (13%)
view
9 x 2 ROOT
ROOT
CloudWatchAutoAlarms-SNS.yaml
CloudWatchAutoAlarms-SNS.yaml
35:43 (13%)
51:59 (13%)
view
9 x 2 src
src
cw_auto_alarms.py
cw_auto_alarms.py
78:86 (6%)
91:99 (6%)
view
9 x 2 src
src
cw_auto_alarms.py
cw_auto_alarms.py
91:99 (6%)
104:112 (6%)
view
9 x 2 src
src
cw_auto_alarms.py
cw_auto_alarms.py
78:86 (6%)
104:112 (6%)
view
8 x 2 src
src
cw_auto_alarms.py
cw_auto_alarms.py
104:111 (5%)
117:124 (5%)
view
8 x 2 ROOT
ROOT
CloudWatchAutoAlarms-Config-SNS.yaml
CloudWatchAutoAlarms-SNS.yaml
18:25 (20%)
25:32 (11%)
view
8 x 2 ROOT
ROOT
CloudWatchAutoAlarms.yaml
CloudWatchAutoAlarms.yaml
112:119 (4%)
178:185 (4%)
view
8 x 2 ROOT
ROOT
CloudWatchAutoAlarms-Config-SNS.yaml
CloudWatchAutoAlarms-SNS.yaml
28:35 (20%)
51:58 (11%)
view
8 x 2 src
src
cw_auto_alarms.py
cw_auto_alarms.py
91:98 (5%)
117:124 (5%)
view
6 x 2 ROOT
ROOT
EC2Tagger.yaml
ssm-cloudwatch-instance-role.yaml
102:107 (4%)
10:15 (22%)
view
6 x 2 ROOT
ROOT
CloudWatchAutoAlarms-S3.yaml
CloudWatchAutoAlarms-S3.yaml
46:51 (6%)
58:63 (6%)
view
6 x 2 ROOT
ROOT
PublishSNSNotification-SSMAutomation-...
ssm-cloudwatch-instance-role.yaml
14:19 (16%)
10:15 (22%)
view
6 x 2 ROOT
ROOT
CloudWatchAutoAlarms.yaml
ssm-cloudwatch-instance-role.yaml
61:66 (3%)
10:15 (22%)
view
6 x 2 ROOT
ROOT
CloudWatchAutoAlarms.yaml
PublishSNSNotification-SSMAutomation-...
61:66 (3%)
14:19 (16%)
view
6 x 2 ROOT
ROOT
CloudWatchAutoAlarms-S3.yaml
CloudWatchAutoAlarms-S3.yaml
58:63 (6%)
90:95 (6%)
view
6 x 2 ROOT
ROOT
CloudWatchAutoAlarms-S3.yaml
CloudWatchAutoAlarms-SNS.yaml
95:100 (6%)
60:66 (8%)
view