awslabs / sagemaker-handwritten-text-recognition
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,734 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 260 duplicated lines
  • 22 duplicates
system9% (260 lines)
Duplication per Extension
py10% (180 lines)
yaml8% (80 lines)
Duplication per Component (primary)
sagemaker/src12% (180 lines)
deployment8% (80 lines)
ROOT0% (0 lines)
deployment/string-functions/src0% (0 lines)
deployment/solution-assistant/src0% (0 lines)
sagemaker/ground_truth/post-label0% (0 lines)
sagemaker/ground_truth/pre-label0% (0 lines)
sagemaker/ground_truth0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 22 duplicates...
Size#FoldersFilesLinesCode
13 x 2 sagemaker/src
sagemaker/src
handwriting_line_recognition.py
utils.py
260:272 (3%)
83:95 (5%)
view
12 x 2 sagemaker/src
sagemaker/src
handwriting_line_recognition.py
word_and_line_segmentation.py
329:341 (3%)
475:487 (2%)
view
11 x 2 sagemaker/src
sagemaker/src
handwriting_line_recognition.py
word_and_line_segmentation.py
132:145 (2%)
73:86 (2%)
view
9 x 2 sagemaker/src
sagemaker/src
handwriting_line_recognition.py
word_and_line_segmentation.py
425:435 (2%)
542:552 (2%)
view
9 x 2 sagemaker/src
sagemaker/src
handwriting_line_recognition.py
utils.py
201:209 (2%)
97:106 (3%)
view
8 x 2 sagemaker/src
sagemaker/src
utils.py
utils.py
219:226 (3%)
253:261 (3%)
view
7 x 2 deployment
deployment
grouthtruth.yaml
sagemaker-permissions.yaml
4:10 (13%)
4:10 (3%)
view
7 x 2 deployment
deployment
template.yaml
template.yaml
213:220 (1%)
248:255 (1%)
view
7 x 2 sagemaker/src
sagemaker/src
word_and_line_segmentation.py
word_and_line_segmentation.py
97:105 (1%)
116:124 (1%)
view
7 x 2 deployment
deployment
endpoint.yaml
sagemaker.yaml
4:10 (8%)
4:10 (6%)
view
7 x 2 deployment
deployment
grouthtruth.yaml
solution-assistant.yaml
44:51 (13%)
44:51 (14%)
view
6 x 2 deployment
deployment
cognito.yaml
grouthtruth.yaml
32:37 (6%)
44:49 (11%)
view
6 x 2 sagemaker/src
sagemaker/src
htr_dataset.py
htr_dataset.py
177:183 (2%)
205:211 (2%)
view
6 x 2 sagemaker/src
sagemaker/src
run_inference.py
word_and_line_segmentation.py
113:119 (4%)
393:399 (1%)
view
6 x 2 deployment
deployment
grouthtruth.yaml
solution-assistant.yaml
27:32 (11%)
44:49 (12%)
view
6 x 2 sagemaker/src
sagemaker/src
htr_dataset.py
htr_dataset.py
134:140 (2%)
177:183 (2%)
view
6 x 2 deployment
deployment
cognito.yaml
grouthtruth.yaml
32:37 (6%)
27:32 (11%)
view
6 x 2 deployment
deployment
cognito.yaml
solution-assistant.yaml
32:37 (6%)
44:49 (12%)
view
6 x 2 deployment
deployment
template.yaml
template.yaml
291:296 (1%)
314:319 (1%)
view
6 x 2 deployment
deployment
grouthtruth.yaml
grouthtruth.yaml
27:32 (11%)
44:49 (11%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 2 sagemaker/src
sagemaker/src
utils.py
handwriting_line_recognition.py
0:0 
0:0 
view