aws-samples / amazon-chime-sdk
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
  • 50% duplication:
    • 26,546 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 13,436 duplicated lines
  • 1,282 duplicates
system50% (13,436 lines)
Duplication per Extension
jsx80% (5,920 lines)
yaml57% (2,393 lines)
tsx43% (1,961 lines)
js33% (1,452 lines)
css70% (974 lines)
ts38% (531 lines)
kt9% (166 lines)
html73% (39 lines)
Duplication per Component (primary)
apps/televisit-demo64% (5,920 lines)
apps/chat76% (5,316 lines)
apps/meeting24% (996 lines)
apps/moderated-chat-and-sentiment-analysis46% (757 lines)
apps/real-time-collaboration24% (269 lines)
apps/chat-android9% (166 lines)
apps/amplify-demo4% (12 lines)
apps/android-webview-sample0% (0 lines)
apps/iOS-WKWebView-sample0% (0 lines)
apps/chat-ios0% (0 lines)
utils/singlejs0% (0 lines)

Duplication Between Components (50+ lines)

G apps/chat apps/chat apps/televisit-demo apps/televisit-demo apps/chat--apps/televisit-demo 8917 apps/meeting apps/meeting apps/chat--apps/meeting 1230 apps/moderated-chat-and-sentiment-analysis apps/moderated-chat-and-sentiment-analysis apps/chat--apps/moderated-chat-and-sentiment-analysis 1072 apps/meeting--apps/televisit-demo 1314 apps/moderated-chat-and-sentiment-analysis--apps/televisit-demo 990 apps/real-time-collaboration apps/real-time-collaboration apps/moderated-chat-and-sentiment-analysis--apps/real-time-collaboration 431

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 1,282 duplicates...
Size#FoldersFilesLinesCode
147 x 2 apps/chat/src/components/ChannelModals
apps/televisit-demo/fron...omponents/ChannelModals
BanModal.jsx
BanModal.jsx
4:177 (98%)
4:177 (98%)
view
128 x 2 apps/chat/src/containers/channels
apps/televisit-demo/fron...src/containers/channels
ChannelsWrapper.jsx
ChannelsWrapper.jsx
104:242 (15%)
98:236 (16%)
view
114 x 2 apps/chat/src/containers/messages
apps/televisit-demo/fron...src/containers/messages
Messages.jsx
Messages.jsx
47:175 (39%)
50:179 (40%)
view
112 x 2 apps/chat/src/providers/ChatMessagesProvider
apps/televisit-demo/fron...rs/ChatMessagesProvider
index.jsx
index.jsx
121:237 (41%)
114:230 (42%)
view
85 x 2 apps/chat/src/components/ChannelModals
apps/televisit-demo/fron...omponents/ChannelModals
NewChannelModal.jsx
NewChannelModal.jsx
4:102 (97%)
4:102 (97%)
view
82 x 2 apps/chat/src/containers/channels
apps/televisit-demo/fron...src/containers/channels
ChannelsWrapper.jsx
ChannelsWrapper.jsx
311:396 (9%)
326:411 (10%)
view
82 x 2 apps/chat/src/providers
apps/televisit-demo/frontend/src/providers
AuthProvider.jsx
AuthProvider.jsx
1:91 (43%)
1:90 (43%)
view
71 x 2 apps/chat/src/containers/channels
apps/televisit-demo/fron...src/containers/channels
ChannelsWrapper.jsx
ChannelsWrapper.jsx
589:665 (8%)
546:622 (9%)
view
70 x 2 apps/chat/src/containers/messages
apps/televisit-demo/fron...src/containers/messages
Messages.jsx
Messages.jsx
218:291 (24%)
210:283 (25%)
view
66 x 2 apps/chat/src/backend/serverless
apps/chat/src/backend/serverless
channelFlowBlogTemplate.yaml
template.yaml
397:462 (14%)
360:425 (6%)
view
62 x 2 apps/chat/src/providers/ChatMessagesProvider
apps/televisit-demo/fron...rs/ChatMessagesProvider
index.jsx
index.jsx
31:103 (22%)
30:102 (23%)
view
61 x 2 apps/chat/src
apps/televisit-demo/frontend/src
Chat.jsx
Chat.jsx
1:83 (100%)
1:83 (100%)
view
56 x 2 apps/chat/src/views/Channels
apps/televisit-demo/frontend/src/views/Channels
index.jsx
index.jsx
36:95 (40%)
32:91 (41%)
view
53 x 2 apps/chat/src/components/ChannelModals
apps/televisit-demo/fron...omponents/ChannelModals
NewChannelModal.css
NewChannelModal.css
1:63 (100%)
1:63 (100%)
view
53 x 2 apps/chat/src
apps/moderated-chat-and-sentiment-analysis/src
Chat.css
Chat.css
1:61 (100%)
1:61 (100%)
view
53 x 2 apps/chat/src/components/ChannelModals
apps/televisit-demo/fron...omponents/ChannelModals
EditChannelModal.jsx
EditChannelModal.jsx
35:93 (66%)
35:93 (66%)
view
50 x 2 apps/chat/src/components/ChannelModals
apps/televisit-demo/fron...omponents/ChannelModals
ChannelModals.css
ChannelModals.css
143:202 (30%)
119:178 (34%)
view
50 x 2 apps/meeting/src/utils
apps/televisit-demo/frontend/src/utilities
TestSound.tsx
TestSound.tsx
5:67 (100%)
5:67 (100%)
view
50 x 2 apps/televisit-demo/backend
apps/televisit-demo/backend
template.yaml
template.yaml
694:743 (3%)
1067:1116 (3%)
view
49 x 2 apps/televisit-demo/backend/createattendee
apps/televisit-demo/backend/createmeeting
index.js
index.js
11:60 (59%)
11:60 (55%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
6 x 3 apps/televisit-demo/frontend/src/services
apps/moderated-chat-and-...t-analysis/src/services
apps/chat/src/services
MessagingService.js
MessagingService.js
MessagingService.js
71:77 
74:80 
71:77 
view
6 x 2 apps/moderated-chat-and-...t-analysis/src/services
apps/chat/src/services
MessagingService.js
MessagingService.js
94:100 
91:97 
view