aws-samples / amazon-ivs-virtual-qa-web-demo
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
  • 9% duplication:
    • 2,660 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 247 duplicated lines
  • 37 duplicates
system9% (247 lines)
Duplication per Extension
js11% (109 lines)
yaml16% (85 lines)
py7% (30 lines)
css2% (23 lines)
Duplication per Component (primary)
ROOT16% (85 lines)
frontend/src/questionList27% (79 lines)
frontend/src2% (23 lines)
frontend/src/providers7% (16 lines)
backend/lambda/question-stream21% (15 lines)
backend/lambda/connection-stream26% (15 lines)
frontend/src/addQuestion11% (14 lines)
frontend/src/player0% (0 lines)
frontend/src/util0% (0 lines)
frontend/src/auth0% (0 lines)
frontend/public0% (0 lines)
backend/lambda/vote-service0% (0 lines)
backend/lambda/vote-stream0% (0 lines)
backend/lambda/question-service0% (0 lines)
backend/lambda/websocket-service0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 37 duplicates...
Size#FoldersFilesLinesCode
10 x 2 frontend/src/questionList/Question
frontend/src/questionList/Question
CurrentQuestionModal.js
DeleteQuestionModal.js
24:33 (17%)
29:38 (15%)
view
10 x 2 frontend/src/questionList/Question
frontend/src/questionList/Question
CurrentQuestionModal.js
DeleteQuestionModal.js
52:61 (17%)
62:71 (15%)
view
9 x 2 ROOT
ROOT
template.yaml
template.yaml
239:247 (1%)
265:273 (1%)
view
9 x 2 frontend/src/questionList/Question
frontend/src/questionList/Question
CurrentQuestionButton.js
DeleteQuestionButton.js
10:19 (42%)
10:19 (42%)
view
8 x 2 frontend/src
frontend/src
index.css
index.css
85:92 (1%)
102:109 (1%)
view
8 x 2 frontend/src/providers
frontend/src/providers
QuestionProvider.js
QuestionProvider.js
96:103 (6%)
107:114 (6%)
view
8 x 2 backend/lambda/connection-stream
backend/lambda/question-stream
lambda.py
lambda.py
69:77 (14%)
92:100 (11%)
view
7 x 2 frontend/src/questionList/Question
frontend/src/questionList/Question
CurrentQuestionModal.js
VoteButton.js
24:30 (12%)
49:55 (8%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
348:354 (1%)
400:406 (1%)
view
7 x 2 frontend/src
frontend/src
index.css
index.css
20:26 (1%)
86:92 (1%)
view
7 x 2 frontend/src/addQuestion
frontend/src/questionList/Question
AddQuestionModal.js
VoteButton.js
34:40 (7%)
49:55 (8%)
view
7 x 2 frontend/src/questionList/Question
frontend/src/questionList/Question
DeleteQuestionModal.js
VoteButton.js
29:35 (10%)
49:55 (8%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
326:332 (1%)
369:375 (1%)
view
7 x 2 ROOT
ROOT
template.yaml
template.yaml
461:467 (1%)
472:478 (1%)
view
7 x 2 frontend/src/addQuestion
frontend/src/questionList/Question
AddQuestionModal.js
DeleteQuestionModal.js
53:59 (7%)
29:35 (10%)
view
7 x 2 frontend/src/addQuestion
frontend/src/addQuestion
AddQuestionModal.js
AddQuestionModal.js
34:40 (7%)
53:59 (7%)
view
7 x 2 frontend/src/addQuestion
frontend/src/questionList/Question
AddQuestionModal.js
DeleteQuestionModal.js
34:40 (7%)
29:35 (10%)
view
7 x 2 frontend/src
frontend/src
index.css
index.css
20:26 (1%)
103:109 (1%)
view
7 x 2 frontend/src/addQuestion
frontend/src/questionList/Question
AddQuestionModal.js
VoteButton.js
53:59 (7%)
49:55 (8%)
view
7 x 2 frontend/src/addQuestion
frontend/src/questionList/Question
AddQuestionModal.js
CurrentQuestionModal.js
53:59 (7%)
24:30 (12%)
view