aws-samples / aws-cross-account-serverless-microservices
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
  • 15% duplication:
    • 2,146 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 343 duplicated lines
  • 49 duplicates
system15% (343 lines)
Duplication per Extension
yaml31% (331 lines)
yml35% (12 lines)
Duplication per Component (primary)
ToolsAcct36% (164 lines)
NonProdAccount34% (60 lines)
Airmiles27% (50 lines)
Booking20% (50 lines)
Custom6% (19 lines)
WebUI/build0% (0 lines)
WebUI/static0% (0 lines)
WebUI/config0% (0 lines)
WebUI/src0% (0 lines)
WebUI0% (0 lines)

Duplication Between Components (50+ lines)

G Airmiles Airmiles Booking Booking Airmiles--Booking 100 NonProdAccount NonProdAccount ToolsAcct ToolsAcct NonProdAccount--ToolsAcct 99 Custom Custom Custom--NonProdAccount 58 Custom--ToolsAcct 50

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 49 duplicates...
Size#FoldersFilesLinesCode
19 x 2 ToolsAcct
ToolsAcct
code-pipeline.yaml
code-pipeline.yaml
215:233 (5%)
294:312 (5%)
view
15 x 2 Airmiles
Booking
sam-airmile.yaml
sam-booking.yaml
38:52 (12%)
59:73 (9%)
view
13 x 2 NonProdAccount
ToolsAcct
toolsacct-codepipeline-cloudformation...
code-pipeline.yaml
118:130 (7%)
189:201 (3%)
view
13 x 2 ToolsAcct
ToolsAcct
code-pipeline.yaml
code-pipeline.yaml
68:80 (3%)
189:201 (3%)
view
13 x 2 NonProdAccount
ToolsAcct
toolsacct-codepipeline-cloudformation...
code-pipeline.yaml
118:130 (7%)
68:80 (3%)
view
11 x 2 ToolsAcct
ToolsAcct
code-pipeline.yaml
code-pipeline.yaml
234:244 (2%)
346:356 (2%)
view
9 x 2 NonProdAccount
NonProdAccount
toolsacct-codepipeline-cloudformation...
toolsacct-codepipeline-cloudformation...
26:34 (5%)
138:146 (5%)
view
9 x 2 Custom
NonProdAccount
custom-lookup-exports.yaml
toolsacct-codepipeline-cloudformation...
32:40 (13%)
62:70 (5%)
view
8 x 2 ToolsAcct
ToolsAcct
code-pipeline.yaml
code-pipeline.yaml
251:258 (2%)
314:321 (2%)
view
8 x 2 Airmiles
Booking
sam-airmile.yaml
sam-booking.yaml
25:32 (6%)
51:58 (5%)
view
8 x 2 Custom
NonProdAccount
custom-lookup-exports.yaml
toolsacct-codepipeline-cloudformation...
32:39 (12%)
26:33 (4%)
view
8 x 2 NonProdAccount
NonProdAccount
toolsacct-codepipeline-cloudformation...
toolsacct-codepipeline-cloudformation...
26:33 (4%)
62:69 (4%)
view
8 x 2 Airmiles
Booking
sam-airmile.yaml
sam-booking.yaml
114:122 (6%)
142:150 (5%)
view
8 x 2 Custom
NonProdAccount
custom-lookup-exports.yaml
toolsacct-codepipeline-cloudformation...
32:39 (12%)
138:145 (4%)
view
8 x 2 NonProdAccount
NonProdAccount
toolsacct-codepipeline-cloudformation...
toolsacct-codepipeline-cloudformation...
62:69 (4%)
138:145 (4%)
view
8 x 2 ToolsAcct
ToolsAcct
code-pipeline.yaml
code-pipeline.yaml
269:276 (2%)
331:338 (2%)
view
7 x 2 Custom
ToolsAcct
custom-lookup-exports.yaml
code-pipeline.yaml
34:40 (10%)
132:138 (1%)
view
7 x 2 Airmiles
Booking
sam-airmile.yaml
sam-booking.yaml
1:9 (5%)
1:9 (4%)
view
7 x 2 NonProdAccount
ToolsAcct
toolsacct-codepipeline-cloudformation...
code-pipeline.yaml
64:70 (4%)
132:138 (1%)
view
7 x 2 ToolsAcct
ToolsAcct
code-pipeline.yaml
code-pipeline.yaml
253:259 (1%)
271:277 (1%)
view