aws-cloudformation / aws-cloudformation-samples
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
  • 16% duplication:
    • 2,183 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 371 duplicated lines
  • 36 duplicates
system16% (371 lines)
Duplication per Extension
py25% (168 lines)
yml9% (86 lines)
ts22% (66 lines)
yaml17% (51 lines)
Duplication per Component (primary)
resource-types/awssamples-ec2-importkeypair/python/src/awssamples_ec2_importkeypair25% (168 lines)
modules/VpcWizard/src10% (69 lines)
resource-types/typescript-example-website-monitor/src22% (66 lines)
resource-types/typescript-example-website-monitor27% (22 lines)
resource-types/awssamples-ec2-importkeypair/python40% (22 lines)
modules/ApiGatewayCustomDomain9% (17 lines)
modules/ACMCertNotifyExpiry4% (7 lines)
modules/S3BucketBlog0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 36 duplicates...
Size#FoldersFilesLinesCode
22 x 2 resource-types/awssamples-ec2-importkeypair/python
resource-types/typescript-example-website-monitor
resource-role.yaml
resource-role.yaml
1:23 (64%)
1:23 (73%)
view
22 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
78:103 (3%)
156:184 (3%)
view
18 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
127:144 (3%)
192:209 (3%)
view
17 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
193:209 (2%)
264:280 (2%)
view
17 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
128:144 (2%)
264:280 (2%)
view
15 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
263:277 (2%)
366:380 (2%)
view
15 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
192:206 (2%)
320:334 (2%)
view
15 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
321:335 (2%)
367:381 (2%)
view
15 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
127:141 (2%)
320:334 (2%)
view
14 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
264:277 (2%)
321:334 (2%)
view
14 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
128:141 (2%)
367:380 (2%)
view
14 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
193:206 (2%)
367:380 (2%)
view
10 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
160:171 (1%)
225:236 (1%)
view
10 x 2 resource-types/awssample...mples_ec2_importkeypair
resource-types/awssample...mples_ec2_importkeypair
handlers.py
handlers.py
82:93 (1%)
225:236 (1%)
view
9 x 2 resource-types/typescrip...ple-website-monitor/src
resource-types/typescrip...ple-website-monitor/src
handlers.ts
handlers.ts
247:257 (4%)
287:296 (4%)
view
9 x 2 modules/VpcWizard/src
modules/VpcWizard/src
vpc.yml
vpc.yml
648:656 (1%)
664:672 (1%)
view
9 x 2 modules/VpcWizard/src
modules/VpcWizard/src
vpc.yml
vpc.yml
547:555 (1%)
630:638 (1%)
view
9 x 2 resource-types/typescrip...ple-website-monitor/src
resource-types/typescrip...ple-website-monitor/src
handlers.ts
handlers.ts
106:118 (4%)
193:205 (4%)
view
9 x 2 modules/VpcWizard/src
modules/VpcWizard/src
vpc.yml
vpc.yml
664:672 (1%)
680:688 (1%)
view
9 x 2 modules/VpcWizard/src
modules/VpcWizard/src
vpc.yml
vpc.yml
648:656 (1%)
680:688 (1%)
view