aws-samples / sagemaker-studio-emr
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
  • 80% duplication:
    • 3,685 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,960 duplicated lines
  • 223 duplicates
system80% (2,960 lines)
Duplication per Extension
yaml79% (2,834 lines)
py100% (126 lines)
Duplication per Component (primary)
workshop/setup/no-existing-studio-domain78% (993 lines)
emr_templates70% (987 lines)
workshop/setup/existing-studio-domain94% (854 lines)
workshop100% (63 lines)
blog_example_code100% (63 lines)

Duplication Between Components (50+ lines)

G workshop/setup/existing-studio-domain workshop/setup/existing-studio-domain workshop/setup/no-existing-studio-domain workshop/setup/no-existing-studio-domain workshop/setup/existing-studio-domain--workshop/setup/no-existing-studio-domain 1694 emr_templates emr_templates emr_templates--workshop/setup/existing-studio-domain 1578 emr_templates--workshop/setup/no-existing-studio-domain 1589 blog_example_code blog_example_code workshop workshop blog_example_code--workshop 126

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 223 duplicates...
Size#FoldersFilesLinesCode
307 x 2 workshop/setup/existing-studio-domain
workshop/setup/no-existing-studio-domain
CFN-EMR-ExistingStudioNoAuthTemplate....
CFN-EMR-NoStudioNoAuthTemplate.yaml
175:481 (42%)
175:481 (42%)
view
307 x 2 emr_templates
workshop/setup/existing-studio-domain
single-account.yaml
CFN-EMR-ExistingStudioNoAuthTemplate....
184:490 (41%)
175:481 (42%)
view
307 x 2 emr_templates
workshop/setup/no-existing-studio-domain
single-account.yaml
CFN-EMR-NoStudioNoAuthTemplate.yaml
184:490 (41%)
175:481 (42%)
view
194 x 2 emr_templates
workshop/setup/existing-studio-domain
single-account.yaml
CFN-EMR-ExistingStudioNoAuthTemplate....
510:705 (26%)
501:696 (26%)
view
194 x 2 workshop/setup/existing-studio-domain
workshop/setup/no-existing-studio-domain
CFN-EMR-ExistingStudioNoAuthTemplate....
CFN-EMR-NoStudioNoAuthTemplate.yaml
501:696 (26%)
501:696 (26%)
view
194 x 2 emr_templates
workshop/setup/no-existing-studio-domain
single-account.yaml
CFN-EMR-NoStudioNoAuthTemplate.yaml
510:705 (26%)
501:696 (26%)
view
111 x 2 workshop/setup/existing-studio-domain
workshop/setup/no-existing-studio-domain
CFN-SageMakerEMRNoAuthProduct.yaml
CFN-SagemakerEMRNoAuthProductWithStud...
44:161 (64%)
404:521 (20%)
view
70 x 2 workshop/setup/existing-studio-domain
workshop/setup/no-existing-studio-domain
CFN-EMR-ExistingStudioNoAuthTemplate....
CFN-EMR-NoStudioNoAuthTemplate.yaml
5:75 (9%)
5:75 (9%)
view
68 x 2 workshop/setup/existing-studio-domain
workshop/setup/no-existing-studio-domain
CFN-EMR-ExistingStudioNoAuthTemplate....
CFN-EMR-NoStudioNoAuthTemplate.yaml
97:164 (9%)
97:164 (9%)
view
68 x 2 emr_templates
workshop/setup/existing-studio-domain
single-account.yaml
CFN-EMR-ExistingStudioNoAuthTemplate....
106:173 (9%)
97:164 (9%)
view
68 x 2 emr_templates
workshop/setup/no-existing-studio-domain
single-account.yaml
CFN-EMR-NoStudioNoAuthTemplate.yaml
106:173 (9%)
97:164 (9%)
view
63 x 2 blog_example_code
workshop
preprocessing.py
preprocessing.py
9:107 (100%)
11:108 (100%)
view
60 x 2 emr_templates
workshop/setup/existing-studio-domain
single-account.yaml
CFN-EMR-ExistingStudioNoAuthTemplate....
1:60 (8%)
1:60 (8%)
view
56 x 2 emr_templates
workshop/setup/no-existing-studio-domain
single-account.yaml
CFN-EMR-NoStudioNoAuthTemplate.yaml
5:60 (7%)
5:60 (7%)
view
51 x 2 emr_templates
workshop/setup/no-existing-studio-domain
cross-account.yaml
CFN-EMR-NoStudioNoAuthTemplate.yaml
519:571 (7%)
594:646 (6%)
view
51 x 2 emr_templates
workshop/setup/existing-studio-domain
cross-account.yaml
CFN-EMR-ExistingStudioNoAuthTemplate....
519:571 (7%)
594:646 (6%)
view
51 x 2 emr_templates
emr_templates
cross-account.yaml
single-account.yaml
519:571 (7%)
603:655 (6%)
view
36 x 2 emr_templates
workshop/setup/no-existing-studio-domain
single-account.yaml
CFN-EMR-NoStudioNoAuthTemplate.yaml
707:742 (4%)
698:733 (4%)
view
36 x 2 emr_templates
workshop/setup/existing-studio-domain
single-account.yaml
CFN-EMR-ExistingStudioNoAuthTemplate....
707:742 (4%)
698:733 (4%)
view
36 x 2 workshop/setup/existing-studio-domain
workshop/setup/no-existing-studio-domain
CFN-EMR-ExistingStudioNoAuthTemplate....
CFN-EMR-NoStudioNoAuthTemplate.yaml
698:733 (4%)
698:733 (4%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 workshop
blog_example_code
preprocessing.py
preprocessing.py
0:0 
0:0 
view
7 x 2 workshop
blog_example_code
preprocessing.py
preprocessing.py
0:0 
0:0 
view