facebookresearch / gtn_applications
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
  • 12% duplication:
    • 2,658 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 334 duplicated lines
  • 13 duplicates
system12% (334 lines)
Duplication per Extension
py12% (334 lines)
Duplication per Component (primary)
datasets35% (216 lines)
ROOT5% (90 lines)
benchmarks22% (28 lines)
scripts0% (0 lines)
Longest Duplicates
The list of 13 longest duplicates.
See data for all 13 duplicates...
Size#FoldersFilesLinesCode
35 x 2 datasets
datasets
librispeech.py
wsj.py
19:61 (53%)
19:61 (53%)
view
24 x 2 datasets
datasets
librispeech.py
wsj.py
64:94 (36%)
64:94 (36%)
view
22 x 2 datasets
datasets
audioset.py
iamdb.py
136:165 (20%)
191:218 (10%)
view
15 x 2 datasets
datasets
audioset.py
iamdb.py
111:130 (13%)
161:180 (7%)
view
14 x 2 benchmarks
benchmarks
transducer_benchmark.py
transducer_benchmark.py
57:74 (15%)
91:108 (15%)
view
14 x 2 ROOT
ROOT
test.py
train.py
59:73 (14%)
158:172 (4%)
view
13 x 2 datasets
datasets
iamdb.py
wsj.py
260:272 (6%)
49:61 (20%)
view
13 x 2 ROOT
ROOT
models.py
models.py
29:41 (3%)
180:192 (3%)
view
13 x 2 datasets
datasets
iamdb.py
librispeech.py
260:272 (6%)
49:61 (20%)
view
11 x 2 datasets
datasets
iamdb.py
wsj.py
279:292 (5%)
69:82 (16%)
view
11 x 2 datasets
datasets
iamdb.py
librispeech.py
279:292 (5%)
69:82 (16%)
view
9 x 2 ROOT
ROOT
test.py
train.py
77:85 (9%)
180:188 (3%)
view
9 x 2 ROOT
ROOT
utils.py
utils.py
289:299 (2%)
398:408 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
16 x 2 datasets
datasets
wsj.py
librispeech.py
0:0 
0:0 
view