awslabs / aws-cloudendure-migration-factory-solution
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
  • 51% duplication:
    • 17,957 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 9,292 duplicated lines
  • 2,006 duplicates
system51% (9,292 lines)
Duplication per Extension
py60% (6,404 lines)
js39% (2,606 lines)
ps155% (160 lines)
css34% (122 lines)
Duplication per Component (primary)
frontend/src38% (2,667 lines)
Tools Integration/CE-Integration65% (2,363 lines)
Tools Integration/MGN-Integration58% (2,084 lines)
backend/lambda_defaultschema78% (861 lines)
backend/lambda_schema_wave87% (119 lines)
backend/lambda_schema_server87% (119 lines)
backend/lambda_schema_app76% (110 lines)
backend/lambda_build40% (92 lines)
backend/lambda_server_item54% (77 lines)
backend/policy24% (77 lines)
backend/lambda_ams_wig36% (74 lines)
backend/lambda_servers67% (74 lines)
backend/lambda_apps61% (61 lines)
frontend/layout62% (61 lines)
backend/lambda_app_item44% (57 lines)
backend/lambda_service_account55% (53 lines)
backend/lambda_migrationtracker_glue_scriptcopy55% (48 lines)
backend/lambda_migrationtracker_glue_execute60% (48 lines)
Tools Integration/migration-tracker67% (46 lines)
backend/lambda_waves56% (40 lines)
backend/lambda_wave_item32% (39 lines)
backend/lambda_stage_attr31% (29 lines)
backend/lambda_stage32% (29 lines)
backend/lambda_role40% (26 lines)
backend/lambda_role_item32% (26 lines)
backend/lambda_reset16% (6 lines)
backend/lambda_login25% (6 lines)
backend/lambda_auth0% (0 lines)
backend/helper0% (0 lines)
backend/lambda_cognitogroups0% (0 lines)
backend/lambda_run_athena_savedquery0% (0 lines)

Duplication Between Components (50+ lines)

G Tools Integration/CE-Integration Tools Integration/CE-Integration Tools Integration/MGN-Integration Tools Integration/MGN-Integration Tools Integration/CE-Integration--Tools Integration/MGN-Integration 3272 backend/lambda_ams_wig backend/lambda_ams_wig Tools Integration/CE-Integration--backend/lambda_ams_wig 249 backend/lambda_schema_server backend/lambda_schema_server backend/lambda_schema_wave backend/lambda_schema_wave backend/lambda_schema_server--backend/lambda_schema_wave 238 backend/lambda_schema_app backend/lambda_schema_app backend/lambda_schema_app--backend/lambda_schema_server 192 backend/lambda_schema_app--backend/lambda_schema_wave 192 frontend/layout frontend/layout frontend/src frontend/src frontend/layout--frontend/src 122 backend/lambda_server_item backend/lambda_server_item backend/lambda_servers backend/lambda_servers backend/lambda_server_item--backend/lambda_servers 120 backend/lambda_defaultschema backend/lambda_defaultschema backend/lambda_service_account backend/lambda_service_account backend/lambda_defaultschema--backend/lambda_service_account 106 backend/lambda_build backend/lambda_build backend/lambda_build--backend/lambda_defaultschema 102 backend/lambda_build--backend/lambda_service_account 102 backend/lambda_migrationtracker_glue_execute backend/lambda_migrationtracker_glue_execute backend/lambda_migrationtracker_glue_scriptcopy backend/lambda_migrationtracker_glue_scriptcopy backend/lambda_migrationtracker_glue_execute--backend/lambda_migrationtracker_glue_scriptcopy 96 backend/lambda_app_item backend/lambda_app_item backend/lambda_apps backend/lambda_apps backend/lambda_app_item--backend/lambda_apps 74 backend/lambda_stage backend/lambda_stage backend/lambda_stage_attr backend/lambda_stage_attr backend/lambda_stage--backend/lambda_stage_attr 58 backend/lambda_role backend/lambda_role backend/lambda_role_item backend/lambda_role_item backend/lambda_role--backend/lambda_role_item 52

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 2,006 duplicates...
Size#FoldersFilesLinesCode
98 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
0-Prerequisites-checks.py
0-Prerequisites-checks.py
155:258 (26%)
247:350 (20%)
view
89 x 2 source/backend/lambda_schema_server
source/backend/lambda_schema_wave
lambda_schema_server.py
lambda_schema_wave.py
73:162 (65%)
73:162 (65%)
view
81 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
mfcommon.py
mfcommon.py
113:203 (25%)
97:187 (23%)
view
78 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
mfcommon.py
mfcommon.py
303:384 (24%)
189:270 (23%)
view
75 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
1-Install-Linux.py
1-Install-Linux.py
22:103 (38%)
22:103 (38%)
view
73 x 2 source/backend/lambda_defaultschema/schema
source/backend/lambda_defaultschema/schema
stages.py
stages.py
255:327 (13%)
332:404 (13%)
view
70 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
2-UserMgmt-Linux.py
2-UserMgmt.py
32:107 (34%)
39:114 (27%)
view
68 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
0-Prerequisites-checks.py
0-Prerequisites-checks.py
81:153 (18%)
173:245 (14%)
view
61 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
1-Install-Linux.py
1-Install-Linux.py
106:175 (31%)
106:175 (31%)
view
60 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
4-Shutdown-all-servers.py
4-Shutdown-all-servers.py
31:94 (55%)
34:97 (53%)
view
53 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
mfcommon.py
0-Prerequisites-checks.py
243:300 (16%)
69:126 (11%)
view
51 x 2 source/backend/lambda_defaultschema/schema
source/backend/lambda_defaultschema/schema
stages.py
stages.py
255:305 (9%)
486:536 (9%)
view
51 x 2 source/backend/lambda_defaultschema/schema
source/backend/lambda_defaultschema/schema
stages.py
stages.py
332:382 (9%)
486:536 (9%)
view
50 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
2-UserMgmt-Linux.py
2-UserMgmt.py
109:162 (24%)
116:168 (19%)
view
50 x 2 source/Tools Integr.../MGN-automation-scripts
source/Tools Integr.../MGN-automation-scripts
3-Verify-instance-status.py
4-Get-instance-IP.py
31:87 (25%)
30:86 (37%)
view
47 x 2 source/backend/lambda_defaultschema/schema
source/backend/lambda_defaultschema/schema
stages.py
stages.py
255:301 (8%)
409:455 (8%)
view
47 x 2 source/backend/lambda_defaultschema/schema
source/backend/lambda_defaultschema/schema
stages.py
stages.py
409:455 (8%)
486:532 (8%)
view
47 x 2 source/backend/lambda_defaultschema/schema
source/backend/lambda_defaultschema/schema
stages.py
stages.py
332:378 (8%)
409:455 (8%)
view
46 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr...n/CE-automation-scripts
3-Verify-instance-status.py
mfcommon.py
72:117 (16%)
339:384 (14%)
view
46 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
3-Verify-instance-status.py
mfcommon.py
72:117 (16%)
225:270 (13%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 51 unit duplicates...
Size#FoldersFilesLinesCode
57 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
mfcommon.py
mfcommon.py
0:0 
0:0 
view
50 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
mfcommon.py
mfcommon.py
0:0 
0:0 
view
49 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
0-Prerequisites-checks.py
0-Prerequisites-checks.py
0:0 
0:0 
view
45 x 3 source/frontend/src/containers
source/frontend/src/containers
source/frontend/src/containers
UserWaves.js
UserApps.js
UserServers.js
59:109 
74:124 
50:100 
view
34 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
0-Import-tags.py
0-Import-tags.py
0:0 
0:0 
view
29 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
2-UserMgmt-Linux.py
2-UserMgmt.py
0:0 
0:0 
view
29 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
4-Shutdown-all-servers.py
4-Shutdown-all-servers.py
0:0 
0:0 
view
29 x 2 source/Tools Integr.../MGN-automation-scripts
source/Tools Integr.../MGN-automation-scripts
4-Get-instance-IP.py
3-Verify-instance-status.py
0:0 
0:0 
view
27 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
mfcommon.py
mfcommon.py
0:0 
0:0 
view
26 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
1-Install-Linux.py
1-Install-Linux.py
0:0 
0:0 
view
27 x 2 source/backend/lambda_mi...tracker_glue_scriptcopy
source/backend/lambda_mi...iontracker_glue_execute
lambda_migrationtracker_glue_scriptco...
lambda_migrationtracker_glue_execute.py
0:0 
0:0 
view
24 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
0-Prerequisites-checks.py
0-Prerequisites-checks.py
0:0 
0:0 
view
24 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
0-Prerequisites-checks.py
0-Prerequisites-checks.py
0:0 
0:0 
view
29 x 3 source/backend/lambda_defaultschema
source/backend/lambda_service_account
source/backend/lambda_build
lambda_defaultschema.py
lambda_service_account.py
lambda_build.py
0:0 
0:0 
0:0 
view
25 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr...n/CE-automation-scripts
4-Get-instance-IP.py
3-Verify-instance-status.py
0:0 
0:0 
view
23 x 2 source/Tools Integr.../CE-Integration/Lambdas
source/backend/lambda_ams_wig
CloudEndure.py
lambda_ams_wig.py
0:0 
0:0 
view
22 x 3 source/frontend/src/containers
source/frontend/src/containers
source/frontend/src/containers
AdminRole.js
AdminStage.js
AdminAttribute.js
57:79 
57:79 
64:86 
view
23 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr...n/CE-automation-scripts
4-Get-instance-IP.py
3-Verify-instance-status.py
0:0 
0:0 
view
20 x 8 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr...n/CE-automation-scripts
source/Tools Integr...n/CE-automation-scripts
source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
source/Tools Integr.../MGN-automation-scripts
source/Tools Integr.../MGN-automation-scripts
source/Tools Integr.../MGN-automation-scripts
2-UserMgmt-Linux.py
4-Shutdown-all-servers.py
1-Install-Linux.py
1-FileCopy-Linux.py
2-UserMgmt.py
1-FileCopy.py
4-Shutdown-all-servers.py
1-Install-Linux.py
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
20 x 2 source/Tools Integr...n/CE-automation-scripts
source/Tools Integr.../MGN-automation-scripts
2-UserMgmt-Linux.py
2-UserMgmt.py
0:0 
0:0 
view