microsoft / lain
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
  • 18% duplication:
    • 4,802 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 867 duplicated lines
  • 71 duplicates
system18% (867 lines)
Duplication per Extension
rs18% (867 lines)
Duplication per Component (primary)
lain/src25% (480 lines)
lain_derive/src14% (199 lines)
testsuite/src11% (77 lines)
testsuite/benches43% (71 lines)
lain_derive/src/internals6% (40 lines)
ROOT0% (0 lines)
lain0% (0 lines)
lain_derive0% (0 lines)
testsuite0% (0 lines)

Duplication Between Components (50+ lines)

G testsuite/benches testsuite/benches testsuite/src testsuite/src testsuite/benches--testsuite/src 110

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 71 duplicates...
Size#FoldersFilesLinesCode
29 x 2 lain_derive/src
lain_derive/src
fuzzerobject.rs
new_fuzzed_old.rs
200:234 (15%)
284:318 (13%)
view
19 x 2 lain/src
lain/src
mutatable.rs
mutatable.rs
227:251 (4%)
278:302 (4%)
view
19 x 2 lain/src
lain/src
new_fuzzed.rs
new_fuzzed.rs
127:152 (3%)
267:293 (3%)
view
18 x 2 testsuite/src
testsuite/src
lib.rs
lib.rs
96:116 (2%)
127:147 (2%)
view
16 x 2 lain/src
lain/src
new_fuzzed.rs
new_fuzzed.rs
97:123 (2%)
206:232 (2%)
view
15 x 2 testsuite/benches
testsuite/benches
benchmark_generating_fuzzed_struct.rs
benchmark_serialization_throughput.rs
28:45 (17%)
30:47 (20%)
view
15 x 2 testsuite/benches
testsuite/src
benchmark_generating_fuzzed_struct.rs
lib.rs
28:45 (17%)
22:39 (2%)
view
15 x 2 testsuite/benches
testsuite/src
benchmark_serialization_throughput.rs
lib.rs
30:47 (20%)
22:39 (2%)
view
15 x 2 testsuite/benches
testsuite/src
benchmark_serialization_throughput.rs
lib.rs
57:72 (20%)
129:144 (2%)
view
15 x 2 lain/src
lain/src
mutatable.rs
mutatable.rs
182:204 (3%)
234:257 (3%)
view
15 x 2 testsuite/benches
testsuite/src
benchmark_serialization_throughput.rs
lib.rs
57:72 (20%)
98:113 (2%)
view
14 x 2 lain/src
lain/src
mutatable.rs
mutatable.rs
315:332 (3%)
355:372 (3%)
view
13 x 2 lain/src
lain/src
mutatable.rs
mutatable.rs
72:90 (2%)
100:118 (2%)
view
13 x 2 lain_derive/src
lain_derive/src
serialize.rs
serialize.rs
217:230 (2%)
446:459 (2%)
view
13 x 2 testsuite/benches
testsuite/benches
benchmark_generating_fuzzed_struct.rs
benchmark_serialization_throughput.rs
12:24 (14%)
14:26 (17%)
view
13 x 2 lain/src
lain/src
new_fuzzed.rs
new_fuzzed.rs
238:251 (2%)
266:279 (2%)
view
13 x 2 lain/src
lain/src
mutatable.rs
mutatable.rs
182:198 (2%)
285:302 (2%)
view
13 x 2 testsuite/src
testsuite/src
lib.rs
lib.rs
47:61 (2%)
71:85 (2%)
view
12 x 2 lain/src
lain/src
new_fuzzed.rs
new_fuzzed.rs
127:139 (2%)
239:251 (2%)
view
12 x 2 lain/src
lain/src
new_fuzzed.rs
new_fuzzed.rs
378:395 (2%)
442:459 (2%)
view