aws-samples / amazon-rds-purpose-built-workshop
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
  • 32% duplication:
    • 684 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 222 duplicated lines
  • 11 duplicates
system32% (222 lines)
Duplication per Extension
py35% (172 lines)
yaml25% (50 lines)
Duplication per Component (primary)
ddb-python-script28% (77 lines)
taxi-ride-workflow/driver-accept-trip81% (44 lines)
taxi-ride-workflow40% (43 lines)
taxi-ride-workflow/rider-book-trip74% (26 lines)
taxi-ride-workflow/driver-complete-trip67% (25 lines)
ddb-stream-processor3% (7 lines)

Duplication Between Components (50+ lines)

G ddb-python-script ddb-python-script taxi-ride-workflow/driver-accept-trip taxi-ride-workflow/driver-accept-trip ddb-python-script--taxi-ride-workflow/driver-accept-trip 76

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 11 longest duplicates.
See data for all 11 duplicates...
Size#FoldersFilesLinesCode
26 x 2 src/ddb-python-script
src/taxi-ride-workflow/driver-accept-trip
driver-accept-trip.py
driver-accept-trip.py
33:60 (57%)
42:69 (48%)
view
20 x 2 src/ddb-python-script
src/taxi-ride-workflow/rider-book-trip
rider-book-trip.py
rider-book-trip.py
17:41 (71%)
24:48 (57%)
view
19 x 2 src/ddb-python-script
src/taxi-ride-workflow/driver-complete-trip
driver-complete-trip.py
driver-complete-trip.py
17:35 (67%)
25:43 (51%)
view
12 x 2 src/taxi-ride-workflow
src/taxi-ride-workflow
template.yaml
template.yaml
50:61 (11%)
94:105 (11%)
view
12 x 2 src/taxi-ride-workflow
src/taxi-ride-workflow
template.yaml
template.yaml
72:83 (11%)
94:105 (11%)
view
12 x 2 src/taxi-ride-workflow
src/taxi-ride-workflow
template.yaml
template.yaml
50:61 (11%)
72:83 (11%)
view
12 x 2 src/ddb-python-script
src/taxi-ride-workflow/driver-accept-trip
driver-accept-trip.py
driver-accept-trip.py
8:19 (26%)
11:22 (22%)
view
7 x 2 src/ddb-stream-processor
src/taxi-ride-workflow
template.yaml
template.yaml
35:41 (7%)
25:31 (6%)
view
6 x 2 src/taxi-ride-workflow/driver-accept-trip
src/taxi-ride-workflow/driver-complete-trip
driver-accept-trip.py
driver-complete-trip.py
73:79 (11%)
52:58 (16%)
view
6 x 2 src/taxi-ride-workflow/driver-complete-trip
src/taxi-ride-workflow/rider-book-trip
driver-complete-trip.py
rider-book-trip.py
52:58 (16%)
52:58 (17%)
view
6 x 2 src/taxi-ride-workflow/driver-accept-trip
src/taxi-ride-workflow/rider-book-trip
driver-accept-trip.py
rider-book-trip.py
73:79 (11%)
52:58 (17%)
view