aws / opsworks-cookbooks
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
  • 22% duplication:
    • 13,555 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,062 duplicated lines
  • 207 duplicates
system22% (3,062 lines)
Duplication per Extension
erb38% (2,231 lines)
rb10% (831 lines)
Duplication per Component (primary)
apache251% (1,506 lines)
opsworks_ganglia17% (464 lines)
deploy24% (249 lines)
opsworks_java34% (231 lines)
mod_php5_apache258% (146 lines)
passenger_apache238% (146 lines)
unicorn25% (84 lines)
nginx13% (53 lines)
scm_helper21% (53 lines)
opsworks_nodejs18% (20 lines)
memcached13% (20 lines)
ebs2% (16 lines)
opsworks_custom_cookbooks7% (14 lines)
opsworks_agent_monit7% (12 lines)
mysql2% (12 lines)
ruby10% (11 lines)
opsworks_initial_setup1% (7 lines)
opsworks_postgresql13% (6 lines)
ssh_host_keys19% (6 lines)
opsworks_commons1% (6 lines)
opsworks_bundler0% (0 lines)
ssh_users0% (0 lines)
opsworks_rubygems0% (0 lines)
gem_support0% (0 lines)
agent_version0% (0 lines)
opsworks_cleanup0% (0 lines)
packages0% (0 lines)
opsworks_ecs0% (0 lines)
opsworks_berkshelf0% (0 lines)
s3_file0% (0 lines)
opsworks_cloudwatchlogs0% (0 lines)
php0% (0 lines)
opsworks_stack_state_sync0% (0 lines)
opsworks_shutdown0% (0 lines)
haproxy0% (0 lines)
rails0% (0 lines)
opsworks_aws_flow_ruby0% (0 lines)

Duplication Between Components (50+ lines)

G mod_php5_apache2 mod_php5_apache2 opsworks_java opsworks_java mod_php5_apache2--opsworks_java 278 passenger_apache2 passenger_apache2 mod_php5_apache2--passenger_apache2 150 opsworks_java--passenger_apache2 135

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 207 duplicates...
Size#FoldersFilesLinesCode
72 x 2 apache2/templates/redhat-7
apache2/templates/ubuntu-14.04
apache2.conf.erb
apache2.conf.erb
1:78 (33%)
1:78 (33%)
view
65 x 2 apache2/templates/default/mods
apache2/templates/ubuntu-14.04/mods
mime.conf.erb
mime.conf.erb
1:68 (36%)
1:68 (27%)
view
57 x 2 apache2/templates/default/mods
apache2/templates/ubuntu-14.04/mods
mime.conf.erb
mime.conf.erb
96:153 (31%)
151:208 (24%)
view
56 x 2 opsworks_ganglia/files/default
opsworks_ganglia/templates/default
haproxy.rb
haproxy.rb.erb
36:100 (53%)
34:98 (53%)
view
51 x 2 apache2/templates/redhat-7
apache2/templates/ubuntu-14.04
apache2.conf.erb
apache2.conf.erb
88:147 (23%)
88:147 (23%)
view
49 x 2 apache2/templates/default/mods
apache2/templates/ubuntu-14.04/mods
autoindex.conf.erb
autoindex.conf.erb
18:72 (55%)
14:68 (59%)
view
46 x 2 apache2/templates/redhat-7
apache2/templates/ubuntu-14.04
apache2.conf.erb
apache2.conf.erb
182:237 (21%)
182:237 (21%)
view
44 x 2 mod_php5_apache2/recipes
opsworks_java/recipes
php.rb
web_app.rb
18:66 (75%)
35:84 (68%)
view
40 x 2 mod_php5_apache2/templates/default
opsworks_java/templates/default
web_app.conf.erb
web_app.conf.erb
53:104 (43%)
67:118 (33%)
view
31 x 2 apache2/templates/default/mods
apache2/templates/ubuntu-14.04/mods
mime.conf.erb
mime.conf.erb
155:189 (17%)
211:245 (13%)
view
30 x 2 apache2/templates/default/mods
apache2/templates/ubuntu-14.04/mods
ssl.conf.erb
ssl.conf.erb
3:35 (47%)
3:35 (40%)
view
29 x 2 apache2/templates/default
apache2/templates/redhat-7
apache2.conf.erb
apache2.conf.erb
20:54 (14%)
85:119 (13%)
view
29 x 2 apache2/templates/redhat-7/mods
apache2/templates/ubuntu-14.04/mods
ssl.conf.erb
ssl.conf.erb
48:83 (42%)
54:89 (39%)
view
27 x 2 opsworks_ganglia/recipes
opsworks_ganglia/recipes
client.rb
server.rb
26:59 (23%)
44:77 (31%)
view
27 x 2 apache2/templates/default
apache2/templates/ubuntu-14.04
apache2.conf.erb
apache2.conf.erb
23:54 (13%)
88:119 (12%)
view
27 x 2 apache2/templates/redhat-7/mods
apache2/templates/ubuntu-14.04/mods
ssl.conf.erb
ssl.conf.erb
1:30 (39%)
1:30 (36%)
view
27 x 2 apache2/templates/redhat-7
apache2/templates/ubuntu-14.04
apache2.conf.erb
apache2.conf.erb
151:179 (12%)
151:179 (12%)
view
26 x 2 apache2/templates/default/mods
apache2/templates/redhat-7/mods
ssl.conf.erb
ssl.conf.erb
3:30 (41%)
3:30 (37%)
view
25 x 2 apache2/templates/default
apache2/templates/ubuntu-14.04
web_app.conf.erb
web_app.conf.erb
1:35 (69%)
1:35 (78%)
view
22 x 2 apache2/templates/default/mods
apache2/templates/ubuntu-14.04/mods
setenvif.conf.erb
setenvif.conf.erb
1:24 (91%)
1:24 (81%)
view