aws-samples / terraform-eks-code
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
  • 37% duplication:
    • 4,220 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,596 duplicated lines
  • 329 duplicates
system37% (1,596 lines)
Duplication per Extension
tf34% (1,215 lines)
yml68% (381 lines)
Duplication per Component (primary)
sampleapp77% (392 lines)
extra57% (332 lines)
net47% (316 lines)
cicd32% (183 lines)
iam32% (124 lines)
primer22% (110 lines)
nodeg71% (105 lines)
tf-setup5% (12 lines)
lb22% (8 lines)
eks-cidr16% (8 lines)
c9net2% (6 lines)
cluster0% (0 lines)

Duplication Between Components (50+ lines)

G extra extra sampleapp sampleapp extra--sampleapp 499 nodeg nodeg extra--nodeg 210 cicd cicd iam iam cicd--iam 132

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 329 duplicates...
Size#FoldersFilesLinesCode
88 x 2 extra/sampleapp2
sampleapp/notused
buildspec.yml
buildspec-debug.yml
9:104 (69%)
9:104 (69%)
view
79 x 2 extra/sampleapp2
sampleapp
buildspec.yml
buildspec.yml
1:88 (62%)
1:88 (63%)
view
74 x 2 sampleapp
sampleapp/notused
buildspec.yml
buildspec-debug.yml
9:88 (59%)
9:88 (58%)
view
48 x 2 extra/nodeg2
nodeg
outputs.tf
outputs.tf
5:55 (100%)
5:55 (100%)
view
27 x 2 sampleapp/notused
sampleapp
sampleapp.tf
sampleapp-deployment.tf
12:45 (37%)
1:33 (60%)
view
19 x 2 primer/tflab1
primer/tflab2
aws.tf
aws.tf
1:23 (100%)
1:23 (100%)
view
18 x 2 net
net
vpce.tf
vpce.tf
4:21 (5%)
136:153 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
136:153 (5%)
332:349 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
70:87 (5%)
332:349 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
70:87 (5%)
103:120 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
37:54 (5%)
202:219 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
136:153 (5%)
299:316 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
4:21 (5%)
202:219 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
37:54 (5%)
136:153 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
4:21 (5%)
169:186 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
37:54 (5%)
169:186 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
266:283 (5%)
332:349 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
169:186 (5%)
332:349 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
37:54 (5%)
332:349 (5%)
view
18 x 2 net
net
vpce.tf
vpce.tf
70:87 (5%)
266:283 (5%)
view