facebookresearch / low-shot-shrink-hallucinate
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
  • 10% duplication:
    • 1,203 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 131 duplicated lines
  • 8 duplicates
system10% (131 lines)
Duplication per Extension
py7% (82 lines)
yaml62% (49 lines)
Duplication per Component (primary)
ROOT10% (131 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
11 x 2 ROOT
ROOT
low_shot.py
matching_network.py
134:146 (7%)
226:239 (5%)
view
10 x 2 ROOT
ROOT
base_classes_train_template.yaml
base_classes_train_template_smallbatc...
5:14 (55%)
5:14 (55%)
view
10 x 2 ROOT
ROOT
low_shot.py
matching_network.py
174:184 (6%)
263:274 (4%)
view
9 x 2 ROOT
ROOT
train_save_data.yaml
val_save_data.yaml
4:12 (64%)
4:12 (64%)
view
7 x 2 ROOT
ROOT
base_classes_train_template.yaml
base_classes_val_template.yaml
12:18 (38%)
9:15 (46%)
view
7 x 2 ROOT
ROOT
main.py
save_features.py
160:166 (4%)
43:49 (13%)
view
7 x 2 ROOT
ROOT
losses.py
losses.py
29:35 (13%)
46:53 (13%)
view
6 x 2 ROOT
ROOT
ResNetBasic.py
ResNetBasic.py
50:57 (4%)
93:101 (4%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 ROOT
ROOT
save_features.py
main.py
0:0 
0:0 
view