microsoft / franceconnect-identity-provider-dotnet-webapi-aspnetcore
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
  • 28% duplication:
    • 3,407 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 960 duplicated lines
  • 77 duplicates
system28% (960 lines)
Duplication per Extension
cs32% (701 lines)
cshtml17% (181 lines)
css76% (78 lines)
Duplication per Component (primary)
Source/WebApp-IdentityProvider-MFA/Areas/Identity22% (477 lines)
Source/WebApp-IdentityProvider-MFA/Migrations69% (436 lines)
Source/WebApp-IdentityProvider-MFA/Pages/Shared38% (47 lines)
ROOT0% (0 lines)
Source/WebApp-IdentityProvider-MFA/Data0% (0 lines)
Source/WebApp-IdentityProvider-MFA0% (0 lines)
Source/WebApp-IdentityProvider-MFA/Models0% (0 lines)
Source/WebApp-IdentityProvider-MFA/Pages0% (0 lines)
Source/WebApp-IdentityProvider-MFA/Services0% (0 lines)
Source/WebApp-IdentityProvider-MFA/Services/FIDO20% (0 lines)
Source/WebApp-IdentityProvider-MFA/wwwroot/css0% (0 lines)
Source/WebApp-IdentityProvider-MFA/wwwroot/js0% (0 lines)

Duplication Between Components (50+ lines)

G Source/WebApp-IdentityProvider-MFA/Areas/Identity Source/WebApp-IdentityProvider-MFA/Areas/Identity Source/WebApp-IdentityProvider-MFA/Pages/Shared Source/WebApp-IdentityProvider-MFA/Pages/Shared Source/WebApp-IdentityProvider-MFA/Areas/Identity--Source/WebApp-IdentityProvider-MFA/Pages/Shared 94

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 77 duplicates...
Size#FoldersFilesLinesCode
209 x 2 Source/WebApp-IdentityProvider-MFA/Migrations
Source/WebApp-IdentityProvider-MFA/Migrations
20211018132422_InitialCreate.Designer.cs
ApplicationDbContextModelSnapshot.cs
20:323 (97%)
18:321 (97%)
view
39 x 2 Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityProvider-MFA/Pages/Shared
_LoginLayout.cshtml.css
_Layout.cshtml.css
1:48 (100%)
1:48 (100%)
view
33 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr.../Identity/Pages/Account
cshtml
Index.cshtml
Register.cshtml
14:54 (62%)
28:68 (55%)
view
13 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
ResetAuthenticator.cshtml.cs
ResetFIDO2.cshtml.cs
26:53 (39%)
28:55 (36%)
view
12 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr.../Identity/Pages/Account
Index.cshtml.cs
Register.cshtml.cs
58:70 (14%)
80:93 (11%)
view
12 x 2 Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityPr.../Identity/Pages/Account
Register.cshtml.cs
ResetPassword.cshtml.cs
60:74 (11%)
33:48 (27%)
view
10 x 2 Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityPr.../Identity/Pages/Account
LoginWithAuthenticator.cshtml.cs
LoginWithFIDO2.cshtml.cs
56:74 (19%)
70:88 (17%)
view
9 x 2 Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityPr.../Identity/Pages/Account
LoginWithAuthenticator.cshtml.cs
LoginWithFIDO2.cshtml.cs
81:95 (17%)
92:106 (16%)
view
8 x 2 Source/WebApp-IdentityProvider-MFA/Migrations
Source/WebApp-IdentityProvider-MFA/Migrations
20211018132422_InitialCreate.Designer.cs
ApplicationDbContextModelSnapshot.cs
56:66 (3%)
79:89 (3%)
view
8 x 2 Source/WebApp-IdentityProvider-MFA/Migrations
Source/WebApp-IdentityProvider-MFA/Migrations
20211018132422_InitialCreate.Designer.cs
ApplicationDbContextModelSnapshot.cs
81:91 (3%)
54:64 (3%)
view
8 x 2 Source/WebApp-IdentityProvider-MFA/Migrations
Source/WebApp-IdentityProvider-MFA/Migrations
ApplicationDbContextModelSnapshot.cs
ApplicationDbContextModelSnapshot.cs
54:64 (3%)
79:89 (3%)
view
8 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr.../Identity/Pages/Account
cshtml
_StatusMessage.cshtml
_StatusMessage.cshtml
1:10 (100%)
1:10 (100%)
view
8 x 2 Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityProvider-MFA/Pages/Shared
cshtml
_LoginLayout.cshtml
_Layout.cshtml
1:8 (23%)
1:8 (25%)
view
8 x 2 Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityPr.../Identity/Pages/Account
ForgotPassword.cshtml.cs
ResendEmailConfirmation.cshtml.cs
26:37 (25%)
27:38 (21%)
view
8 x 2 Source/WebApp-IdentityProvider-MFA/Migrations
Source/WebApp-IdentityProvider-MFA/Migrations
20211018132422_InitialCreate.Designer.cs
20211018132422_InitialCreate.Designer.cs
56:66 (3%)
81:91 (3%)
view
8 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr.../Identity/Pages/Account
Index.cshtml.cs
Register.cshtml.cs
47:56 (9%)
94:103 (7%)
view
7 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Disable2fa.cshtml.cs
ResetAuthenticator.cshtml.cs
21:33 (25%)
26:37 (21%)
view
7 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
cshtml
GenerateRecoveryCodes.cshtml
ResetAuthenticator.cshtml
5:12 (36%)
5:12 (41%)
view
7 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
cshtml
GenerateRecoveryCodes.cshtml
ResetFIDO2.cshtml
5:12 (36%)
5:12 (41%)
view
7 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
cshtml
ResetAuthenticator.cshtml
ResetFIDO2.cshtml
5:12 (41%)
5:12 (41%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
224 x 2 Source/WebApp-IdentityProvider-MFA/Migrations
Source/WebApp-IdentityProvider-MFA/Migrations
20211018132422_InitialCreate.Designer.cs
ApplicationDbContextModelSnapshot.cs
18:324 
16:322 
view
9 x 2 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Email.cshtml.cs
Index.cshtml.cs
89:99 
94:104 
view
8 x 3 Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityPr.../Identity/Pages/Account
Source/WebApp-IdentityPr.../Identity/Pages/Account
LoginWithAuthenticator.cshtml.cs
LoginWithFIDO2.cshtml.cs
LoginWithRecoveryCode.cshtml.cs
18:26 
24:32 
21:29 
view
8 x 3 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
ChangePassword.cshtml.cs
DeletePersonalData.cshtml.cs
ResetAuthenticator.cshtml.cs
18:26 
18:26 
19:27 
view
8 x 4 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
ChangePassword.cshtml.cs
PersonalData.cshtml.cs
ResetAuthenticator.cshtml.cs
ResetFIDO2.cshtml.cs
53:62 
27:36 
32:41 
35:44 
view
6 x 4 Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Source/WebApp-IdentityPr...ty/Pages/Account/Manage
Disable2fa.cshtml.cs
DownloadPersonalData.cshtml.cs
GenerateRecoveryCodes.cshtml.cs
PersonalData.cshtml.cs
16:22 
17:23 
16:22 
19:25 
view