facebookresearch / talkthewalk
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:
    • 2,388 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 142 duplicated lines
  • 12 duplicates
system5% (142 lines)
Duplication per Extension
py5% (142 lines)
Duplication per Component (primary)
ttw/models8% (66 lines)
ttw/train8% (52 lines)
scripts3% (12 lines)
ttw2% (12 lines)
analysis0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 12 longest duplicates.
See data for all 12 duplicates...
Size#FoldersFilesLinesCode
17 x 2 ttw/models
ttw/models
continuous.py
discrete.py
49:67 (16%)
83:101 (12%)
view
16 x 2 ttw/models
ttw/models
continuous.py
discrete.py
123:140 (15%)
158:175 (12%)
view
8 x 2 ttw/train
ttw/train
predict_location_continuous.py
predict_location_discrete.py
61:71 (12%)
93:103 (8%)
view
7 x 2 ttw/train
ttw/train
predict_location_generated.py
train_tourist.py
113:122 (4%)
54:63 (12%)
view
6 x 2 ttw/train
ttw/train
predict_location_continuous.py
predict_location_discrete.py
43:48 (9%)
76:81 (6%)
view
6 x 2 ttw/train
ttw/train
predict_location_discrete.py
train_tourist.py
87:94 (6%)
54:61 (10%)
view
6 x 2 ttw/train
ttw/train
predict_location_discrete.py
predict_location_generated.py
87:94 (6%)
113:120 (4%)
view
6 x 2 ttw/train
ttw/train
predict_location_discrete.py
predict_location_language.py
87:94 (6%)
75:82 (7%)
view
6 x 2 scripts
scripts
compute_upperbound.py
compute_upperbound.py
21:26 (5%)
51:56 (5%)
view
6 x 2 ttw/train
ttw/train
predict_location_language.py
train_tourist.py
75:82 (7%)
54:61 (10%)
view
6 x 2 ttw/train
ttw/train
predict_location_generated.py
predict_location_language.py
113:120 (4%)
75:82 (7%)
view
6 x 2 ttw
ttw
data_loader.py
data_loader.py
345:351 (1%)
374:380 (1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
8 x 2 ttw/models
ttw/models
discrete.py
continuous.py
0:0 
0:0 
view
7 x 2 ttw/models
ttw/models
discrete.py
continuous.py
0:0 
0:0 
view