aws-samples / sagemaker-101-workshop
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
  • 39% duplication:
    • 636 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 252 duplicated lines
  • 9 duplicates
system39% (252 lines)
Duplication per Extension
py26% (142 lines)
html100% (110 lines)
Duplication per Component (primary)
pytorch_alternatives/migration_challenge_pytorch_image/util63% (55 lines)
migration_challenge_keras_image/util98% (55 lines)
pytorch_alternatives/custom_pytorch_nlp/util46% (44 lines)
custom_tensorflow_keras_nlp/util63% (44 lines)
builtin_algorithm_hpo_tabular/util17% (24 lines)
pytorch_alternatives/custom_pytorch_nlp/src12% (15 lines)
custom_tensorflow_keras_nlp/src25% (15 lines)
pytorch_alternatives/migration_challenge_pytorch_image/src0% (0 lines)
migration_challenge_keras_image/src0% (0 lines)

Duplication Between Components (50+ lines)

G migration_challenge_keras_image/util migration_challenge_keras_image/util pytorch_alternatives/migration_challenge_pytorch_image/util pytorch_alternatives/migration_challenge_pytorch_image/util migration_challenge_keras_image/util--pytorch_alternatives/migration_challenge_pytorch_image/util 110 custom_tensorflow_keras_nlp/util custom_tensorflow_keras_nlp/util pytorch_alternatives/custom_pytorch_nlp/util pytorch_alternatives/custom_pytorch_nlp/util custom_tensorflow_keras_nlp/util--pytorch_alternatives/custom_pytorch_nlp/util 88

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
55 x 2 migration_challenge_keras_image/util
pytorch_alternatives/mig...enge_pytorch_image/util
input.html
input.html
1:59 (100%)
1:59 (100%)
view
15 x 2 custom_tensorflow_keras_nlp/util
pytorch_alternatives/custom_pytorch_nlp/util
preprocessing.py
preprocessing.py
84:99 (22%)
110:125 (16%)
view
15 x 2 custom_tensorflow_keras_nlp/src
pytorch_alternatives/custom_pytorch_nlp/src
main.py
main.py
24:45 (25%)
70:91 (12%)
view
13 x 2 custom_tensorflow_keras_nlp/util
pytorch_alternatives/custom_pytorch_nlp/util
preprocessing.py
preprocessing.py
20:41 (19%)
18:39 (13%)
view
9 x 2 builtin_algorithm_hpo_tabular/util
builtin_algorithm_hpo_tabular/util
classification_report.py
classification_report.py
70:80 (6%)
103:113 (6%)
view
8 x 2 custom_tensorflow_keras_nlp/util
pytorch_alternatives/custom_pytorch_nlp/util
preprocessing.py
preprocessing.py
102:111 (11%)
128:137 (8%)
view
8 x 2 custom_tensorflow_keras_nlp/util
pytorch_alternatives/custom_pytorch_nlp/util
preprocessing.py
preprocessing.py
44:54 (11%)
67:77 (8%)
view
6 x 2 builtin_algorithm_hpo_tabular/util
builtin_algorithm_hpo_tabular/util
classification_report.py
classification_report.py
24:30 (4%)
74:80 (4%)
view
6 x 2 builtin_algorithm_hpo_tabular/util
builtin_algorithm_hpo_tabular/util
classification_report.py
classification_report.py
24:30 (4%)
107:113 (4%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
17 x 2 pytorch_alternatives/custom_pytorch_nlp/util
custom_tensorflow_keras_nlp/util
preprocessing.py
preprocessing.py
0:0 
0:0 
view
14 x 2 pytorch_alternatives/custom_pytorch_nlp/src
custom_tensorflow_keras_nlp/src
main.py
main.py
0:0 
0:0 
view
6 x 2 pytorch_alternatives/custom_pytorch_nlp/util
custom_tensorflow_keras_nlp/util
preprocessing.py
preprocessing.py
0:0 
0:0 
view