aws-samples / aws-lambda-redirection-at-edge
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
  • 5% duplication:
    • 1,550 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 91 duplicated lines
  • 6 duplicates
system5% (91 lines)
Duplication per Extension
js7% (49 lines)
yaml12% (42 lines)
Duplication per Component (primary)
lambda/origin-request-function21% (49 lines)
cloudformation12% (42 lines)
userinterface/js0% (0 lines)
userinterface/js/contollers0% (0 lines)
userinterface/js/services0% (0 lines)
userinterface/views0% (0 lines)
userinterface/css0% (0 lines)
userinterface0% (0 lines)
lambda/deploy-function0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
13 x 2 lambda/origin-request-function
lambda/origin-request-function
rules.js
rules.js
38:54 (11%)
84:100 (11%)
view
12 x 2 cloudformation
cloudformation
template.yaml
template.yaml
204:215 (3%)
246:257 (3%)
view
9 x 2 cloudformation
cloudformation
template.yaml
template.yaml
86:94 (2%)
136:144 (2%)
view
8 x 2 lambda/origin-request-function
lambda/origin-request-function
rules.js
rules.js
56:67 (6%)
140:152 (6%)
view
7 x 2 lambda/origin-request-function
lambda/origin-request-function
rules.js
rules.js
114:123 (6%)
143:152 (6%)
view
7 x 2 lambda/origin-request-function
lambda/origin-request-function
rules.js
rules.js
58:67 (6%)
114:123 (6%)
view