aws-samples / aws-step-functions-long-lived-transactions
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
  • 34% duplication:
    • 958 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 333 duplicated lines
  • 52 duplicates
system34% (333 lines)
Duplication per Extension
yaml36% (211 lines)
go32% (122 lines)
Duplication per Component (primary)
ROOT33% (136 lines)
statemachine42% (75 lines)
order-new69% (23 lines)
order-update43% (23 lines)
inventory-release37% (22 lines)
inventory-reserve51% (19 lines)
payment-debit50% (19 lines)
payment-credit27% (16 lines)
models0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 52 duplicates...
Size#FoldersFilesLinesCode
32 x 2 ROOT
ROOT
template.yaml
template.yaml
384:415 (7%)
420:451 (7%)
view
13 x 2 order-new
order-update
main.go
main.go
64:82 (39%)
98:117 (24%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
249:260 (2%)
283:294 (2%)
view
11 x 2 ROOT
ROOT
template.yaml
template.yaml
262:272 (2%)
296:306 (2%)
view
10 x 2 inventory-release
payment-credit
main.go
main.go
22:41 (16%)
21:40 (16%)
view
10 x 2 order-new
order-update
main.go
main.go
21:41 (30%)
21:41 (18%)
view
10 x 2 inventory-release
order-update
main.go
main.go
22:41 (16%)
21:41 (18%)
view
10 x 2 inventory-reserve
order-new
main.go
main.go
21:40 (27%)
21:41 (30%)
view
10 x 2 order-update
payment-debit
main.go
main.go
21:41 (18%)
22:39 (26%)
view
10 x 2 inventory-release
payment-debit
main.go
main.go
22:41 (16%)
22:39 (26%)
view
10 x 2 inventory-release
inventory-reserve
main.go
main.go
22:41 (16%)
21:40 (27%)
view
10 x 2 inventory-reserve
payment-debit
main.go
main.go
21:40 (27%)
22:39 (26%)
view
10 x 2 inventory-release
order-new
main.go
main.go
22:41 (16%)
21:41 (30%)
view
10 x 2 order-new
payment-credit
main.go
main.go
21:41 (30%)
21:40 (16%)
view
10 x 2 inventory-reserve
payment-credit
main.go
main.go
21:40 (27%)
21:40 (16%)
view
10 x 2 payment-credit
payment-debit
main.go
main.go
21:40 (16%)
22:39 (26%)
view
10 x 2 order-update
payment-credit
main.go
main.go
21:41 (18%)
21:40 (16%)
view
10 x 2 inventory-reserve
order-update
main.go
main.go
21:40 (27%)
21:41 (18%)
view
10 x 2 order-new
payment-debit
main.go
main.go
21:41 (30%)
22:39 (26%)
view
9 x 2 inventory-reserve
payment-debit
main.go
main.go
79:91 (24%)
79:92 (23%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
13 x 2 order-new
order-update
main.go
main.go
64:79 
98:114 
view
9 x 6 order-new
inventory-release
order-update
payment-credit
inventory-reserve
payment-debit
main.go
main.go
main.go
main.go
main.go
main.go
23:38 
24:39 
23:38 
23:38 
23:38 
24:37 
view