awslabs / logstash-output-amazon_es
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
  • 4% duplication:
    • 2,503 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 117 duplicated lines
  • 15 duplicates
system4% (117 lines)
Duplication per Extension
rb4% (117 lines)
Duplication per Component (primary)
spec/unit32% (54 lines)
spec/unit/outputs8% (45 lines)
spec/unit/outputs/elasticsearch5% (12 lines)
spec/unit/outputs/elasticsearch/http_client2% (6 lines)
ROOT0% (0 lines)
lib/logstash/outputs0% (0 lines)
lib/logstash/outputs/amazon_es/http_client0% (0 lines)
lib/logstash/outputs/amazon_es0% (0 lines)
spec0% (0 lines)
Longest Duplicates
The list of 15 longest duplicates.
See data for all 15 duplicates...
Size#FoldersFilesLinesCode
7 x 2 spec/unit/outputs
spec/unit/outputs
elasticsearch_spec.rb
elasticsearch_spec.rb
464:470 (1%)
519:525 (1%)
view
7 x 2 spec/unit/outputs
spec/unit/outputs
elasticsearch_spec.rb
elasticsearch_spec.rb
464:470 (1%)
501:507 (1%)
view
7 x 2 spec/unit/outputs
spec/unit/outputs
elasticsearch_spec.rb
elasticsearch_spec.rb
501:507 (1%)
519:525 (1%)
view
6 x 2 spec/unit
spec/unit
http_client_builder_spec.rb
http_client_builder_spec.rb
152:157 (3%)
161:166 (3%)
view
6 x 2 spec/unit/outputs/elasticsearch
spec/unit/outputs/elasticsearch
http_client_spec.rb
http_client_spec.rb
136:141 (3%)
151:156 (3%)
view
6 x 2 spec/unit
spec/unit
http_client_builder_spec.rb
http_client_builder_spec.rb
90:95 (3%)
186:191 (3%)
view
6 x 2 spec/unit/outputs
spec/unit/outputs
elasticsearch_spec.rb
elasticsearch_spec.rb
42:47 (1%)
465:470 (1%)
view
6 x 2 spec/unit
spec/unit
http_client_builder_spec.rb
http_client_builder_spec.rb
90:95 (3%)
138:143 (3%)
view
6 x 2 spec/unit
spec/unit
http_client_builder_spec.rb
http_client_builder_spec.rb
138:143 (3%)
186:191 (3%)
view
6 x 2 spec/unit/outputs
spec/unit/outputs
elasticsearch_spec.rb
elasticsearch_spec.rb
157:162 (1%)
171:176 (1%)
view
6 x 2 spec/unit/outputs
spec/unit/outputs
elasticsearch_spec.rb
elasticsearch_spec.rb
42:47 (1%)
502:507 (1%)
view
6 x 2 spec/unit
spec/unit
http_client_builder_spec.rb
http_client_builder_spec.rb
56:61 (3%)
65:70 (3%)
view
6 x 2 spec/unit/outputs/elasticsearch/http_client
spec/unit/outputs
pool_spec.rb
elasticsearch_spec.rb
21:29 (3%)
335:342 (1%)
view
6 x 2 spec/unit
spec/unit
http_client_builder_spec.rb
http_client_builder_spec.rb
104:109 (3%)
113:118 (3%)
view
6 x 2 spec/unit/outputs
spec/unit/outputs
elasticsearch_spec.rb
elasticsearch_spec.rb
42:47 (1%)
520:525 (1%)
view