aws-samples / aws-xray-dotnet-webapp
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
  • 81% duplication:
    • 585 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 474 duplicated lines
  • 27 duplicates
system81% (474 lines)
Duplication per Extension
cs70% (266 lines)
html100% (208 lines)
Duplication per Component (primary)
DotNET/src76% (111 lines)
DotNET-Agent/src77% (104 lines)
DotNETCore/wwwroot100% (52 lines)
DotNETCore-Agent/wwwroot100% (52 lines)
DotNETCore/Controllers73% (50 lines)
DotNETCore-Agent/Controllers75% (43 lines)
DotNETCore77% (24 lines)
DotNETCore-Agent92% (24 lines)
DotNETCore/Models70% (7 lines)
DotNETCore-Agent/Models70% (7 lines)

Duplication Between Components (50+ lines)

G DotNET-Agent/src DotNET-Agent/src DotNET/src DotNET/src DotNET-Agent/src--DotNET/src 208 DotNETCore-Agent/wwwroot DotNETCore-Agent/wwwroot DotNET-Agent/src--DotNETCore-Agent/wwwroot 76 DotNETCore/wwwroot DotNETCore/wwwroot DotNET-Agent/src--DotNETCore/wwwroot 76 DotNET/src--DotNETCore-Agent/wwwroot 76 DotNET/src--DotNETCore/wwwroot 76 DotNETCore-Agent/wwwroot--DotNETCore/wwwroot 104 DotNETCore-Agent/Controllers DotNETCore-Agent/Controllers DotNETCore/Controllers DotNETCore/Controllers DotNETCore-Agent/Controllers--DotNETCore/Controllers 86

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 27 duplicates...
Size#FoldersFilesLinesCode
52 x 2 DotNET-Agent/src
DotNET/src
index.html
index.html
1:64 (100%)
1:64 (100%)
view
52 x 2 DotNETCore-Agent/wwwroot
DotNETCore/wwwroot
index.html
index.html
1:64 (100%)
1:64 (100%)
view
23 x 2 DotNETCore-Agent/Controllers
DotNETCore/Controllers
ProductsController.cs
ProductsController.cs
89:132 (40%)
113:155 (33%)
view
23 x 2 DotNET-Agent/src/Controllers
DotNET/src/Controllers
ProductsController.cs
ProductsController.cs
68:111 (47%)
92:135 (40%)
view
20 x 2 DotNET/src
DotNETCore-Agent/wwwroot
index.html
index.html
43:64 (38%)
43:64 (38%)
view
20 x 2 DotNET/src
DotNETCore/wwwroot
index.html
index.html
43:64 (38%)
43:64 (38%)
view
20 x 2 DotNET-Agent/src
DotNETCore/wwwroot
index.html
index.html
43:64 (38%)
43:64 (38%)
view
20 x 2 DotNET-Agent/src
DotNETCore-Agent/wwwroot
index.html
index.html
43:64 (38%)
43:64 (38%)
view
18 x 2 DotNET/src
DotNETCore-Agent/wwwroot
index.html
index.html
10:30 (34%)
10:30 (34%)
view
18 x 2 DotNET-Agent/src
DotNETCore-Agent/wwwroot
index.html
index.html
10:30 (34%)
10:30 (34%)
view
18 x 2 DotNET-Agent/src
DotNETCore/wwwroot
index.html
index.html
10:30 (34%)
10:30 (34%)
view
18 x 2 DotNET/src
DotNETCore/wwwroot
index.html
index.html
10:30 (34%)
10:30 (34%)
view
14 x 2 DotNETCore-Agent/Controllers
DotNETCore/Controllers
ProductsController.cs
ProductsController.cs
26:51 (24%)
31:54 (20%)
view
9 x 2 DotNET-Agent/src/App_Start
DotNET/src/App_Start
WebApiConfig.cs
WebApiConfig.cs
1:18 (100%)
1:18 (100%)
view
8 x 2 DotNETCore-Agent
DotNETCore
Program.cs
Program.cs
1:23 (100%)
1:23 (100%)
view
8 x 2 DotNET-Agent/src/Controllers
DotNET/src/Controllers
ProductsController.cs
ProductsController.cs
19:30 (16%)
24:35 (14%)
view
8 x 2 DotNETCore-Agent
DotNETCore
Startup.cs
Startup.cs
1:21 (44%)
1:24 (34%)
view
8 x 2 DotNETCore-Agent
DotNETCore
Startup.cs
Startup.cs
25:41 (44%)
36:52 (34%)
view
7 x 2 DotNET/src/Controllers
DotNETCore/Controllers
ProductsController.cs
ProductsController.cs
56:69 (12%)
76:89 (10%)
view
7 x 2 DotNETCore-Agent/Models
DotNETCore/Models
Product.cs
Product.cs
1:11 (100%)
1:11 (100%)
view
Duplicated Units
The list of top 7 duplicated units.
See data for all 7 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 DotNETCore/Controllers
DotNET/src/Controllers
ProductsController.cs
ProductsController.cs
76:91 
56:71 
view
8 x 2 DotNETCore/Controllers
DotNETCore-Agent/Controllers
ProductsController.cs
ProductsController.cs
113:122 
89:98 
view
8 x 2 DotNET/src/App_Start
DotNET-Agent/src/App_Start
WebApiConfig.cs
WebApiConfig.cs
7:20 
7:20 
view
8 x 2 DotNET/src/Controllers
DotNET-Agent/src/Controllers
ProductsController.cs
ProductsController.cs
103:112 
79:88 
view
7 x 2 DotNETCore/Controllers
DotNETCore-Agent/Controllers
ProductsController.cs
ProductsController.cs
124:132 
100:108 
view
7 x 4 DotNETCore/Controllers
DotNETCore-Agent/Controllers
DotNET/src/Controllers
DotNET-Agent/src/Controllers
ProductsController.cs
ProductsController.cs
ProductsController.cs
ProductsController.cs
134:141 
110:117 
124:131 
100:107 
view
7 x 2 DotNET/src/Controllers
DotNET-Agent/src/Controllers
ProductsController.cs
ProductsController.cs
114:122 
90:98 
view