aws-samples / aws-securityhub-automated-remediations-workshop
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
  • 31% duplication:
    • 1,664 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 517 duplicated lines
  • 120 duplicates
system31% (517 lines)
Duplication per Extension
yml31% (517 lines)
Duplication per Component (primary)
module120% (232 lines)
module3100% (162 lines)
module463% (75 lines)
module647% (30 lines)
module543% (10 lines)
module226% (8 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G module3 module3 module6 module6 module3--module6 75 module5 module5 module3--module5 66

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 120 duplicates...
Size#FoldersFilesLinesCode
23 x 2 module4
module4
ec2-public-ingress-s3-readable-kms-de...
ec2-public-ingress.yml
3:25 (53%)
3:26 (79%)
view
21 x 2 module4
module4
ec2-public-ingress-hubfinding.yml
ec2-public-ingress-s3-readable-kms-de...
19:40 (45%)
5:25 (48%)
view
21 x 2 module4
module4
ec2-public-ingress-hubfinding.yml
ec2-public-ingress.yml
19:40 (45%)
5:26 (72%)
view
16 x 2 module3
module3
ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
16:38 (21%)
15:34 (18%)
view
15 x 2 module6
module6
post-ebs-snapshot-public.yml
post-ebs-snapshot-public.yml
3:17 (23%)
33:47 (23%)
view
14 x 2 module3
module3
ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
74:91 (18%)
70:84 (16%)
view
14 x 2 module1
module1
securityhub-remediations-workshop.yml
securityhub-remediations-workshop.yml
661:674 (1%)
690:703 (1%)
view
14 x 2 module1
module1
cloudcustodian-memberrole.yml
securityhub-remediations-workshop.yml
23:36 (10%)
421:434 (1%)
view
14 x 2 module3
module3
ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
39:56 (18%)
37:51 (16%)
view
13 x 2 module3
module3
ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
57:73 (17%)
54:67 (15%)
view
12 x 2 module3
module3
ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
1:13 (15%)
1:12 (13%)
view
11 x 2 module1
module1
cloudcustodian-memberrole.yml
securityhub-remediations-workshop.yml
116:126 (8%)
740:750 (1%)
view
11 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
27:37 (12%)
44:54 (12%)
view
11 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
44:54 (12%)
60:70 (12%)
view
11 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
27:37 (12%)
60:70 (12%)
view
11 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
5:15 (12%)
60:70 (12%)
view
11 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
5:15 (12%)
44:54 (12%)
view
11 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
5:15 (12%)
27:37 (12%)
view
10 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
44:53 (11%)
77:86 (11%)
view
10 x 2 module3
module3
trace-ec2-sechub-custom-actions.yml
trace-ec2-sechub-custom-actions.yml
60:69 (11%)
77:86 (11%)
view