facebookincubator / dhcplb
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
  • 5% duplication:
    • 1,179 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 60 duplicated lines
  • 5 duplicates
system5% (60 lines)
Duplication per Extension
go4% (42 lines)
erb39% (18 lines)
Duplication per Component (primary)
lib4% (42 lines)
vagrant/chef/cookbooks/dhcprelay/templates31% (6 lines)
vagrant/chef/cookbooks/dhcplb/templates85% (6 lines)
vagrant/chef/cookbooks/dhcpserver/templates30% (6 lines)
ROOT0% (0 lines)
vagrant/chef/roles0% (0 lines)
vagrant/chef/cookbooks/dhcprelay/recipes0% (0 lines)
vagrant/chef/cookbooks/dhcprelay0% (0 lines)
vagrant/chef/cookbooks/dhcpserver/recipes0% (0 lines)
vagrant/chef/cookbooks/dhcpserver0% (0 lines)
vagrant/chef/cookbooks/dhcpclient/recipes0% (0 lines)
vagrant/chef/cookbooks/dhcpclient0% (0 lines)
vagrant/chef/cookbooks/dhcplb/recipes0% (0 lines)
vagrant/chef/cookbooks/dhcplb0% (0 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
13 x 2 lib
lib
48:61 (21%)
76:89 (21%)
view
8 x 2 lib
lib
217:226 (3%)
334:343 (3%)
view
6 x 2 vagrant/chef/cookbooks/dhcplb/templates/default
vagrant/chef/cookbooks/dhcprelay/templates/default
1:7 (85%)
1:7 (31%)
view
6 x 2 vagrant/chef/cookbooks/dhcprelay/templates/default
vagrant/chef/cookbooks/d...erver/templates/default
1:7 (31%)
1:7 (30%)
view
6 x 2 vagrant/chef/cookbooks/dhcplb/templates/default
vagrant/chef/cookbooks/d...erver/templates/default
1:7 (85%)
1:7 (30%)
view