aws-samples / ask-around-me
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
  • 26% duplication:
    • 2,160 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 564 duplicated lines
  • 47 duplicates
system26% (564 lines)
Duplication per Extension
js26% (243 lines)
yaml33% (164 lines)
vue21% (157 lines)
Duplication per Component (primary)
backend32% (142 lines)
frontend/src/views27% (102 lines)
backend/streams/processAnswers52% (94 lines)
frontend/src/components18% (55 lines)
backend/questions/processQuestion51% (27 lines)
backend/answers/processAnswerStar62% (27 lines)
backend/questions/post83% (26 lines)
backend/answers28% (26 lines)
backend/answers/processAnswerGeo37% (17 lines)
backend/questions/getGeoSummary28% (10 lines)
backend/questions/get17% (10 lines)
backend/loadTesting/2-answers34% (8 lines)
backend/loadTesting/3-geo-test38% (7 lines)
backend/loadTesting/1-questions33% (7 lines)
backend/streams/processQuestions10% (6 lines)
frontend0% (0 lines)
frontend/src/helpers0% (0 lines)
frontend/src/store0% (0 lines)
frontend/src0% (0 lines)
frontend/src/router0% (0 lines)
frontend/src/plugins0% (0 lines)
frontend/src/auth0% (0 lines)
frontend/public0% (0 lines)
backend/loadTesting/4-sqs-test0% (0 lines)
backend/loadTesting0% (0 lines)
backend/setup0% (0 lines)

Duplication Between Components (50+ lines)

G frontend/src/components frontend/src/components frontend/src/views frontend/src/views frontend/src/components--frontend/src/views 79 backend/answers backend/answers backend/questions/post backend/questions/post backend/answers--backend/questions/post 52

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 47 duplicates...
Size#FoldersFilesLinesCode
19 x 2 backend
backend
realtime.yaml
realtime.yaml
69:87 (16%)
108:126 (16%)
view
17 x 2 backend/answers
backend/questions/post
post.js
app.js
39:59 (53%)
37:58 (54%)
view
14 x 2 backend
backend
realtime.yaml
realtime.yaml
52:65 (11%)
91:104 (11%)
view
12 x 2 backend
backend
template.yaml
template.yaml
143:154 (3%)
165:176 (3%)
view
12 x 2 frontend/src/components
frontend/src/views
Question.vue
AskView.vue
187:198 (7%)
81:93 (13%)
view
12 x 2 frontend/src/views
frontend/src/views
Answers.vue
HomeView.vue
59:70 (8%)
61:72 (8%)
view
12 x 2 frontend/src/components
frontend/src/components
Ask.vue
Main.vue
6:18 (80%)
7:19 (85%)
view
11 x 2 backend/answers/processAnswerGeo
backend/answers/processAnswerStar
app.js
app.js
43:54 (31%)
40:51 (33%)
view
11 x 2 frontend/src/views
frontend/src/views
Answers.vue
HomeView.vue
24:34 (7%)
43:53 (7%)
view
11 x 2 backend
backend
template.yaml
template.yaml
258:268 (3%)
280:290 (3%)
view
11 x 2 frontend/src/components
frontend/src/views
Question.vue
HomeView.vue
81:91 (7%)
45:55 (7%)
view
10 x 2 backend/streams/processAnswers
backend/streams/processAnswers
geoEvents.js
starEvents.js
45:61 (12%)
42:58 (14%)
view
10 x 2 backend/questions/processQuestion
backend/streams/processAnswers
localTest.js
localTest.js
17:33 (100%)
17:33 (100%)
view
10 x 2 backend/questions/get
backend/questions/getGeoSummary
localTest.js
localTest.js
17:33 (100%)
17:33 (100%)
view
10 x 2 backend/answers/processAnswerStar
backend/questions/processQuestion
app.js
app.js
26:39 (30%)
32:45 (23%)
view
9 x 2 backend/answers
backend/questions/post
post.js
app.js
16:26 (28%)
16:26 (29%)
view
9 x 2 backend
backend
template.yaml
template.yaml
188:196 (2%)
302:310 (2%)
view
9 x 2 backend/streams/processAnswers
backend/streams/processAnswers
geoEvents.js
starEvents.js
16:33 (11%)
16:33 (13%)
view
9 x 2 frontend/src/components
frontend/src/views
Question.vue
Answers.vue
81:89 (5%)
26:34 (6%)
view
8 x 2 frontend/src/components
frontend/src/views
Question.vue
HomeView.vue
100:107 (5%)
65:72 (5%)
view