aws-samples / aws-saas-factory-ref-solution-serverless-saas
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
  • 46% duplication:
    • 10,330 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,761 duplicated lines
  • 1,244 duplicates
system46% (4,761 lines)
Duplication per Extension
yaml55% (2,351 lines)
ts42% (910 lines)
py36% (811 lines)
html52% (651 lines)
scss9% (38 lines)
Duplication per Component (primary)
server/nested_templates51% (1,547 lines)
server61% (804 lines)
clients/Admin59% (734 lines)
clients/Application39% (718 lines)
server/Resources94% (388 lines)
clients/Landing21% (147 lines)
server/layers52% (147 lines)
server/TenantManagementService14% (122 lines)
server/custom_resources45% (70 lines)
server/ProductService21% (42 lines)
server/OrderService22% (42 lines)
server/TenantPipeline0% (0 lines)

Duplication Between Components (50+ lines)

G server/nested_templates server/nested_templates server server server/nested_templates--server 1470 clients/Admin clients/Admin clients/Application clients/Application clients/Admin--clients/Application 1210 clients/Landing clients/Landing clients/Admin--clients/Landing 274 clients/Application--clients/Landing 54 server/OrderService server/OrderService server/ProductService server/ProductService server/OrderService--server/ProductService 60

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,244 duplicates...
Size#FoldersFilesLinesCode
123 x 2 server/Resources
server/Resources
shared_service_authorizer.py
tenant_authorizer.py
133:329 (60%)
137:333 (59%)
view
85 x 2 clients/Admin/src/app/tenants
clients/Landing/src/app/register
create.component.html
register.component.html
14:115 (84%)
14:115 (75%)
view
60 x 2 clients/Admin/src/app/views/dashboard
clients/Application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
126:195 (36%)
79:147 (51%)
view
46 x 2 server/layers
server/layers
auth_manager.py
auth_manager.py
126:171 (24%)
175:221 (24%)
view
44 x 2 clients/Admin/src/app/users/user-create
clients/Application/src/app/users/user-create
user-create.component.html
user-create.component.html
1:56 (41%)
1:55 (52%)
view
42 x 2 server/nested_templates/bootstrap
server/nested_templates/bootstrap
apigateway.yaml
apigateway_lambdapermissions.yaml
11:52 (3%)
9:50 (22%)
view
39 x 2 clients/Admin/src/app/views/auth/login-info
clients/Application/src/app/views/auth/login-info
login-info.component.html
login-info.component.html
1:60 (100%)
1:60 (100%)
view
38 x 2 clients/Application/src/...products/product-create
clients/Application/src/app/products/product-edit
product-create.component.html
product-edit.component.html
9:49 (64%)
31:71 (46%)
view
35 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
905:939 (3%)
942:976 (2%)
view
34 x 2 server/nested_templates/bootstrap
server/nested_templates/bootstrap
apigateway.yaml
apigateway.yaml
305:339 (3%)
899:933 (3%)
view
34 x 2 server/nested_templates/bootstrap
server/nested_templates/bootstrap
apigateway.yaml
apigateway.yaml
305:339 (3%)
831:865 (3%)
view
34 x 2 server/nested_templates/bootstrap
server/nested_templates/bootstrap
apigateway.yaml
apigateway.yaml
831:865 (3%)
899:933 (3%)
view
32 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
448:479 (2%)
894:925 (2%)
view
32 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
492:523 (2%)
894:925 (2%)
view
32 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
448:479 (2%)
847:878 (2%)
view
32 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
670:701 (2%)
847:878 (2%)
view
32 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
492:523 (2%)
847:878 (2%)
view
32 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
765:797 (2%)
666:697 (2%)
view
32 x 2 server
server
tenant-template.yaml
tenant-template.yaml
847:878 (2%)
939:970 (2%)
view
32 x 2 server/nested_templates/bootstrap
server
apigateway.yaml
tenant-template.yaml
670:701 (2%)
894:925 (2%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
38 x 2 server/Resources
server/Resources
tenant_authorizer.py
shared_service_authorizer.py
0:0 
0:0 
view
27 x 2 server/Resources
server/Resources
tenant_authorizer.py
shared_service_authorizer.py
0:0 
0:0 
view
15 x 2 server/Resources
server/Resources
tenant_authorizer.py
shared_service_authorizer.py
0:0 
0:0 
view
17 x 2 server/Resources
server/Resources
tenant_authorizer.py
shared_service_authorizer.py
0:0 
0:0 
view
11 x 2 server/ProductService
server/OrderService
product_service_dal.py
order_service_dal.py
0:0 
0:0 
view
8 x 2 clients/Admin/src/app/views/dashboard
clients/Application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
184:194 
137:146 
view
7 x 2 clients/Admin/src/app/views/auth/login-info
clients/Application/src/app/views/auth/login-info
login-info.component.ts
login-info.component.ts
38:45 
38:45 
view
8 x 2 server/Resources
server/Resources
tenant_authorizer.py
shared_service_authorizer.py
0:0 
0:0 
view