facebookresearch / LASER
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
  • 9% duplication:
    • 2,176 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 204 duplicated lines
  • 13 duplicates
system9% (204 lines)
Duplication per Extension
py9% (204 lines)
Duplication per Component (primary)
source14% (175 lines)
tasks/xnli40% (29 lines)
tasks/mldoc0% (0 lines)
tasks/bucc0% (0 lines)
tasks/CCMatrix0% (0 lines)
tasks/WikiMatrix0% (0 lines)
docker0% (0 lines)
source/lib0% (0 lines)
Longest Duplicates
The list of 13 longest duplicates.
See data for all 13 duplicates...
Size#FoldersFilesLinesCode
21 x 2 source
source
nli.py
sent_classif.py
289:314 (7%)
238:263 (10%)
view
17 x 2 source
source
nli.py
sent_classif.py
83:99 (5%)
55:71 (8%)
view
12 x 2 source
source
nli.py
sent_classif.py
124:135 (4%)
94:105 (6%)
view
10 x 2 tasks/xnli
tasks/xnli
xnli.py
xnli.py
82:91 (13%)
103:112 (13%)
view
10 x 2 source
source
nli.py
sent_classif.py
270:283 (3%)
219:232 (5%)
view
9 x 2 source
source
embed.py
paraphrase.py
42:51 (3%)
142:151 (4%)
view
8 x 2 source
tasks/xnli
embed.py
xnli.py
341:348 (2%)
52:59 (11%)
view
8 x 2 source
tasks/xnli
similarity_search.py
xnli.py
58:66 (11%)
53:61 (11%)
view
8 x 2 source
source
paraphrase.py
similarity_search.py
166:173 (4%)
57:64 (11%)
view
7 x 2 source
tasks/xnli
paraphrase.py
xnli.py
167:173 (3%)
53:59 (9%)
view
7 x 2 source
source
embed.py
paraphrase.py
342:348 (2%)
167:173 (3%)
view
7 x 2 source
source
embed.py
similarity_search.py
342:348 (2%)
58:64 (9%)
view
6 x 2 source
source
nli.py
sent_classif.py
101:106 (2%)
73:78 (3%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 2 source
source
embed.py
paraphrase.py
0:0 
0:0 
view