amazon-research / contextual-attention-nlm
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
  • 13% duplication:
    • 1,112 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 146 duplicated lines
  • 7 duplicates
system13% (146 lines)
Duplication per Extension
py13% (146 lines)
Duplication per Component (primary)
src8% (78 lines)
ROOT37% (68 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
21 x 2 src
src
model.py
model.py
34:57 (5%)
87:110 (5%)
view
19 x 2 ROOT
ROOT
run_inference.py
run_model.py
33:57 (31%)
36:62 (15%)
view
8 x 2 ROOT
ROOT
run_inference.py
run_model.py
62:70 (13%)
69:77 (6%)
view
7 x 2 ROOT
ROOT
run_inference.py
run_model.py
22:31 (11%)
25:34 (5%)
view
6 x 2 src
src
model.py
model.py
22:28 (1%)
76:82 (1%)
view
6 x 2 src
src
loss.py
loss.py
54:60 (9%)
88:93 (9%)
view
6 x 2 src
src
model.py
model.py
325:330 (1%)
459:464 (1%)
view