aws-samples / aws-serverless-workshops
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
  • 23% duplication:
    • 31,638 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,558 duplicated lines
  • 1,515 duplicates
system23% (7,558 lines)
Duplication per Extension
yaml88% (3,671 lines)
js11% (1,831 lines)
css28% (1,223 lines)
yml76% (586 lines)
scss2% (100 lines)
py46% (67 lines)
ts11% (52 lines)
html3% (28 lines)
Duplication per Component (primary)
ImageProcessing/workshop/static94% (3,198 lines)
MultiRegion/2_UI/src9% (1,965 lines)
ImageProcessing/workshop/themes28% (1,239 lines)
MachineLearning/1_DataProcessing/cloudformation84% (466 lines)
MultiRegion/1_API75% (388 lines)
MachineLearning/3_Inference/cloudformation81% (114 lines)
ImageProcessing/src/cloudformation28% (85 lines)
MachineLearning/1_DataProcessing/lambda-functions100% (67 lines)
MultiRegion/2_UI/cfn36% (30 lines)
MachineLearning/2_ModelBuilding/cloudformation13% (6 lines)
ROOT0% (0 lines)
MachineLearning/1_DataProcessing/assets0% (0 lines)
MachineLearning/3_Inference/lambda-functions0% (0 lines)
ImageProcessing/src/lambda-functions0% (0 lines)
ImageProcessing/workshop0% (0 lines)

Duplication Between Components (50+ lines)

G ImageProcessing/src/cloudformation ImageProcessing/src/cloudformation ImageProcessing/workshop/static ImageProcessing/workshop/static ImageProcessing/src/cloudformation--ImageProcessing/workshop/static 242 MachineLearning/1_DataProcessing/cloudformation MachineLearning/1_DataProcessing/cloudformation MachineLearning/1_DataProcessing/lambda-functions MachineLearning/1_DataProcessing/lambda-functions MachineLearning/1_DataProcessing/cloudformation--MachineLearning/1_DataProcessing/lambda-functions 199 MachineLearning/3_Inference/cloudformation MachineLearning/3_Inference/cloudformation MachineLearning/1_DataProcessing/cloudformation--MachineLearning/3_Inference/cloudformation 88

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 1,515 duplicates...
Size#FoldersFilesLinesCode
109 x 2 MultiRegion/1_API
MultiRegion/1_API
wild-rydes-api-failover-region.yaml
wild-rydes-api-primary-region.yaml
1:112 (60%)
1:112 (56%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-south-1.yaml
setup-sam-ap-southeast-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-southeast-2.yaml
setup-sam-us-east-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-2.yaml
setup-sam-eu-west-1.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-southeast-2.yaml
setup-sam-eu-west-1.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-1.yaml
setup-sam-ap-northeast-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-us-east-2.yaml
setup-sam-us-west-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-eu-west-1.yaml
setup-sam-us-west-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-1.yaml
setup-sam-ap-south-1.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-1.yaml
setup-sam-ap-southeast-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-south-1.yaml
setup-sam-us-west-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-us-east-1.yaml
setup-sam.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-1.yaml
setup-sam-us-east-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-1.yaml
setup-sam-us-west-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-1.yaml
setup-sam-eu-west-1.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-2.yaml
setup-sam-ap-south-1.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-2.yaml
setup-sam-ap-southeast-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-south-1.yaml
setup-sam-us-east-2.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-south-1.yaml
setup-sam-eu-west-1.yaml
196:288 (28%)
196:288 (28%)
view
93 x 2 ImageProcessing/workshop...mation/legacy_templates
ImageProcessing/workshop...mation/legacy_templates
setup-sam-ap-northeast-2.yaml
setup-sam-us-west-2.yaml
196:288 (28%)
196:288 (28%)
view
Duplicated Units
The list of top 7 duplicated units.
See data for all 7 unit duplicates...
Size#FoldersFilesLinesCode
17 x 2 MultiRegion/2_UI/src/assets/js/aws
MultiRegion/2_UI/src/assets/js/aws
aws-cognito-sdk.js
aws-cognito-sdk.js
16031:16048 
16081:16098 
view
17 x 2 MultiRegion/2_UI/src/assets/js/aws
MultiRegion/2_UI/src/assets/js/aws
aws-cognito-sdk.js
aws-cognito-sdk.js
17276:17293 
17494:17511 
view
11 x 2 MultiRegion/2_UI/src/assets/js/aws
MultiRegion/2_UI/src/assets/js/aws
aws-cognito-sdk.js
aws-cognito-sdk.js
10814:10828 
15292:15306 
view
6 x 2 MultiRegion/2_UI/src/assets/js/aws
MultiRegion/2_UI/src/assets/js/aws
aws-cognito-sdk.js
aws-cognito-sdk.js
9129:9135 
12221:12227 
view
6 x 2 MultiRegion/2_UI/src/assets/js/aws
MultiRegion/2_UI/src/assets/js/aws
aws-cognito-sdk.js
aws-cognito-sdk.js
13651:13657 
13659:13665 
view
6 x 2 MultiRegion/2_UI/src/assets/js/aws
MultiRegion/2_UI/src/assets/js/aws
aws-cognito-sdk.js
aws-cognito-sdk.js
17330:17336 
17338:17344 
view
6 x 2 MultiRegion/2_UI/src/assets/js/aws
MultiRegion/2_UI/src/assets/js/aws
aws-cognito-sdk.js
aws-cognito-sdk.js
17371:17377 
17379:17385 
view