aws-samples / ccp-react-dashboard-example
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
  • 14% duplication:
    • 1,679 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 250 duplicated lines
  • 23 duplicates
system14% (250 lines)
Duplication per Extension
ts27% (199 lines)
jsx4% (37 lines)
js7% (14 lines)
Duplication per Component (primary)
ccp-cdk-infra/lib/functions34% (199 lines)
ccp-ui/src/components5% (37 lines)
ccp-ui/src5% (14 lines)
ccp-ui/public0% (0 lines)
ccp-cdk-infra/lib0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 23 duplicates...
Size#FoldersFilesLinesCode
17 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getActiveAgents.ts
getCustomersInQueue.ts
20:38 (62%)
21:39 (60%)
view
13 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getIntentsForAgent.ts
newConnectID.ts
49:62 (18%)
61:75 (14%)
view
10 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
avgMissedWaitTime.ts
getAvgQueueTime.ts
17:27 (55%)
17:27 (55%)
view
10 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getCustomersInQueue.ts
getLongestWaitTime.ts
6:18 (35%)
6:18 (45%)
view
9 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getActiveAgents.ts
getLongestWaitTime.ts
21:30 (33%)
22:31 (40%)
view
9 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getCustomersInQueue.ts
getLongestWaitTime.ts
22:31 (32%)
22:31 (40%)
view
8 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
avgMissedWaitTime.ts
getMissedCalls.ts
19:27 (44%)
20:28 (42%)
view
8 x 2 ccp-ui/src/components
ccp-ui/src/components
StatisticsModal.jsx
TaggingModal.jsx
114:121 (4%)
94:101 (4%)
view
8 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
newConnectID.ts
updateIntentTable.ts
12:19 (8%)
28:35 (7%)
view
8 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getAvgQueueTime.ts
getMissedCalls.ts
19:27 (44%)
20:28 (42%)
view
7 x 2 ccp-ui/src/components
ccp-ui/src/components
CustomerInfo.jsx
StatisticsModal.jsx
100:106 (3%)
114:120 (3%)
view
7 x 2 ccp-ui/src
ccp-ui/src
hooks.js
hooks.js
60:67 (8%)
75:82 (8%)
view
7 x 2 ccp-ui/src/components
ccp-ui/src/components
CustomerInfo.jsx
TaggingModal.jsx
92:98 (3%)
86:92 (4%)
view
7 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
newConnectID.ts
updateIntentTable.ts
29:36 (7%)
40:47 (6%)
view
7 x 2 ccp-ui/src/components
ccp-ui/src/components
CustomerInfo.jsx
TaggingModal.jsx
100:106 (3%)
94:100 (4%)
view
7 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
avgMissedWaitTime.ts
getAvgQueueTime.ts
6:14 (38%)
6:14 (38%)
view
6 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getIntentsForAgent.ts
newConnectID.ts
65:71 (8%)
78:85 (6%)
view
6 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getIntentsForAgent.ts
lib.ts
13:19 (8%)
76:82 (9%)
view
6 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getChecklist.ts
getIntentsForAgent.ts
23:29 (17%)
57:63 (8%)
view
6 x 2 ccp-cdk-infra/lib/functions
ccp-cdk-infra/lib/functions
getActiveAgents.ts
getLongestWaitTime.ts
6:13 (22%)
6:13 (27%)
view