aws-samples / modernization-unicorn-store
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
  • 11% duplication:
    • 3,089 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 343 duplicated lines
  • 36 duplicates
system11% (343 lines)
Duplication per Extension
cshtml20% (207 lines)
cs5% (72 lines)
yaml13% (52 lines)
yml54% (12 lines)
Duplication per Component (primary)
UnicornStore/Views15% (121 lines)
UnicornStore/Areas32% (100 lines)
content/secrets13% (52 lines)
UnicornStore/Models13% (44 lines)
UnicornStore/Controllers2% (14 lines)
ROOT37% (12 lines)
UnicornStore/Properties0% (0 lines)
UnicornStore/wwwroot0% (0 lines)
UnicornStore0% (0 lines)
UnicornStore/Scripts0% (0 lines)
UnicornStore/ViewModels0% (0 lines)
UnicornStore/Components0% (0 lines)
UnicornStore/Data0% (0 lines)
UnicornStore/Pages0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 36 duplicates...
Size#FoldersFilesLinesCode
27 x 2 UnicornStore/Areas/Admin/Views/StoreManager
UnicornStore/Areas/Admin/Views/StoreManager
cshtml
Create.cshtml
Edit.cshtml
18:59 (55%)
19:60 (54%)
view
17 x 2 UnicornStore/Views/Account
UnicornStore/Views/Account
cshtml
Register.cshtml
ResetPassword.cshtml
12:34 (56%)
13:35 (54%)
view
14 x 2 UnicornStore/Areas/Admin/Controllers
UnicornStore/Controllers
StoreManagerController.cs
StoreController.cs
51:73 (13%)
56:78 (37%)
view
13 x 2 UnicornStore/Models
UnicornStore/Models
AccountViewModels.cs
AccountViewModels.cs
68:82 (18%)
87:101 (18%)
view
13 x 2 UnicornStore/Views/Account
UnicornStore/Views/Account
cshtml
Login.cshtml
Register.cshtml
13:29 (32%)
10:26 (43%)
view
12 x 2 UnicornStore/Views/Manage
UnicornStore/Views/Manage
cshtml
ChangePassword.cshtml
SetPassword.cshtml
19:34 (40%)
15:30 (44%)
view
11 x 2 UnicornStore/Views/Account
UnicornStore/Views/Account
cshtml
Login.cshtml
ResetPassword.cshtml
15:29 (27%)
13:27 (35%)
view
9 x 2 content/secrets/cfn
content/secrets/cfn
player-vpc-template.yaml
player-vpc-template.yaml
84:92 (5%)
118:126 (5%)
view
9 x 2 UnicornStore/Models
UnicornStore/Models
ManageViewModels.cs
ManageViewModels.cs
31:40 (17%)
50:59 (17%)
view
9 x 2 UnicornStore/Areas/Admin/Views/StoreManager
UnicornStore/Areas/Admin/Views/StoreManager
cshtml
Create.cshtml
Edit.cshtml
64:75 (18%)
65:76 (18%)
view
8 x 2 UnicornStore/Views/Account
UnicornStore/Views/Account
cshtml
ForgotPassword.cshtml
Login.cshtml
10:19 (40%)
13:22 (20%)
view
8 x 2 UnicornStore/Views/Account
UnicornStore/Views/Account
cshtml
ForgotPassword.cshtml
Register.cshtml
10:19 (40%)
10:19 (26%)
view
7 x 2 UnicornStore/Views/Account
UnicornStore/Views/Manage
cshtml
Register.cshtml
ChangePassword.cshtml
26:34 (23%)
26:34 (23%)
view
7 x 2 UnicornStore/Areas/Admin/Views/StoreManager
UnicornStore/Areas/Admin/Views/StoreManager
cshtml
Create.cshtml
Edit.cshtml
9:16 (14%)
9:16 (14%)
view
7 x 2 UnicornStore/Views/Account
UnicornStore/Views/Manage
cshtml
VerifyCode.cshtml
VerifyPhoneNumber.cshtml
19:27 (22%)
18:26 (28%)
view
7 x 2 UnicornStore/Views/Account
UnicornStore/Views/Manage
cshtml
ResetPassword.cshtml
SetPassword.cshtml
27:35 (22%)
22:30 (25%)
view
7 x 2 content/secrets/cfn
content/secrets/cfn
player-vpc-template.yaml
player-vpc-template.yaml
42:48 (3%)
59:65 (3%)
view
7 x 2 UnicornStore/Views/Account
UnicornStore/Views/Account
cshtml
ExternalLoginConfirmation.cshtml
ForgotPassword.cshtml
18:26 (28%)
12:20 (35%)
view
7 x 2 UnicornStore/Views/Account
UnicornStore/Views/Manage
cshtml
ResetPassword.cshtml
ChangePassword.cshtml
27:35 (22%)
26:34 (23%)
view
7 x 2 content/secrets/cfn
content/secrets/cfn
player-vpc-template.yaml
player-vpc-template.yaml
128:134 (3%)
138:144 (3%)
view