awslabs / shuttle
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
  • 5% duplication:
    • 3,462 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 174 duplicated lines
  • 14 duplicates
system5% (174 lines)
Duplication per Extension
rs5% (174 lines)
Duplication per Component (primary)
src/sync10% (108 lines)
src/sync/atomic11% (36 lines)
benches13% (12 lines)
src/scheduler2% (12 lines)
src/runtime<1% (6 lines)
ROOT0% (0 lines)
src0% (0 lines)
src/runtime/thread0% (0 lines)
src/runtime/task0% (0 lines)
src/scheduler/data0% (0 lines)
Longest Duplicates
The list of 14 longest duplicates.
See data for all 14 duplicates...
Size#FoldersFilesLinesCode
11 x 2 src/sync
src/sync
mutex.rs
rwlock.rs
1:11 (8%)
1:11 (4%)
view
9 x 2 src/sync
src/sync
mpsc.rs
mpsc.rs
170:180 (3%)
283:293 (3%)
view
9 x 2 src/sync
src/sync
mpsc.rs
mpsc.rs
422:432 (3%)
470:480 (3%)
view
7 x 2 src/sync
src/sync
rwlock.rs
rwlock.rs
302:310 (2%)
375:382 (2%)
view
6 x 2 src/sync/atomic
src/sync/atomic
int.rs
int.rs
97:102 (6%)
115:120 (6%)
view
6 x 2 benches
benches
counter.rs
counter.rs
12:18 (8%)
35:41 (8%)
view
6 x 2 src/sync
src/sync
mutex.rs
rwlock.rs
170:175 (4%)
240:245 (2%)
view
6 x 2 src/runtime
src/scheduler
runner.rs
metrics.rs
194:199 (4%)
86:91 (5%)
view
6 x 2 src/sync
src/sync
mpsc.rs
mpsc.rs
411:416 (2%)
459:464 (2%)
view
6 x 2 src/scheduler
src/scheduler
metrics.rs
mod.rs
86:91 (5%)
115:120 (9%)
view
6 x 2 src/runtime
src/scheduler
runner.rs
mod.rs
194:199 (4%)
115:120 (9%)
view
6 x 2 src/sync
src/sync
mpsc.rs
mpsc.rs
27:32 (2%)
39:44 (2%)
view
6 x 2 src/sync/atomic
src/sync/atomic
bool.rs
bool.rs
85:90 (9%)
103:108 (9%)
view
6 x 2 src/sync/atomic
src/sync/atomic
ptr.rs
ptr.rs
90:95 (10%)
108:113 (10%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 src/sync
src/sync
mpsc.rs
mpsc.rs
422:435 
470:483 
view
7 x 2 src/sync
src/sync
mpsc.rs
mpsc.rs
411:418 
459:466 
view