aws-samples / aws-dataexchange-api-samples
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:
    • 1,012 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 230 duplicated lines
  • 23 duplicates
system22% (230 lines)
Duplication per Extension
rb47% (188 lines)
py13% (42 lines)
Duplication per Component (primary)
providers/ruby/add-revision-to-a-data-set57% (60 lines)
providers/ruby/create-data-set-with-finalized-revision67% (46 lines)
providers/ruby/add-data-set66% (43 lines)
subscribers/python/download-entitled-assets19% (21 lines)
subscribers/ruby/most-expensive-neighborhoods-in-nyc17% (19 lines)
subscribers/python/pandas-describe-csv20% (13 lines)
subscribers/ruby/all-entitled-datasets66% (10 lines)
providers/ruby/enumerate-data-products31% (10 lines)
subscribers/python/export-data-sets9% (8 lines)
subscribers/go/all-entitled-datasets0% (0 lines)
subscribers/java/all-entitled-datasets0% (0 lines)
subscribers/cpp/all-entitled-datasets0% (0 lines)
subscribers/javascript/all-entitled-datasets0% (0 lines)
subscribers/javascript/auto-export-to-s30% (0 lines)
subscribers/python/tf-auto-export-to-s30% (0 lines)
subscribers/php/all-entitled-datasets0% (0 lines)
subscribers/dotnet/all-entitled-datasets0% (0 lines)

Duplication Between Components (50+ lines)

G providers/ruby/add-revision-to-a-data-set providers/ruby/add-revision-to-a-data-set providers/ruby/create-data-set-with-finalized-revision providers/ruby/create-data-set-with-finalized-revision providers/ruby/add-revision-to-a-data-set--providers/ruby/create-data-set-with-finalized-revision 68 providers/ruby/add-data-set providers/ruby/add-data-set providers/ruby/add-data-set--providers/ruby/add-revision-to-a-data-set 64

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 23 duplicates...
Size#FoldersFilesLinesCode
24 x 2 providers/ruby/add-data-set
providers/ruby/add-revision-to-a-data-set
add-data-set.rb
add-revision-to-a-data-set.rb
58:88 (36%)
115:145 (23%)
view
17 x 2 providers/ruby/add-revision-to-a-data-set
providers/ruby/create-da...with-finalized-revision
add-revision-to-a-data-set.rb
create-data-set-with-finalized-revisi...
62:85 (16%)
55:78 (25%)
view
13 x 2 subscribers/python/download-entitled-assets
subscribers/python/pandas-describe-csv
download-entitled-assets.py
pandas-describe-csv.py
78:94 (11%)
46:62 (20%)
view
11 x 2 providers/ruby/create-da...with-finalized-revision
subscribers/ruby/most-ex...ve-neighborhoods-in-nyc
create-data-set-with-finalized-revisi...
most-expensive-neighborhoods-in-nyc.rb
56:68 (16%)
90:102 (10%)
view
11 x 2 providers/ruby/add-data-set
providers/ruby/create-da...with-finalized-revision
add-data-set.rb
create-data-set-with-finalized-revisi...
15:29 (16%)
17:31 (16%)
view
11 x 2 providers/ruby/add-revision-to-a-data-set
subscribers/ruby/most-ex...ve-neighborhoods-in-nyc
add-revision-to-a-data-set.rb
most-expensive-neighborhoods-in-nyc.rb
63:75 (10%)
90:102 (10%)
view
10 x 2 providers/ruby/add-revision-to-a-data-set
providers/ruby/enumerate-data-products
add-revision-to-a-data-set.rb
enumerate-data-products.rb
5:16 (9%)
5:16 (31%)
view
9 x 2 providers/ruby/add-revision-to-a-data-set
providers/ruby/create-da...with-finalized-revision
add-revision-to-a-data-set.rb
create-data-set-with-finalized-revisi...
51:60 (8%)
44:53 (13%)
view
9 x 2 providers/ruby/add-data-set
subscribers/ruby/all-entitled-datasets
add-data-set.rb
all-entitled-datasets.rb
6:15 (13%)
5:14 (60%)
view
9 x 2 providers/ruby/create-da...with-finalized-revision
subscribers/ruby/all-entitled-datasets
create-data-set-with-finalized-revisi...
all-entitled-datasets.rb
3:12 (13%)
3:12 (60%)
view
8 x 2 subscribers/python/download-entitled-assets
subscribers/python/export-data-sets
download-entitled-assets.py
export-data-sets.py
18:26 (7%)
22:29 (9%)
view
8 x 2 providers/ruby/create-da...with-finalized-revision
subscribers/ruby/most-ex...ve-neighborhoods-in-nyc
create-data-set-with-finalized-revisi...
most-expensive-neighborhoods-in-nyc.rb
5:12 (11%)
14:21 (7%)
view
8 x 2 providers/ruby/add-data-set
subscribers/ruby/most-ex...ve-neighborhoods-in-nyc
add-data-set.rb
most-expensive-neighborhoods-in-nyc.rb
6:13 (12%)
14:21 (7%)
view
8 x 2 providers/ruby/add-data-set
providers/ruby/enumerate-data-products
add-data-set.rb
enumerate-data-products.rb
6:13 (12%)
7:14 (25%)
view
8 x 2 providers/ruby/enumerate-data-products
subscribers/ruby/most-ex...ve-neighborhoods-in-nyc
enumerate-data-products.rb
most-expensive-neighborhoods-in-nyc.rb
7:14 (25%)
14:21 (7%)
view
8 x 2 providers/ruby/enumerate-data-products
subscribers/ruby/all-entitled-datasets
enumerate-data-products.rb
all-entitled-datasets.rb
7:14 (25%)
5:12 (53%)
view
8 x 2 providers/ruby/create-da...with-finalized-revision
providers/ruby/enumerate-data-products
create-data-set-with-finalized-revisi...
enumerate-data-products.rb
5:12 (11%)
7:14 (25%)
view
8 x 2 providers/ruby/add-revision-to-a-data-set
providers/ruby/create-da...with-finalized-revision
add-revision-to-a-data-set.rb
create-data-set-with-finalized-revisi...
7:14 (7%)
5:12 (11%)
view
8 x 2 providers/ruby/add-revision-to-a-data-set
subscribers/ruby/most-ex...ve-neighborhoods-in-nyc
add-revision-to-a-data-set.rb
most-expensive-neighborhoods-in-nyc.rb
7:14 (7%)
14:21 (7%)
view
8 x 2 subscribers/ruby/all-entitled-datasets
subscribers/ruby/most-ex...ve-neighborhoods-in-nyc
all-entitled-datasets.rb
most-expensive-neighborhoods-in-nyc.rb
5:12 (53%)
14:21 (7%)
view