aws-ia / terraform-adobe-magento
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:
    • 3,046 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 584 duplicated lines
  • 176 duplicates
system19% (584 lines)
Duplication per Extension
tf19% (584 lines)
Duplication per Component (primary)
modules/magento23% (157 lines)
modules/services19% (111 lines)
modules/base14% (88 lines)
modules/magento-ami33% (79 lines)
modules/varnish-ami69% (71 lines)
ROOT14% (52 lines)
deploy8% (20 lines)
modules/acm17% (6 lines)
userdata0% (0 lines)
setup_workspace0% (0 lines)
modules/account0% (0 lines)
modules/ssm0% (0 lines)

Duplication Between Components (50+ lines)

G modules/magento-ami modules/magento-ami modules/varnish-ami modules/varnish-ami modules/magento-ami--modules/varnish-ami 131 modules/magento modules/magento modules/services modules/services modules/magento--modules/services 100 modules/base modules/base modules/base--modules/magento-ami 72 modules/base--modules/magento 72 modules/base--modules/services 66 modules/acm modules/acm modules/acm--modules/base 60

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 176 duplicates...
Size#FoldersFilesLinesCode
16 x 2 modules/magento-ami
modules/varnish-ami
variables.tf
variables.tf
4:22 (42%)
4:22 (53%)
view
15 x 2 modules/magento-ami
modules/varnish-ami
variables.tf
variables.tf
35:56 (39%)
22:43 (50%)
view
12 x 2 modules/magento-ami
modules/varnish-ami
ec2.tf
ec2.tf
19:33 (21%)
20:34 (23%)
view
10 x 2 modules/magento
modules/magento
securitygroups.tf
securitygroups.tf
37:48 (15%)
62:72 (15%)
view
10 x 2 modules/services
modules/services
securitygroups.tf
securitygroups.tf
67:76 (9%)
78:87 (9%)
view
10 x 2 modules/services
modules/services
redis.tf
redis.tf
31:42 (16%)
58:69 (16%)
view
10 x 2 modules/magento
modules/magento
alb_and_asg.tf
alb_and_asg.tf
226:236 (2%)
306:316 (2%)
view
9 x 2 modules/magento
modules/magento
alb_and_asg.tf
alb_and_asg.tf
348:357 (2%)
401:410 (2%)
view
9 x 2 ROOT
ROOT
main.tf
main.tf
115:124 (6%)
132:141 (6%)
view
9 x 2 modules/magento-ami
ROOT
variables.tf
variables.tf
22:35 (23%)
143:153 (5%)
view
9 x 2 modules/magento-ami
modules/varnish-ami
ec2.tf
ec2.tf
38:50 (16%)
37:48 (17%)
view
8 x 2 modules/services
modules/services
securitygroups.tf
securitygroups.tf
38:45 (7%)
47:54 (7%)
view
8 x 2 modules/services
modules/services
securitygroups.tf
securitygroups.tf
9:16 (7%)
18:25 (7%)
view
8 x 2 modules/base
modules/base
securitygroups.tf
securitygroups.tf
12:20 (4%)
59:67 (4%)
view
8 x 2 modules/magento-ami
modules/varnish-ami
securitygroups.tf
securitygroups.tf
5:13 (44%)
5:13 (44%)
view
7 x 2 modules/services
modules/services
securitygroups.tf
securitygroups.tf
81:87 (6%)
106:112 (6%)
view
7 x 2 modules/magento-ami
modules/varnish-ami
ec2.tf
ec2.tf
40:47 (12%)
25:31 (13%)
view
7 x 2 modules/varnish-ami
modules/varnish-ami
ec2.tf
ec2.tf
25:31 (13%)
39:46 (13%)
view
7 x 2 modules/magento-ami
modules/varnish-ami
ec2.tf
ec2.tf
24:30 (12%)
39:46 (13%)
view
7 x 2 modules/services
modules/services
securitygroups.tf
securitygroups.tf
20:27 (6%)
49:56 (6%)
view