aws-samples / amazon-ecs-dotnet-app-graviton
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
  • 22% duplication:
    • 1,077 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 238 duplicated lines
  • 6 duplicates
system22% (238 lines)
Duplication per Extension
cs21% (148 lines)
cshtml26% (90 lines)
Duplication per Component (primary)
app/Migrations66% (116 lines)
app/Views/Home38% (74 lines)
app/Models27% (18 lines)
app/Views/Account21% (16 lines)
app/Controllers8% (14 lines)
app/wwwroot/js0% (0 lines)
app/wwwroot/css0% (0 lines)
app/Views0% (0 lines)
app/Views/Shared0% (0 lines)
app/Attribute0% (0 lines)
app/Data0% (0 lines)
app0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
58 x 2 app/Migrations
app/Migrations
20210407143338_InitialCreate.Designer.cs
MvcMovieContextModelSnapshot.cs
17:99 (92%)
15:97 (93%)
view
20 x 2 app/Views/Home
app/Views/Home
cshtml
Delete.cshtml
Details.cshtml
10:36 (66%)
15:41 (57%)
view
17 x 2 app/Views/Home
app/Views/Home
cshtml
Create.cshtml
Edit.cshtml
15:35 (50%)
16:36 (48%)
view
9 x 2 app/Models
app/Models
ChangePassword.cs
SetPassword.cs
12:21 (64%)
7:16 (90%)
view
8 x 2 app/Views/Account
app/Views/Account
cshtml
ChangePassword.cshtml
SetPassword.cshtml
17:26 (30%)
13:22 (38%)
view
7 x 2 app/Controllers
app/Controllers
HomeController.cs
HomeController.cs
82:94 (7%)
166:178 (7%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
63 x 2 app/Migrations
app/Migrations
MvcMovieContextModelSnapshot.cs
20210407143338_InitialCreate.Designer.cs
13:98 
15:100 
view
13 x 2 app/Controllers
app/Controllers
HomeController.cs
HomeController.cs
80:95 
164:179 
view