facebookresearch / radioactive_data
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:
    • 1,882 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 341 duplicated lines
  • 20 duplicates
system18% (341 lines)
Duplication per Extension
py18% (341 lines)
Duplication per Component (primary)
ROOT46% (297 lines)
src/datasets10% (30 lines)
src1% (14 lines)
src/model0% (0 lines)
src/data_augmentations0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 20 duplicates...
Size#FoldersFilesLinesCode
49 x 2 ROOT
ROOT
train-distillation.py
train-logistic.py
82:151 (35%)
77:145 (34%)
view
33 x 2 ROOT
ROOT
train-classif.py
train-logistic.py
166:224 (28%)
177:235 (23%)
view
21 x 2 ROOT
ROOT
train-classif.py
train-distillation.py
186:224 (17%)
197:235 (15%)
view
21 x 2 ROOT
ROOT
train-distillation.py
train-logistic.py
197:235 (15%)
197:235 (14%)
view
17 x 2 ROOT
ROOT
train-distillation.py
train-logistic.py
55:73 (12%)
56:74 (12%)
view
15 x 2 ROOT
ROOT
train-classif.py
train-distillation.py
159:184 (12%)
170:195 (10%)
view
11 x 2 ROOT
ROOT
train-classif.py
train-distillation.py
21:41 (9%)
21:41 (7%)
view
11 x 2 src/datasets
src/datasets
sampler.py
sampler.py
34:44 (8%)
183:193 (8%)
view
11 x 2 ROOT
ROOT
train-distillation.py
train-logistic.py
177:195 (7%)
177:195 (7%)
view
10 x 2 ROOT
ROOT
train-classif.py
train-logistic.py
88:109 (8%)
94:115 (7%)
view
10 x 2 ROOT
ROOT
train-classif.py
train-distillation.py
88:109 (8%)
100:121 (7%)
view
8 x 2 src/datasets
src/datasets
sampler.py
sampler.py
131:138 (6%)
183:190 (6%)
view
8 x 2 src/datasets
src/datasets
sampler.py
sampler.py
34:41 (6%)
131:138 (6%)
view
7 x 2 src
src
trainer.py
trainer.py
174:180 (3%)
194:200 (3%)
view
7 x 2 ROOT
ROOT
make_data_radioactive.py
train-classif.py
236:246 (4%)
208:218 (5%)
view
7 x 2 ROOT
ROOT
detect_radioactivity.py
train-classif.py
34:40 (8%)
118:124 (5%)
view
7 x 2 ROOT
ROOT
make_data_radioactive.py
train-distillation.py
236:246 (4%)
219:229 (5%)
view
7 x 2 ROOT
ROOT
make_data_radioactive.py
train-logistic.py
236:246 (4%)
219:229 (4%)
view
6 x 2 ROOT
ROOT
make_data_radioactive.py
train-logistic.py
83:88 (3%)
81:86 (4%)
view
6 x 2 ROOT
ROOT
make_data_radioactive.py
train-distillation.py
83:88 (3%)
86:91 (4%)
view