opensearch-project / notifications
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
  • 22% duplication:
    • 12,172 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,701 duplicated lines
  • 324 duplicates
system22% (2,701 lines)
Duplication per Extension
tsx27% (1,714 lines)
kt14% (576 lines)
ts14% (215 lines)
yml49% (126 lines)
policy100% (70 lines)
Duplication per Component (primary)
dashboards-notifications/public/pages25% (1,714 lines)
notifications/notifications/src18% (565 lines)
notifications/core/src16% (173 lines)
dashboards-notifications/server/routes47% (149 lines)
dashboards-notifications/server/clusters40% (36 lines)
notifications/core-spi/src24% (34 lines)
dashboards-notifications/public/services5% (18 lines)
dashboards-notifications/public9% (6 lines)
dashboards-notifications/server13% (6 lines)
dashboards-notifications/common0% (0 lines)
dashboards-notifications/public/utils0% (0 lines)
dashboards-notifications/public/models0% (0 lines)
dashboards-notifications/public/components0% (0 lines)
dashboards-notifications/models0% (0 lines)
dashboards-notifications/server/utils0% (0 lines)
notifications0% (0 lines)
release-notes0% (0 lines)

Duplication Between Components (50+ lines)

G notifications/core/src notifications/core/src notifications/notifications/src notifications/notifications/src notifications/core/src--notifications/notifications/src 122 notifications/core-spi/src notifications/core-spi/src notifications/core-spi/src--notifications/core/src 68

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 324 duplicates...
Size#FoldersFilesLinesCode
35 x 2 notifications/core/src/main/plugin-metadata
notifications/notificati...rc/main/plugin-metadata
policy
plugin-security.policy
plugin-security.policy
1:39 (100%)
1:39 (100%)
view
34 x 2 notifications/core-spi/s...notifications/spi/utils
notifications/core/src/m...otifications/core/utils
ValidationHelpers.kt
ValidationHelpers.kt
20:69 (89%)
26:75 (82%)
view
31 x 2 notifications/core/src/m...ications/core/transport
notifications/core/src/m...ications/core/transport
SesDestinationTransport.kt
SmtpDestinationTransport.kt
39:69 (73%)
39:69 (73%)
view
25 x 2 dashboards-notifications...annel/components/modals
dashboards-notifications...annel/components/modals
CreateSESSenderModal.tsx
CreateSenderModal.tsx
108:132 (22%)
109:133 (22%)
view
22 x 2 dashboards-notifications/public/pages/Emails
dashboards-notifications/public/pages/Emails
CreateSESSender.tsx
CreateSender.tsx
124:147 (14%)
123:146 (14%)
view
21 x 2 dashboards-notifications...mails/components/modals
dashboards-notifications...mails/components/modals
DeleteRecipientGroupModal.tsx
DeleteSenderModal.tsx
66:86 (19%)
63:83 (20%)
view
21 x 2 dashboards-notifications...nnels/components/modals
dashboards-notifications...mails/components/modals
DeleteChannelModal.tsx
DeleteRecipientGroupModal.tsx
64:84 (18%)
66:86 (19%)
view
21 x 2 dashboards-notifications...nnels/components/modals
dashboards-notifications...mails/components/modals
DeleteChannelModal.tsx
DeleteSenderModal.tsx
64:84 (18%)
63:83 (20%)
view
19 x 2 dashboards-notifications/public/pages/Emails
dashboards-notifications/public/pages/Emails
CreateSESSender.tsx
CreateSender.tsx
169:187 (12%)
169:187 (12%)
view
19 x 2 notifications/core/src/m...arch/notifications/core
notifications/notificati...pensearch/notifications
NotificationCorePlugin.kt
NotificationPlugin.kt
47:70 (57%)
83:106 (19%)
view
18 x 2 dashboards-notifications...mails/components/tables
dashboards-notifications...mails/components/tables
SESSendersTable.tsx
SendersTable.tsx
164:184 (9%)
184:204 (8%)
view
18 x 2 notifications/notificati...rch/notifications/index
notifications/notificati...rch/notifications/index
NotificationConfigIndex.kt
NotificationEventIndex.kt
92:119 (11%)
92:119 (11%)
view
17 x 2 notifications/notificati...ch/notifications/action
notifications/notificati...arch/notifications/util
PluginBaseAction.kt
SecureIndexClient.kt
128:153 (20%)
278:303 (18%)
view
17 x 2 dashboards-notifications...mails/components/tables
dashboards-notifications...mails/components/tables
RecipientGroupsTable.tsx
SESSendersTable.tsx
53:72 (7%)
50:69 (8%)
view
16 x 2 dashboards-notifications...annel/components/modals
dashboards-notifications/public/pages/Emails
CreateSESSenderModal.tsx
CreateSESSender.tsx
52:69 (14%)
85:102 (10%)
view
16 x 2 dashboards-notifications...annel/components/modals
dashboards-notifications/public/pages/Emails
CreateRecipientGroupModal.tsx
CreateRecipientGroup.tsx
38:55 (15%)
40:57 (10%)
view
16 x 2 dashboards-notifications...annel/components/modals
dashboards-notifications...annel/components/modals
CreateRecipientGroupModal.tsx
CreateSESSenderModal.tsx
112:127 (15%)
117:132 (14%)
view
16 x 2 dashboards-notifications/public/pages/Channels
dashboards-notifications...mails/components/tables
Channels.tsx
RecipientGroupsTable.tsx
205:223 (7%)
199:217 (7%)
view
16 x 2 dashboards-notifications...annel/components/modals
dashboards-notifications...annel/components/modals
CreateRecipientGroupModal.tsx
CreateSenderModal.tsx
112:127 (15%)
118:133 (14%)
view
16 x 2 notifications/notificati...rch/notifications/index
notifications/notificati...rch/notifications/index
ConfigQueryHelper.kt
EventQueryHelper.kt
179:199 (11%)
146:164 (15%)
view
Duplicated Units
The list of top 7 duplicated units.
See data for all 7 unit duplicates...
Size#FoldersFilesLinesCode
19 x 2 notifications/notificati...rch/notifications/index
notifications/notificati...rch/notifications/index
NotificationConfigIndex.kt
NotificationEventIndex.kt
257:276 
258:277 
view
13 x 2 notifications/core-spi/s...notifications/spi/utils
notifications/core/src/m...otifications/core/utils
ValidationHelpers.kt
ValidationHelpers.kt
49:62 
55:68 
view
12 x 2 notifications/core-spi/s...notifications/spi/utils
notifications/core/src/m...otifications/core/utils
ValidationHelpers.kt
ValidationHelpers.kt
30:43 
36:49 
view
11 x 2 notifications/notificati...rch/notifications/index
notifications/notificati...rch/notifications/index
NotificationConfigIndex.kt
NotificationEventIndex.kt
241:252 
242:253 
view
9 x 2 dashboards-notifications...mails/components/tables
dashboards-notifications...mails/components/tables
SESSendersTable.tsx
RecipientGroupsTable.tsx
109:118 
139:148 
view
6 x 2 dashboards-notifications...ges/Channels/components
dashboards-notifications...mails/components/tables
ChannelControls.tsx
SendersTableControls.tsx
103:109 
57:63 
view
6 x 2 notifications/core-spi/s...notifications/spi/utils
notifications/core/src/m...otifications/core/utils
ValidationHelpers.kt
ValidationHelpers.kt
64:70 
70:76 
view