aws-samples / amazon-chime-sdk-smart-video-sending-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
  • 8% duplication:
    • 4,066 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 340 duplicated lines
  • 20 duplicates
system8% (340 lines)
Duplication per Extension
tsx7% (191 lines)
yaml17% (77 lines)
ts6% (38 lines)
js6% (34 lines)
Duplication per Component (primary)
src/components9% (116 lines)
serverless13% (77 lines)
src/containers6% (42 lines)
src/utils16% (38 lines)
src/providers3% (33 lines)
ROOT18% (22 lines)
serverless/src3% (12 lines)
src/constants0% (0 lines)
src0% (0 lines)
src/types0% (0 lines)
src/hooks0% (0 lines)
app0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 20 duplicates...
Size#FoldersFilesLinesCode
24 x 2 src/components/RemoteVideo
src/components/VideoTile
Styled.tsx
Styled.tsx
22:51 (42%)
23:52 (37%)
view
21 x 2 src/components/RemoteVideo
src/components/VideoTile
Styled.tsx
Styled.tsx
54:80 (37%)
64:90 (32%)
view
12 x 2 src/utils
src/utils
DefaultPromisedWebSocket.ts
ReconnectingPromisedWebSocket.ts
66:81 (19%)
88:103 (15%)
view
11 x 2 src/containers
src/containers
MeetingForm.tsx
MeetingJoinDetails.tsx
110:120 (11%)
61:71 (21%)
view
11 x 2 ROOT
ROOT
server.js
server.js
45:60 (9%)
93:108 (9%)
view
10 x 2 serverless
serverless
template.yaml
template.yaml
121:130 (2%)
151:160 (2%)
view
10 x 2 serverless
serverless
template.yaml
template.yaml
329:338 (2%)
360:369 (2%)
view
10 x 2 src/containers
src/containers
DeviceSetup.tsx
MeetingView.tsx
32:44 (31%)
18:30 (43%)
view
9 x 2 serverless
serverless
template.yaml
template.yaml
360:368 (2%)
388:396 (2%)
view
9 x 2 serverless
serverless
template.yaml
template.yaml
329:337 (2%)
388:396 (2%)
view
8 x 2 serverless
serverless
template.yaml
template.yaml
107:114 (1%)
137:144 (1%)
view
7 x 2 src/providers/DevicesProvider
src/providers/DevicesProvider
AudioInputProvider.tsx
VideoInputProvider.tsx
64:71 (13%)
68:75 (12%)
view
7 x 2 src/utils
src/utils
DefaultPromisedWebSocket.ts
DefaultPromisedWebSocket.ts
26:32 (11%)
40:46 (11%)
view
7 x 2 src/providers/DevicesProvider
src/providers/DevicesProvider
AudioInputProvider.tsx
AudioOutputProvider.tsx
64:71 (13%)
63:70 (12%)
view
7 x 2 src/providers/DevicesProvider
src/providers/DevicesProvider
AudioOutputProvider.tsx
VideoInputProvider.tsx
63:70 (12%)
68:75 (12%)
view
7 x 2 src/components/Input
src/components
Styled.tsx
Select.tsx
13:19 (30%)
10:16 (15%)
view
6 x 2 src/components/Input
src/components
Styled.tsx
Select.tsx
28:36 (26%)
25:33 (13%)
view
6 x 2 src/providers/DevicesProvider
src/providers/DevicesProvider
AudioInputProvider.tsx
AudioOutputProvider.tsx
5:10 (11%)
5:10 (11%)
view
6 x 2 serverless
serverless
template.yaml
template.yaml
190:195 (1%)
434:439 (1%)
view
6 x 2 serverless/src
serverless/src
videoSending.js
videoSending.js
51:57 (2%)
161:167 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 ROOT
ROOT
server.js
server.js
48:58 
96:106 
view