aws-samples / dotnet-serverless-imagerecognition
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
  • 39% duplication:
    • 3,394 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,327 duplicated lines
  • 101 duplicates
system39% (1,327 lines)
Duplication per Extension
cs39% (827 lines)
cshtml54% (401 lines)
yml55% (59 lines)
razor12% (40 lines)
Duplication per Component (primary)
UI/mvc-frontend56% (576 lines)
UI/Blazor40% (536 lines)
API/ImageRecognition.API30% (94 lines)
s3Trigger37% (30 lines)
StepFunctions/Common15% (23 lines)
Communication/ImageRecognition.Communication.Functions15% (21 lines)
StepFunctions/store-image-metadata23% (18 lines)
StepFunctions64% (11 lines)
StepFunctions/transform-metadata16% (9 lines)
StepFunctions/thumbnail17% (9 lines)
Utils0% (0 lines)
StepFunctions/rekognition0% (0 lines)
StepFunctions/extract-image-metadata0% (0 lines)
Clients/ImageRecognition.API.Client.Generator0% (0 lines)

Duplication Between Components (50+ lines)

G UI/Blazor UI/Blazor UI/mvc-frontend UI/mvc-frontend UI/Blazor--UI/mvc-frontend 906 API/ImageRecognition.API API/ImageRecognition.API API/ImageRecognition.API--UI/mvc-frontend 174 s3Trigger s3Trigger API/ImageRecognition.API--s3Trigger 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 101 duplicates...
Size#FoldersFilesLinesCode
46 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
Login.cshtml.cs
Login.cshtml.cs
1:99 (100%)
1:99 (100%)
view
43 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
ResetPassword.cshtml.cs
ResetPassword.cshtml.cs
1:79 (100%)
1:79 (100%)
view
43 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
ChangePassword.cshtml.cs
ChangePassword.cshtml.cs
1:79 (100%)
1:79 (100%)
view
41 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
LoginWith2fa.cshtml.cs
LoginWith2fa.cshtml.cs
1:81 (100%)
1:81 (100%)
view
29 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
cshtml
ResetPassword.cshtml
ResetPassword.cshtml
1:33 (87%)
1:33 (87%)
view
29 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
cshtml
ChangePassword.cshtml
ChangePassword.cshtml
1:33 (87%)
1:33 (87%)
view
28 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
cshtml
Register.cshtml
Register.cshtml
1:33 (87%)
1:33 (87%)
view
27 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
cshtml
Login.cshtml
Login.cshtml
1:34 (75%)
1:34 (45%)
view
23 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
cshtml
LoginWith2fa.cshtml
LoginWith2fa.cshtml
1:28 (85%)
1:28 (85%)
view
20 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
Register.cshtml.cs
Register.cshtml.cs
72:100 (35%)
60:88 (40%)
view
19 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
ConfirmAccount.cshtml.cs
ConfirmAccount.cshtml.cs
1:46 (82%)
1:46 (82%)
view
17 x 2 Application/UI/mvc-front...on/Areas/Identity/Pages
Application/UI/mvc-frontend/ImageRecognition/Pages
cshtml
Error.cshtml
Error.cshtml
1:22 (100%)
1:22 (100%)
view
17 x 2 Application/API/ImageRecognition.API/Models
Application/UI/mvc-front...ImageRecognition/Models
Photo.cs
Photo.cs
1:31 (68%)
1:31 (68%)
view
16 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
cshtml
ConfirmAccount.cshtml
ConfirmAccount.cshtml
1:18 (76%)
1:18 (80%)
view
14 x 2 Application/UI/mvc-front...on/Areas/Identity/Pages
Application/UI/mvc-front...ecognition/Pages/Shared
cshtml
Error.cshtml
Error.cshtml
3:21 (82%)
2:20 (73%)
view
14 x 2 Application/UI/mvc-frontend/ImageRecognition/Pages
Application/UI/mvc-front...ecognition/Pages/Shared
cshtml
Error.cshtml
Error.cshtml
3:21 (82%)
2:20 (73%)
view
14 x 2 Application/API/ImageRecognition.API/Controllers
Application/UI/mvc-frontend/ImageRecognition
PhotoController.cs
ImageRecognitionManager.cs
93:111 (19%)
40:57 (17%)
view
14 x 2 Application/API/ImageRecognition.API
Application/UI/mvc-frontend/ImageRecognition
Utilities.cs
Utilities.cs
27:47 (66%)
8:28 (87%)
view
12 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
Register.cshtml.cs
Register.cshtml.cs
39:59 (21%)
33:53 (24%)
view
12 x 2 Application/UI/Blazor/ImageRecognition/Pages
Application/UI/mvc-frontend/ImageRecognition/Pages
razor
AlbumDetails.razor
Album.cshtml
56:70 (6%)
40:54 (17%)
view
Duplicated Units
The list of top 10 duplicated units.
See data for all 10 unit duplicates...
Size#FoldersFilesLinesCode
32 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
Login.cshtml.cs
Login.cshtml.cs
51:89 
51:89 
view
18 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
LoginWith2fa.cshtml.cs
LoginWith2fa.cshtml.cs
45:69 
45:69 
view
15 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
ResetPassword.cshtml.cs
ResetPassword.cshtml.cs
35:55 
35:55 
view
15 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
ChangePassword.cshtml.cs
ChangePassword.cshtml.cs
35:55 
35:55 
view
11 x 3 Application/API/ImageRecognition.API
Application/s3Trigger
Application/UI/mvc-frontend/ImageRecognition
Utilities.cs
Function.cs
Utilities.cs
34:48 
92:106 
15:29 
view
8 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
Login.cshtml.cs
Login.cshtml.cs
36:49 
36:49 
view
7 x 2 Application/API/ImageRecognition.API
Application/UI/mvc-frontend/ImageRecognition
Startup.cs
Startup.cs
32:39 
64:71 
view
7 x 2 Application/UI/Blazor/Im.../Identity/Pages/Account
Application/UI/mvc-front.../Identity/Pages/Account
LoginWith2fa.cshtml.cs
LoginWith2fa.cshtml.cs
32:43 
32:43 
view
6 x 2 Application/UI/Blazor/ImageRecognition
Application/UI/Blazor/ImageRecognition
ServiceClientFactory.cs
CommunicationClientFactory.cs
27:34 
27:34 
view
6 x 2 Application/UI/Blazor/ImageRecognition/Models
Application/UI/Blazor/ImageRecognition/Models
PhotoWrapper.cs
AlbumWrapper.cs
63:70 
19:26 
view