aws-amplify / community
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
  • 4% duplication:
    • 5,727 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 239 duplicated lines
  • 23 duplicates
system4% (239 lines)
Duplication per Extension
js4% (239 lines)
Duplication per Component (primary)
src/templates7% (105 lines)
src/components3% (87 lines)
scripts/contribute13% (38 lines)
src/pages11% (9 lines)
cypress/plugins0% (0 lines)
cypress/integration0% (0 lines)
cypress/support0% (0 lines)
amplify/backend0% (0 lines)
src0% (0 lines)
src/assets0% (0 lines)
src/utilities0% (0 lines)
ROOT0% (0 lines)
gatsby-node0% (0 lines)
scripts0% (0 lines)
scripts/utilities0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 23 duplicates...
Size#FoldersFilesLinesCode
11 x 2 scripts/contribute/extensions
scripts/contribute/extensions
contribution-extension.js
contribution-extension.js
137:149 (6%)
191:203 (6%)
view
10 x 2 src/components/Card/Post
src/components/Card/Post
Condensed.js
Expanded.js
104:113 (10%)
138:147 (8%)
view
10 x 2 src/templates
src/templates
Resources.js
Resources.js
287:296 (3%)
310:319 (3%)
view
9 x 2 src/templates
src/templates
Contributor.js
Landing.js
26:34 (9%)
55:63 (4%)
view
9 x 2 src/templates
src/templates
Contributor.js
Newsletter.js
26:34 (9%)
55:63 (4%)
view
9 x 2 src/templates
src/templates
Landing.js
Newsletter.js
55:63 (4%)
55:63 (4%)
view
8 x 2 src/components/GlobalStyles
src/components/GlobalStyles
toasts.js
toasts.js
181:189 (2%)
257:265 (2%)
view
8 x 2 src/components/Card
src/components/Card/Post
Event.js
Condensed.js
70:77 (10%)
85:92 (8%)
view
8 x 2 src/pages/newsletter
src/templates
unsubscribe.js
Newsletters.js
19:27 (22%)
18:26 (9%)
view
8 x 2 src/components/GlobalStyles
src/components/GlobalStyles
toasts.js
toasts.js
219:227 (2%)
299:307 (2%)
view
8 x 2 src/templates
src/templates
Resources.js
Resources.js
78:85 (2%)
168:175 (2%)
view
8 x 2 scripts/contribute/extensions
scripts/contribute/extensions
contribution-extension.js
contribution-extension.js
127:134 (4%)
181:188 (4%)
view
8 x 2 src/pages/newsletter
src/templates
unsubscribe.js
Newsletter.js
17:25 (22%)
125:133 (3%)
view
7 x 2 src/components/Card/Post
src/components/Card/Post
Condensed.js
Expanded.js
77:85 (7%)
118:126 (6%)
view
7 x 2 src/templates
src/templates
Newsletter.js
Newsletters.js
127:133 (3%)
18:24 (7%)
view
7 x 2 src/templates
src/templates
Contributor.js
Newsletter.js
53:59 (7%)
39:45 (3%)
view
6 x 2 src/components/GlobalStyles
src/components/GlobalStyles
toasts.js
toasts.js
181:186 (1%)
299:304 (1%)
view
6 x 2 src/components/GlobalStyles
src/components/GlobalStyles
toasts.js
toasts.js
257:262 (1%)
299:304 (1%)
view
6 x 2 src/components/Card
src/templates
Event.js
Event.js
34:43 (8%)
69:78 (3%)
view
6 x 2 src/components/GlobalStyles
src/components/GlobalStyles
toasts.js
toasts.js
219:224 (1%)
257:262 (1%)
view