awslabs / aws-crt-ruby
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
  • 11% duplication:
    • 2,385 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 278 duplicated lines
  • 87 duplicates
system11% (278 lines)
Duplication per Extension
rb10% (230 lines)
rake19% (32 lines)
gemspec50% (16 lines)
Duplication per Component (primary)
gems/aws-crt/spec/auth34% (98 lines)
gems/aws-sigv4/spec9% (58 lines)
gems/aws-crt/lib/aws-crt6% (42 lines)
gems/aws-sigv4/lib/aws-sigv48% (26 lines)
gems/aws-crt/tasks20% (18 lines)
tasks17% (14 lines)
gems/aws-crt53% (8 lines)
gems/aws-sigv447% (8 lines)
gems/aws-crt/spec/io28% (6 lines)
gems/aws-crt/ext0% (0 lines)
gems/aws-crt/lib0% (0 lines)
gems/aws-crt/spec/checksums0% (0 lines)
gems/aws-crt/spec0% (0 lines)
gems/aws-crt/spec/http0% (0 lines)
gems/aws-sigv4/lib0% (0 lines)

Duplication Between Components (50+ lines)

G gems/aws-crt/lib/aws-crt gems/aws-crt/lib/aws-crt gems/aws-crt/spec/auth gems/aws-crt/spec/auth gems/aws-crt/lib/aws-crt--gems/aws-crt/spec/auth 54

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 87 duplicates...
Size#FoldersFilesLinesCode
12 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
credential_spec.rb
static_credentials_provider_spec.rb
44:57 (25%)
34:47 (30%)
view
11 x 2 gems/aws-sigv4/spec
gems/aws-sigv4/spec
signer_spec.rb
signer_spec.rb
307:318 (3%)
334:345 (3%)
view
10 x 2 gems/aws-sigv4/lib/aws-sigv4
gems/aws-sigv4/lib/aws-sigv4
signer.rb
signer.rb
183:192 (4%)
299:308 (4%)
view
9 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
credential_spec.rb
signing_config_spec.rb
49:57 (19%)
87:95 (10%)
view
9 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
signable_spec.rb
static_credentials_provider_spec.rb
44:52 (21%)
39:47 (23%)
view
9 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
signable_spec.rb
signing_config_spec.rb
44:52 (21%)
87:95 (10%)
view
9 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
signing_config_spec.rb
static_credentials_provider_spec.rb
87:95 (10%)
39:47 (23%)
view
9 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
credential_spec.rb
signable_spec.rb
49:57 (19%)
44:52 (21%)
view
8 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
signing_config_spec.rb
signing_config_spec.rb
57:64 (9%)
74:81 (9%)
view
8 x 2 gems/aws-crt/lib/aws-crt/auth
gems/aws-crt/lib/aws-crt/auth
credentials.rb
static_credentials_provider.rb
71:78 (15%)
61:68 (16%)
view
8 x 2 gems/aws-crt
gems/aws-sigv4
aws-crt.gemspec
aws-sigv4.gemspec
7:14 (53%)
8:15 (47%)
view
7 x 2 tasks
tasks
rake
release.rake
release.rake
7:13 (8%)
18:24 (8%)
view
7 x 2 gems/aws-crt/lib/aws-crt/auth
gems/aws-crt/lib/aws-crt/auth
credentials.rb
static_credentials_provider.rb
20:28 (13%)
16:24 (14%)
view
7 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/auth
signing_config_spec.rb
signing_config_spec.rb
15:21 (8%)
28:34 (8%)
view
6 x 2 gems/aws-sigv4/lib/aws-sigv4
gems/aws-sigv4/spec
signer.rb
suite_spec.rb
538:543 (2%)
50:55 (14%)
view
6 x 2 gems/aws-crt/lib/aws-crt/auth
gems/aws-sigv4/spec
signable.rb
sigv4a_suite_spec.rb
15:20 (40%)
164:170 (5%)
view
6 x 2 gems/aws-crt/lib/aws-crt/auth
gems/aws-crt/spec/auth
signing_config.rb
signing_config_spec.rb
117:122 (9%)
90:95 (7%)
view
6 x 2 gems/aws-crt/lib/aws-crt/auth
gems/aws-sigv4/spec
static_credentials_provider.rb
suite_spec.rb
63:68 (12%)
50:55 (14%)
view
6 x 2 gems/aws-crt/spec/auth
gems/aws-sigv4/spec
static_credentials_provider_spec.rb
sigv4a_suite_spec.rb
42:47 (15%)
164:170 (5%)
view
6 x 2 gems/aws-crt/spec/auth
gems/aws-crt/spec/io
signable_spec.rb
event_loop_group_spec.rb
44:49 (14%)
23:28 (28%)
view