aws-samples / aws-net-guides
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
  • 9% duplication:
    • 2,259 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 218 duplicated lines
  • 139 duplicates
system9% (218 lines)
Duplication per Extension
cs16% (170 lines)
js16% (48 lines)
Duplication per Component (primary)
Storage/DynamoDb36% (164 lines)
Serverless/Serverless Web App with React, DynamoDb, and X-Ray4% (48 lines)
Containers/Deploy-ASP.NET-Core-To-Fargate2% (6 lines)
Migration/SQL_on_EC20% (0 lines)
Serverless/Create .NET Lambda Function0% (0 lines)
Serverless/Serverless App with Dynamo-Example0% (0 lines)
Communications/ParameterStore-Example0% (0 lines)
Communications/SES-SendMail-Example0% (0 lines)
Storage/Kinesis0% (0 lines)
Storage/Glacier0% (0 lines)
Storage/S30% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 139 duplicates...
Size#FoldersFilesLinesCode
24 x 2 Serverless/Serverless&nb...lientApp/src/components
Serverless/Serverless&nb...lientApp/src/components
Quiz.js
Quiz.js
80:103 (19%)
110:133 (19%)
view
10 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
TablesController.cs
TablesController.cs
136:152 (7%)
169:185 (7%)
view
9 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...llers/ObjectPersistence
ProductsController.cs
ProductsController.cs
72:86 (11%)
72:86 (11%)
view
9 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...llers/ObjectPersistence
ProductsController.cs
ProductsController.cs
100:116 (11%)
101:117 (11%)
view
9 x 2 Storage/DynamoDb/SampleApplication/Utilities
Storage/DynamoDb/SampleApplication/Utilities
DynamoDBContextBuilder.cs
DynamoDBTableBuilder.cs
32:44 (36%)
31:43 (36%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
ProductsController.cs
ItemsController.cs
124:138 (10%)
101:115 (13%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
ProductsController.cs
ItemsController.cs
32:47 (10%)
36:50 (13%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...llers/ObjectPersistence
ItemsController.cs
ProductsController.cs
101:115 (13%)
126:140 (9%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
ProductsController.cs
TablesController.cs
124:138 (10%)
198:212 (6%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...llers/ObjectPersistence
ProductsController.cs
ProductsController.cs
124:138 (10%)
126:140 (9%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
ItemsController.cs
TablesController.cs
101:115 (13%)
198:212 (6%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...llers/ObjectPersistence
ItemsController.cs
ProductsController.cs
36:50 (13%)
34:49 (9%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...llers/ObjectPersistence
TablesController.cs
ProductsController.cs
198:212 (6%)
126:140 (9%)
view
8 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...llers/ObjectPersistence
ProductsController.cs
ProductsController.cs
32:47 (10%)
34:49 (9%)
view
7 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...llers/ObjectPersistence
TablesController.cs
ProductsController.cs
140:152 (5%)
128:140 (8%)
view
7 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
ProductsController.cs
ItemsController.cs
100:112 (8%)
36:48 (12%)
view
7 x 2 Storage/DynamoDb/SampleA...on/Controllers/Document
Storage/DynamoDb/SampleA...on/Controllers/Document
ProductsController.cs
ProductsController.cs
32:44 (8%)
100:112 (8%)
view
7 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
ItemsController.cs
TablesController.cs
103:115 (12%)
54:66 (5%)
view
7 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...on/Controllers/LowLevel
ItemsController.cs
TablesController.cs
58:70 (12%)
173:185 (5%)
view
7 x 2 Storage/DynamoDb/SampleA...on/Controllers/LowLevel
Storage/DynamoDb/SampleA...llers/ObjectPersistence
TablesController.cs
ProductsController.cs
54:66 (5%)
128:140 (8%)
view