aws-samples / aws-saas-factory-eks-saas-workshop
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
  • 31% duplication:
    • 5,464 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,698 duplicated lines
  • 168 duplicates
system31% (1,698 lines)
Duplication per Extension
ts29% (1,051 lines)
html42% (381 lines)
yaml28% (244 lines)
scss20% (22 lines)
Duplication per Component (primary)
client/web/application40% (663 lines)
client/web/admin46% (561 lines)
services/application/apps36% (230 lines)
services/shared/apps13% (84 lines)
cdk/root/lib9% (46 lines)
cdk/eks/lib11% (36 lines)
scripts/templates8% (23 lines)
services/shared/libs47% (22 lines)
services/application/libs18% (22 lines)
scripts100% (11 lines)
ROOT0% (0 lines)
cdk/root0% (0 lines)
cdk/eks0% (0 lines)
scripts/policy0% (0 lines)

Duplication Between Components (50+ lines)

G client/web/admin client/web/admin client/web/application client/web/application client/web/admin--client/web/application 1115 services/application/apps services/application/apps services/shared/apps services/shared/apps services/application/apps--services/shared/apps 140

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 168 duplicates...
Size#FoldersFilesLinesCode
52 x 2 client/web/admin/src/app/users/user-create
client/web/application/src/app/users/user-create
user-create.component.html
user-create.component.html
1:66 (100%)
1:66 (100%)
view
49 x 2 client/web/admin/src/app/views/dashboard
client/web/application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
99:153 (23%)
38:92 (30%)
view
44 x 2 client/web/admin/src/app/views/dashboard
client/web/application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
163:209 (21%)
99:145 (27%)
view
32 x 2 client/web/admin/src/app/users/user-create
client/web/application/src/app/users/user-create
user-create.component.ts
user-create.component.ts
9:52 (100%)
9:52 (100%)
view
30 x 2 client/web/admin/src/app/users
client/web/application/src/app/users
users-routing.module.ts
users-routing.module.ts
12:47 (100%)
12:47 (100%)
view
26 x 2 client/web/admin/src/app/views/auth/login-info
client/web/application/s...p/views/auth/login-info
login-info.component.html
login-info.component.html
10:51 (81%)
8:49 (83%)
view
25 x 2 client/web/admin/src/app/users/user-list
client/web/application/src/app/users/user-list
user-list.component.html
user-list.component.html
1:31 (100%)
1:31 (100%)
view
24 x 2 client/web/admin/src/app
client/web/application/src/app
app-routing.module.ts
app.routing.ts
15:43 (50%)
14:42 (52%)
view
19 x 2 client/web/admin/src/app/views/dashboard
client/web/application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
212:233 (9%)
148:169 (11%)
view
17 x 2 cdk/root/lib/admin
cdk/root/lib/tenant-infra
admin-stack.ts
tenant-infra-stack.ts
45:61 (26%)
49:65 (8%)
view
16 x 2 client/web/admin/src/app/views/auth/login-info
client/web/application/s...p/views/auth/login-info
login-info.component.ts
login-info.component.ts
11:28 (64%)
11:28 (76%)
view
16 x 2 services/application/libs/auth/src
services/shared/libs/auth/src
jwt.strategy.ts
jwt.strategy.ts
11:29 (64%)
7:25 (94%)
view
15 x 2 client/web/admin/src/app/views/dashboard
client/web/application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
127:141 (7%)
59:73 (9%)
view
15 x 2 services/application/apps/order/k8s
services/application/apps/user/k8s
template.yaml
template.yaml
35:50 (22%)
33:48 (23%)
view
15 x 2 client/web/admin/src/app/views/dashboard
client/web/application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
120:134 (7%)
66:80 (9%)
view
15 x 2 client/web/admin/src/app/views/dashboard
client/web/admin/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
120:134 (7%)
127:141 (7%)
view
15 x 2 client/web/application/src/app/views/dashboard
client/web/application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
59:73 (9%)
66:80 (9%)
view
14 x 2 client/web/admin/src/app/views/error
client/web/application/src/app/views/error
404.component.html
404.component.html
1:16 (100%)
1:16 (100%)
view
14 x 2 client/web/admin/src/app/views/error
client/web/application/src/app/views/error
500.component.html
500.component.html
1:16 (100%)
1:16 (100%)
view
12 x 2 client/web/application/s...products/product-create
client/web/application/s...p/products/product-edit
product-create.component.html
product-edit.component.html
20:32 (26%)
33:45 (19%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
8 x 2 client/web/admin/src/app/views/dashboard
client/web/application/src/app/views/dashboard
dashboard.component.ts
dashboard.component.ts
223:232 
159:168 
view
7 x 2 client/web/admin/src/app
client/web/application/src/app
app.component.ts
app.component.ts
17:24 
18:25 
view
6 x 2 client/web/admin/src/app/users/user-create
client/web/application/src/app/users/user-create
user-create.component.ts
user-create.component.ts
47:53 
47:53 
view
13 x 2 services/shared/libs/auth/src
services/application/libs/auth/src
jwt.strategy.ts
jwt.strategy.ts
9:23 
13:27 
view