aws-samples / amazon-sumerian-host-samples
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
  • 19% duplication:
    • 246 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 48 duplicated lines
  • 5 duplicates
system19% (48 lines)
Duplication per Extension
js19% (48 lines)
Duplication per Component (primary)
LambdaFunction120% (30 lines)
LambdaFunction218% (18 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
8 x 2 LambdaFunction1
LambdaFunction1
index.js
index.js
67:76 (5%)
98:107 (5%)
view
7 x 2 LambdaFunction1
LambdaFunction1
index.js
index.js
59:65 (4%)
90:96 (4%)
view
6 x 2 LambdaFunction2
LambdaFunction2
index.js
index.js
113:118 (6%)
140:145 (6%)
view
6 x 2 LambdaFunction2
LambdaFunction2
index.js
index.js
52:57 (6%)
140:145 (6%)
view
6 x 2 LambdaFunction2
LambdaFunction2
index.js
index.js
52:57 (6%)
113:118 (6%)
view