aws-samples / amazon-sagemaker-analyze-model-predictions
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
  • 12% duplication:
    • 424 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 53 duplicated lines
  • 5 duplicates
system12% (53 lines)
Duplication per Extension
py12% (53 lines)
Duplication per Component (primary)
docker15% (27 lines)
code28% (26 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
9 x 2 docker
docker
evaluation.py
evaluation.py
150:158 (5%)
199:207 (5%)
view
9 x 2 docker
docker
evaluation.py
evaluation.py
150:158 (5%)
175:183 (5%)
view
9 x 2 docker
docker
evaluation.py
evaluation.py
175:183 (5%)
199:207 (5%)
view
7 x 2 code
code
pretrained_model.py
pretrained_model_with_debugger_hook.py
19:30 (29%)
37:48 (12%)
view
6 x 2 code
code
pretrained_model.py
pretrained_model_with_debugger_hook.py
37:43 (25%)
83:89 (10%)
view