aws-samples / content-aggregator-example
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
  • 14% duplication:
    • 470 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 70 duplicated lines
  • 8 duplicates
system14% (70 lines)
Duplication per Extension
yml18% (36 lines)
js21% (34 lines)
Duplication per Component (primary)
backend18% (36 lines)
backend/src/update-github21% (9 lines)
backend/src/get-repo-contents32% (9 lines)
backend/src/urls36% (8 lines)
backend/src/scrape-blog18% (8 lines)
frontend0% (0 lines)
backend/src/add-to-list0% (0 lines)
backend/src/compare-against-repo0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
9 x 2 backend/src/get-repo-contents
backend/src/update-github
GetRepoContents.js
WriteToGitHub.js
16:26 (32%)
16:27 (21%)
view
8 x 2 backend/src/scrape-blog
backend/src/urls
GetBlogPost.js
GetUrls.js
11:21 (18%)
13:22 (36%)
view
6 x 2 backend
backend
template.yml
template.yml
153:158 (3%)
182:187 (3%)
view
6 x 2 backend
backend
template.yml
template.yml
138:143 (3%)
182:187 (3%)
view
6 x 2 backend
backend
template.yml
template.yml
138:143 (3%)
153:158 (3%)
view
6 x 2 backend
backend
template.yml
template.yml
117:123 (3%)
172:178 (3%)
view
6 x 2 backend
backend
template.yml
template.yml
117:123 (3%)
129:135 (3%)
view
6 x 2 backend
backend
template.yml
template.yml
129:135 (3%)
172:178 (3%)
view