aws-samples / amazon-sagemaker-tsp-deep-rl
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
  • 20% duplication:
    • 749 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 154 duplicated lines
  • 7 duplicates
system20% (154 lines)
Duplication per Extension
py21% (154 lines)
Duplication per Component (primary)
src21% (154 lines)
ROOT0% (0 lines)
notebooks0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
17 x 2 src
src
run.py
run.py
114:130 (7%)
315:331 (7%)
view
17 x 2 src
src
run.py
run.py
93:112 (7%)
294:313 (7%)
view
12 x 2 src
src
run.py
run.py
214:227 (5%)
368:381 (5%)
view
11 x 2 src
src
train.py
train.py
120:133 (6%)
237:250 (6%)
view
7 x 2 src
src
run.py
run.py
203:211 (2%)
352:360 (2%)
view
7 x 2 src
src
train.py
train.py
196:210 (3%)
291:305 (3%)
view
6 x 2 src
src
train.py
train.py
164:170 (3%)
262:268 (3%)
view