aws-samples / aws-serverless-workshop-greater-china-region
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
  • 86% duplication:
    • 12,403 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 10,779 duplicated lines
  • 245 duplicates
system86% (10,779 lines)
Duplication per Extension
py92% (10,553 lines)
yaml35% (122 lines)
js20% (54 lines)
yml23% (26 lines)
ts8% (24 lines)
Duplication per Component (primary)
Others_Labs98% (10,262 lines)
Unclassified56% (352 lines)
Lab12-Lambda_EFS_Inference43% (71 lines)
Lab13-Dump-DynamoDB-into-CSV-Stored-in-S311% (32 lines)
Lab6-StepFunction9% (30 lines)
Lab8B-CICD-Jenkins28% (13 lines)
Lab8A-CICD-CodePipeline16% (13 lines)
Lab4-WildRyde-WebApplication9% (6 lines)
Lab11-Provision-Concurrency0% (0 lines)
Lab10-DynamoDB-Stream-EventBridge0% (0 lines)
Lab7-WechatPush0% (0 lines)
Others_Tools0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 245 duplicates...
Size#FoldersFilesLinesCode
953 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
9:1139 (100%)
9:1139 (100%)
view
887 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
scanner.py
scanner.py
27:1446 (100%)
27:1446 (100%)
view
566 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
constructor.py
constructor.py
2:674 (100%)
2:674 (100%)
view
408 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
parser.py
parser.py
62:588 (100%)
62:588 (100%)
view
354 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
representer.py
representer.py
2:485 (100%)
2:485 (100%)
view
330 x 2 Others_Labs/code/Survey-Survey/yattag
Others_Labs/code/SurveySubmit/yattag
doc.py
doc.py
3:454 (100%)
3:454 (100%)
view
248 x 2 Others_Labs/code/Survey-Survey/yattag
Others_Labs/code/SurveySubmit/yattag
indentation.py
indentation.py
3:305 (100%)
3:305 (100%)
view
186 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
resolver.py
resolver.py
2:226 (100%)
2:226 (100%)
view
159 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
__init__.py
__init__.py
11:314 (100%)
11:314 (100%)
view
150 x 2 Others_Labs/code/Survey-Survey/yattag
Others_Labs/code/SurveySubmit/yattag
simpledoc.py
simpledoc.py
1:411 (100%)
1:411 (100%)
view
137 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
reader.py
reader.py
18:183 (100%)
18:183 (100%)
view
122 x 2 Lab3-S3ImageConvert_LambdaLayer+CDK/cdk/lambda
Lab3-S3ImageConvert_LambdaLayer+CDK
lambda_function.py
lambda_handler.py
53:202 (82%)
52:201 (83%)
view
99 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
composer.py
composer.py
2:138 (100%)
2:138 (100%)
view
92 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
serializer.py
serializer.py
2:110 (100%)
2:110 (100%)
view
79 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
tokens.py
tokens.py
2:103 (100%)
2:103 (100%)
view
67 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
events.py
events.py
4:85 (100%)
4:85 (100%)
view
65 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
error.py
error.py
2:74 (100%)
2:74 (100%)
view
62 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
cyaml.py
cyaml.py
2:84 (100%)
2:84 (100%)
view
53 x 2 Others_Labs/code/Survey-Survey
Others_Labs/code/SurveySubmit
survey.py
survey.py
22:90 (81%)
14:82 (88%)
view
49 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
dumper.py
dumper.py
2:61 (100%)
2:61 (100%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 254 unit duplicates...
Size#FoldersFilesLinesCode
135 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view
99 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
parser.py
parser.py
0:0 
0:0 
view
74 x 2 Others_Labs/code/Survey-Survey/yattag
Others_Labs/code/SurveySubmit/yattag
indentation.py
indentation.py
0:0 
0:0 
view
57 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view
52 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view
52 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view
52 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view
48 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
constructor.py
constructor.py
0:0 
0:0 
view
77 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
scanner.py
scanner.py
0:0 
0:0 
view
64 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
scanner.py
scanner.py
0:0 
0:0 
view
55 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
representer.py
representer.py
0:0 
0:0 
view
41 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
scanner.py
scanner.py
0:0 
0:0 
view
51 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
resolver.py
resolver.py
0:0 
0:0 
view
40 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
scanner.py
scanner.py
0:0 
0:0 
view
38 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
scanner.py
scanner.py
0:0 
0:0 
view
36 x 2 Lab3-S3ImageConvert_LambdaLayer+CDK/cdk/lambda
Lab3-S3ImageConvert_LambdaLayer+CDK
lambda_function.py
lambda_handler.py
0:0 
0:0 
view
40 x 2 Lab3-S3ImageConvert_LambdaLayer+CDK/cdk/lambda
Lab3-S3ImageConvert_LambdaLayer+CDK
lambda_function.py
lambda_handler.py
0:0 
0:0 
view
53 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view
35 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view
35 x 2 Others_Labs/code/Survey-Survey/yaml
Others_Labs/code/SurveySubmit/yaml
emitter.py
emitter.py
0:0 
0:0 
view