facebookresearch / FiD
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
  • 6% duplication:
    • 1,601 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 100 duplicated lines
  • 7 duplicates
system6% (100 lines)
Duplication per Extension
py6% (100 lines)
Duplication per Component (primary)
ROOT15% (88 lines)
src1% (12 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
11 x 2 ROOT
ROOT
train_reader.py
train_retriever.py
34:45 (6%)
36:47 (6%)
view
7 x 2 ROOT
ROOT
train_reader.py
train_retriever.py
96:102 (4%)
108:114 (3%)
view
7 x 2 ROOT
ROOT
train_reader.py
train_retriever.py
165:172 (4%)
173:179 (3%)
view
7 x 2 ROOT
ROOT
evaluate_retrieved_passages.py
passage_retrieval.py
20:27 (33%)
84:91 (5%)
view
6 x 2 src
src
preprocess.py
preprocess.py
22:27 (6%)
46:51 (6%)
view
6 x 2 ROOT
ROOT
train_reader.py
train_retriever.py
25:30 (3%)
29:34 (3%)
view
6 x 2 ROOT
ROOT
train_reader.py
train_retriever.py
61:67 (3%)
66:72 (3%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 ROOT
ROOT
evaluate_retrieved_passages.py
passage_retrieval.py
0:0 
0:0 
view