aws-samples / aws-step-functions-saga-pattern-with-sam
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
  • 50% duplication:
    • 597 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 303 duplicated lines
  • 57 duplicates
system50% (303 lines)
Duplication per Extension
js79% (225 lines)
yaml39% (45 lines)
yml16% (33 lines)
Duplication per Component (primary)
src/statesmachine39% (45 lines)
src/functions/CancelFlight100% (40 lines)
src/functions/CancelCar97% (39 lines)
src/functions/CancelHotel97% (39 lines)
src/functions/BookFlight88% (37 lines)
ROOT16% (33 lines)
src/functions/BookHotel78% (32 lines)
src/functions/BookCar78% (32 lines)
src/functions/StatusCheck15% (6 lines)

Duplication Between Components (50+ lines)

G src/functions/CancelCar src/functions/CancelCar src/functions/CancelFlight src/functions/CancelFlight src/functions/CancelCar--src/functions/CancelFlight 70 src/functions/CancelHotel src/functions/CancelHotel src/functions/CancelCar--src/functions/CancelHotel 70 src/functions/CancelFlight--src/functions/CancelHotel 70 src/functions/BookFlight src/functions/BookFlight src/functions/BookFlight--src/functions/CancelFlight 62 src/functions/BookHotel src/functions/BookHotel src/functions/BookFlight--src/functions/BookHotel 50 src/functions/BookHotel--src/functions/CancelHotel 52 src/functions/BookCar src/functions/BookCar src/functions/BookCar--src/functions/CancelCar 52 src/functions/BookCar--src/functions/BookFlight 50 src/functions/BookCar--src/functions/BookHotel 50

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 57 duplicates...
Size#FoldersFilesLinesCode
26 x 2 src/functions/CancelCar
src/functions/CancelFlight
app.js
app.js
28:63 (65%)
28:63 (65%)
view
26 x 2 src/functions/CancelFlight
src/functions/CancelHotel
app.js
app.js
28:63 (65%)
28:63 (65%)
view
26 x 2 src/functions/CancelCar
src/functions/CancelHotel
app.js
app.js
28:63 (65%)
28:63 (65%)
view
13 x 2 src/functions/BookHotel
src/functions/CancelHotel
app.js
app.js
44:63 (31%)
44:63 (32%)
view
13 x 2 src/functions/BookHotel
src/functions/CancelFlight
app.js
app.js
44:63 (31%)
44:63 (32%)
view
13 x 2 src/functions/BookCar
src/functions/BookFlight
app.js
app.js
44:63 (31%)
45:64 (30%)
view
13 x 2 src/functions/BookHotel
src/functions/CancelCar
app.js
app.js
44:63 (31%)
44:63 (32%)
view
13 x 2 src/functions/BookFlight
src/functions/CancelHotel
app.js
app.js
45:64 (30%)
44:63 (32%)
view
13 x 2 src/functions/BookCar
src/functions/CancelCar
app.js
app.js
44:63 (31%)
44:63 (32%)
view
13 x 2 src/functions/BookCar
src/functions/CancelHotel
app.js
app.js
44:63 (31%)
44:63 (32%)
view
13 x 2 src/functions/BookCar
src/functions/CancelFlight
app.js
app.js
44:63 (31%)
44:63 (32%)
view
13 x 2 src/functions/BookFlight
src/functions/CancelFlight
app.js
app.js
45:64 (30%)
44:63 (32%)
view
13 x 2 src/functions/BookFlight
src/functions/CancelCar
app.js
app.js
45:64 (30%)
44:63 (32%)
view
13 x 2 src/functions/BookCar
src/functions/BookHotel
app.js
app.js
44:63 (31%)
44:63 (31%)
view
13 x 2 src/functions/BookFlight
src/functions/BookHotel
app.js
app.js
45:64 (30%)
44:63 (31%)
view
12 x 2 src/functions/BookCar
src/functions/BookFlight
app.js
app.js
26:40 (29%)
26:40 (28%)
view
12 x 2 src/functions/BookCar
src/functions/BookHotel
app.js
app.js
26:40 (29%)
26:40 (29%)
view
12 x 2 src/functions/BookFlight
src/functions/BookHotel
app.js
app.js
26:40 (28%)
26:40 (29%)
view
11 x 2 ROOT
ROOT
template.yml
template.yml
187:197 (6%)
200:210 (6%)
view
11 x 2 src/functions/BookFlight
src/functions/CancelFlight
app.js
app.js
21:33 (26%)
23:35 (27%)
view