microsoft / MentalHealthPlatform
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
  • 5% duplication:
    • 3,174 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 173 duplicated lines
  • 10 duplicates
system5% (173 lines)
Duplication per Extension
css9% (97 lines)
ts10% (64 lines)
tsx<1% (12 lines)
Duplication per Component (primary)
client/src/Components/CreateChat23% (40 lines)
server/requests/get-requests12% (36 lines)
client/src/Components/DataCard21% (23 lines)
client/src/Components/InfoCard27% (22 lines)
client/src/Components/SignupLogin6% (18 lines)
client/src/util12% (14 lines)
server/requests/post-requests10% (14 lines)
client/src/Components/Forum6% (6 lines)
client/src/Components0% (0 lines)
client/src/Components/Chat0% (0 lines)
client/src/Components/Contacts0% (0 lines)
client/src/Components/CreateForm0% (0 lines)
client/src/Components/Crisis0% (0 lines)
client/src/Components/CrisisPreview0% (0 lines)
client/src/Components/Dashboard0% (0 lines)
client/src/Components/DashboardTile0% (0 lines)
client/src/Components/DashboardTileButton0% (0 lines)
client/src/Components/Events0% (0 lines)
client/src/Components/Icon0% (0 lines)
client/src/Components/LoadingBubbles0% (0 lines)
client/src/Components/Messages0% (0 lines)
client/src/Components/Navigation0% (0 lines)
client/src/Components/SearchBar0% (0 lines)
client/src/Components/SearchPage0% (0 lines)
client/src/Components/Topic0% (0 lines)
client/src/Components/Topics0% (0 lines)
client/src/Components/TrendingKeywordsPreview0% (0 lines)
client/src/Components/TrendingPostsPreview0% (0 lines)
client/src0% (0 lines)
server0% (0 lines)
server/requests0% (0 lines)
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
15 x 2 client/src/Components/DataCard
client/src/Components/InfoCard
data-card.css
info-card.css
47:64 (23%)
26:43 (40%)
view
12 x 2 server/requests/get-requests
server/requests/get-requests
getChat.ts
getChatPreviews.ts
19:35 (20%)
21:37 (20%)
view
10 x 2 client/src/Components/CreateChat
client/src/Components/SignupLogin
create-chat.css
signup-login.css
10:19 (13%)
11:20 (12%)
view
8 x 2 client/src/Components/CreateChat
client/src/Components/SignupLogin
create-chat.css
signup-login.css
65:72 (10%)
56:63 (10%)
view
8 x 2 client/src/Components/CreateChat
client/src/Components/CreateChat
create-chat.css
create-chat.css
38:45 (10%)
50:57 (10%)
view
8 x 2 client/src/Components/DataCard
client/src/Components/InfoCard
data-card.css
info-card.css
22:30 (12%)
18:26 (21%)
view
7 x 2 server/requests/post-requests
server/requests/post-requests
createChat.ts
createContact.ts
41:47 (19%)
28:34 (28%)
view
7 x 2 client/src/util
client/src/util
base-requests.ts
base-requests.ts
24:30 (18%)
40:46 (18%)
view
6 x 2 server/requests/get-requests
server/requests/get-requests
getChatPreviews.ts
getTrendingPosts.ts
43:51 (10%)
17:25 (20%)
view
6 x 2 client/src/Components/CreateChat
client/src/Components/Forum
create-chat-provider.tsx
forum-provider.tsx
22:30 (14%)
20:27 (18%)
view