aws-samples / getting-started-with-amazon-redshift-data-api
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
  • 49% duplication:
    • 4,356 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,158 duplicated lines
  • 188 duplicates
system49% (2,158 lines)
Duplication per Extension
yaml55% (1,692 lines)
py67% (397 lines)
js16% (52 lines)
ts11% (17 lines)
Duplication per Component (primary)
use-cases/lambda-chaining-with-redshift-data-api87% (654 lines)
use-cases/aws-lambda-redshift-event-driven-etl90% (482 lines)
use-cases/etl-orchestration-with-lambda-and-step-functions66% (280 lines)
use-cases/analytical-reporting-event-driven-web-app26% (254 lines)
use-cases/etl-orchestration-with-step-functions48% (251 lines)
use-cases/ec2-redshift-access25% (91 lines)
use-cases/sagemaker-notebook-redshift-ml61% (77 lines)
quick-start/javascript43% (43 lines)
quick-start/typescript7% (26 lines)
quick-start/go0% (0 lines)
quick-start/java0% (0 lines)
quick-start/python0% (0 lines)

Duplication Between Components (50+ lines)

G use-cases/aws-lambda-redshift-event-driven-etl use-cases/aws-lambda-redshift-event-driven-etl use-cases/lambda-chaining-with-redshift-data-api use-cases/lambda-chaining-with-redshift-data-api use-cases/aws-lambda-redshift-event-driven-etl--use-cases/lambda-chaining-with-redshift-data-api 1037 use-cases/etl-orchestration-with-step-functions use-cases/etl-orchestration-with-step-functions use-cases/aws-lambda-redshift-event-driven-etl--use-cases/etl-orchestration-with-step-functions 53 use-cases/etl-orchestration-with-lambda-and-step-functions use-cases/etl-orchestration-with-lambda-and-step-functions use-cases/etl-orchestration-with-lambda-and-step-functions--use-cases/etl-orchestration-with-step-functions 194 use-cases/etl-orchestration-with-step-functions--use-cases/lambda-chaining-with-redshift-data-api 53 use-cases/ec2-redshift-access use-cases/ec2-redshift-access use-cases/sagemaker-notebook-redshift-ml use-cases/sagemaker-notebook-redshift-ml use-cases/ec2-redshift-access--use-cases/sagemaker-notebook-redshift-ml 150 use-cases/analytical-reporting-event-driven-web-app use-cases/analytical-reporting-event-driven-web-app use-cases/analytical-reporting-event-driven-web-app--use-cases/etl-orchestration-with-lambda-and-step-functions 120 use-cases/analytical-reporting-event-driven-web-app--use-cases/etl-orchestration-with-step-functions 116 use-cases/analytical-reporting-event-driven-web-app--use-cases/sagemaker-notebook-redshift-ml 62 quick-start/javascript quick-start/javascript quick-start/javascript--use-cases/analytical-reporting-event-driven-web-app 56

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 188 duplicates...
Size#FoldersFilesLinesCode
89 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...loud_formation_template
event-driven-redshift-pipeline.yaml
lambda-chaining-with-redshift-data-ap...
317:413 (22%)
349:437 (17%)
view
81 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...loud_formation_template
event-driven-redshift-pipeline.yaml
lambda-chaining-with-redshift-data-ap...
233:315 (20%)
267:347 (15%)
view
73 x 2 use-cases/lambda-chainin...dshift-data-api/scripts
use-cases/lambda-chainin...dshift-data-api/scripts
LambdaRedshiftDataApiETL.py
LambdaRedshiftDataApiUnload.py
8:104 (100%)
8:104 (100%)
view
55 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...loud_formation_template
event-driven-redshift-pipeline.yaml
lambda-chaining-with-redshift-data-ap...
49:103 (14%)
59:113 (10%)
view
48 x 2 use-cases/lambda-chainin...loud_formation_template
use-cases/lambda-chainin...loud_formation_template
lambda-chaining-with-redshift-data-ap...
lambda-chaining-with-redshift-data-ap...
241:291 (9%)
495:545 (9%)
view
43 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...loud_formation_template
event-driven-redshift-pipeline.yaml
lambda-chaining-with-redshift-data-ap...
160:224 (10%)
199:256 (8%)
view
38 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...dshift-data-api/scripts
event-driven-redshift-pipeline.yaml
LambdaRedshiftSetupObjects.py
350:390 (9%)
28:65 (45%)
view
38 x 2 use-cases/lambda-chainin...loud_formation_template
use-cases/lambda-chainin...dshift-data-api/scripts
lambda-chaining-with-redshift-data-ap...
LambdaRedshiftSetupObjects.py
379:416 (7%)
28:65 (45%)
view
32 x 2 use-cases/lambda-chainin...loud_formation_template
use-cases/lambda-chainin...dshift-data-api/scripts
lambda-chaining-with-redshift-data-ap...
LambdaRedshiftDataApiUnload.py
242:276 (6%)
50:86 (43%)
view
32 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/aws-lambda-redshift-event-driven-etl
LambdaRedshiftDataApiETL.py
event-driven-redshift-pipeline.yaml
60:93 (51%)
225:259 (8%)
view
32 x 2 use-cases/lambda-chainin...loud_formation_template
use-cases/lambda-chainin...dshift-data-api/scripts
lambda-chaining-with-redshift-data-ap...
LambdaRedshiftDataApiETL.py
242:276 (6%)
50:86 (43%)
view
32 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...loud_formation_template
LambdaSetupRedshiftObjects.py
lambda-chaining-with-redshift-data-ap...
22:55 (40%)
373:404 (6%)
view
32 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/aws-lambda-redshift-event-driven-etl
LambdaSetupRedshiftObjects.py
event-driven-redshift-pipeline.yaml
22:55 (40%)
344:377 (8%)
view
32 x 2 use-cases/lambda-chainin...loud_formation_template
use-cases/lambda-chainin...dshift-data-api/scripts
lambda-chaining-with-redshift-data-ap...
LambdaRedshiftDataApiETL.py
496:530 (6%)
50:86 (43%)
view
32 x 2 use-cases/lambda-chainin...loud_formation_template
use-cases/lambda-chainin...dshift-data-api/scripts
lambda-chaining-with-redshift-data-ap...
LambdaRedshiftDataApiUnload.py
496:530 (6%)
50:86 (43%)
view
29 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...loud_formation_template
event-driven-redshift-pipeline.yaml
lambda-chaining-with-redshift-data-ap...
160:205 (7%)
444:484 (5%)
view
29 x 2 use-cases/lambda-chainin...loud_formation_template
use-cases/lambda-chainin...loud_formation_template
lambda-chaining-with-redshift-data-ap...
lambda-chaining-with-redshift-data-ap...
199:239 (5%)
444:484 (5%)
view
26 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...dshift-data-api/scripts
LambdaSetupRedshiftObjects.py
LambdaRedshiftSetupObjects.py
28:55 (32%)
28:53 (31%)
view
25 x 2 use-cases/etl-orchestrat...loud_formation_template
use-cases/etl-orchestrat...and-step-functions/code
etl-orchestration-with-stepfunctions-...
redshift_batch_data_api.py
158:195 (6%)
48:85 (48%)
view
25 x 2 use-cases/aws-lambda-redshift-event-driven-etl
use-cases/lambda-chainin...loud_formation_template
LambdaRedshiftDataApiETL.py
lambda-chaining-with-redshift-data-ap...
67:93 (40%)
521:545 (4%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
46 x 2 use-cases/lambda-chainin...dshift-data-api/scripts
use-cases/lambda-chainin...dshift-data-api/scripts
LambdaRedshiftDataApiUnload.py
LambdaRedshiftDataApiETL.py
0:0 
0:0 
view
15 x 2 use-cases/lambda-chainin...dshift-data-api/scripts
use-cases/lambda-chainin...dshift-data-api/scripts
LambdaRedshiftDataApiUnload.py
LambdaRedshiftDataApiETL.py
0:0 
0:0 
view
13 x 2 use-cases/lambda-chainin...dshift-data-api/scripts
use-cases/lambda-chainin...dshift-data-api/scripts
LambdaRedshiftDataApiUnload.py
LambdaRedshiftDataApiETL.py
0:0 
0:0 
view
6 x 2 use-cases/lambda-chainin...dshift-data-api/scripts
use-cases/lambda-chainin...dshift-data-api/scripts
LambdaRedshiftDataApiUnload.py
LambdaRedshiftDataApiETL.py
0:0 
0:0 
view