awslabs / sagemaker-document-understanding
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,610 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 219 duplicated lines
  • 18 duplicates
system13% (219 lines)
Duplication per Extension
yaml20% (122 lines)
py16% (97 lines)
Duplication per Component (primary)
cloudformation24% (114 lines)
sagemaker_notebook_instance/containers/relationship_extraction10% (34 lines)
sagemaker_notebook_instance/containers/question_answering45% (21 lines)
sagemaker_notebook_instance/containers/summarization44% (21 lines)
sagemaker_notebook_instance/containers/entity_recognition37% (21 lines)
cloudformation/sagemaker8% (8 lines)
sagemaker_notebook_instance0% (0 lines)
sagemaker_notebook_instance/package0% (0 lines)
sagemaker_notebook_instance/package/package0% (0 lines)
cloudformation/solution-assistant/src0% (0 lines)
cloudformation/solution-assistant0% (0 lines)
Longest Duplicates
The list of 18 longest duplicates.
See data for all 18 duplicates...
Size#FoldersFilesLinesCode
44 x 2 cloudformation
cloudformation
template.yaml
template.yaml
99:142 (15%)
144:187 (15%)
view
15 x 2 sagemaker_notebook_insta...ners/question_answering
sagemaker_notebook_insta...ontainers/summarization
entry_point.py
entry_point.py
21:41 (34%)
21:41 (33%)
view
15 x 2 sagemaker_notebook_insta...ners/entity_recognition
sagemaker_notebook_insta...ners/question_answering
entry_point.py
entry_point.py
35:55 (26%)
21:41 (34%)
view
15 x 2 sagemaker_notebook_insta...ners/entity_recognition
sagemaker_notebook_insta...ontainers/summarization
entry_point.py
entry_point.py
35:55 (26%)
21:41 (33%)
view
10 x 2 sagemaker_notebook_insta...ship_extraction/package
sagemaker_notebook_insta...ship_extraction/package
objects.py
objects.py
22:35 (8%)
58:71 (8%)
view
8 x 2 sagemaker_notebook_insta...ners/entity_recognition
sagemaker_notebook_insta...ship_extraction/package
entry_point.py
inference.py
35:44 (14%)
32:41 (14%)
view
8 x 2 sagemaker_notebook_insta...ners/question_answering
sagemaker_notebook_insta...ship_extraction/package
entry_point.py
inference.py
21:30 (18%)
32:41 (14%)
view
8 x 2 cloudformation
cloudformation/sagemaker
permissions.yaml
notebook-instance.yaml
18:27 (4%)
27:36 (8%)
view
8 x 2 sagemaker_notebook_insta...ship_extraction/package
sagemaker_notebook_insta...ontainers/summarization
inference.py
entry_point.py
32:41 (14%)
21:30 (17%)
view
6 x 2 sagemaker_notebook_insta...ners/question_answering
sagemaker_notebook_insta...ontainers/summarization
entry_point.py
entry_point.py
53:58 (13%)
54:59 (13%)
view
6 x 2 cloudformation/sagemaker
cloudformation
notebook-instance.yaml
template.yaml
29:34 (6%)
51:56 (2%)
view
6 x 2 sagemaker_notebook_insta...ners/question_answering
sagemaker_notebook_insta...ship_extraction/package
entry_point.py
inference.py
53:58 (13%)
68:73 (10%)
view
6 x 2 cloudformation
cloudformation
permissions.yaml
permissions.yaml
109:114 (3%)
136:141 (3%)
view
6 x 2 sagemaker_notebook_insta...ners/entity_recognition
sagemaker_notebook_insta...ontainers/summarization
entry_point.py
entry_point.py
67:72 (10%)
54:59 (13%)
view
6 x 2 sagemaker_notebook_insta...ners/entity_recognition
sagemaker_notebook_insta...ners/question_answering
entry_point.py
entry_point.py
67:72 (10%)
53:58 (13%)
view
6 x 2 sagemaker_notebook_insta...ners/entity_recognition
sagemaker_notebook_insta...ship_extraction/package
entry_point.py
inference.py
67:72 (10%)
68:73 (10%)
view
6 x 2 sagemaker_notebook_insta...ship_extraction/package
sagemaker_notebook_insta...ontainers/summarization
inference.py
entry_point.py
68:73 (10%)
54:59 (13%)
view
6 x 2 cloudformation
cloudformation
permissions.yaml
template.yaml
20:25 (3%)
51:56 (2%)
view