opensearch-project / common-utils
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
  • 16% duplication:
    • 3,401 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 571 duplicated lines
  • 517 duplicates
system16% (571 lines)
Duplication per Extension
kt20% (543 lines)
java3% (28 lines)
Duplication per Component (primary)
src/main/kotlin/org/opensearch/commons/notifications/action33% (273 lines)
src/main/kotlin/org/opensearch/commons/notifications/model18% (270 lines)
src/main/java/org/opensearch/commons/rest8% (14 lines)
src/main/java/org/opensearch/commons/destination/message4% (14 lines)
ROOT0% (0 lines)
src/main/kotlin/org/opensearch/commons/utils0% (0 lines)
src/main/kotlin/org/opensearch/commons/notifications0% (0 lines)
src/main/java/org/opensearch/commons0% (0 lines)
src/main/java/org/opensearch/commons/authuser0% (0 lines)
src/main/java/org/opensearch/commons/destination/response0% (0 lines)
release-notes0% (0 lines)

Duplication Between Components (50+ lines)

G src/main/kotlin/org/opensearch/commons/notifications/action src/main/kotlin/org/opensearch/commons/notifications/action src/main/kotlin/org/opensearch/commons/notifications/model src/main/kotlin/org/opensearch/commons/notifications/model src/main/kotlin/org/opensearch/commons/notifications/action--src/main/kotlin/org/opensearch/commons/notifications/model 295

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 517 duplicates...
Size#FoldersFilesLinesCode
14 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
GetNotificationConfigRequest.kt
GetNotificationEventRequest.kt
83:97 (16%)
83:97 (16%)
view
13 x 2 src/main/kotlin/org/open...ons/notifications/model
src/main/kotlin/org/open...ons/notifications/model
Chime.kt
Slack.kt
74:87 (32%)
74:87 (32%)
view
13 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
CreateNotificationConfigResponse.kt
UpdateNotificationConfigResponse.kt
61:74 (34%)
61:74 (34%)
view
13 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
CreateNotificationConfigResponse.kt
UpdateNotificationConfigResponse.kt
88:115 (34%)
88:115 (34%)
view
12 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
GetNotificationConfigRequest.kt
GetNotificationEventRequest.kt
173:191 (13%)
173:191 (13%)
view
11 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ons/notifications/model
UpdateNotificationConfigRequest.kt
NotificationConfigInfo.kt
71:82 (21%)
77:88 (17%)
view
11 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
CreateNotificationConfigRequest.kt
UpdateNotificationConfigRequest.kt
70:81 (22%)
70:81 (21%)
view
10 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
CreateNotificationConfigResponse.kt
UpdateNotificationConfigRequest.kt
63:72 (26%)
73:82 (19%)
view
10 x 2 src/main/kotlin/org/open...ons/notifications/model
src/main/kotlin/org/open...ons/notifications/model
FeatureChannel.kt
NotificationConfigInfo.kt
83:92 (13%)
79:88 (15%)
view
10 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ons/notifications/model
CreateNotificationConfigResponse.kt
FeatureChannel.kt
63:72 (26%)
83:92 (13%)
view
10 x 2 src/main/kotlin/org/open...ons/notifications/model
src/main/kotlin/org/open...ons/notifications/model
EmailRecipientStatus.kt
EventStatus.kt
71:81 (22%)
94:104 (12%)
view
10 x 2 src/main/kotlin/org/open...ons/notifications/model
src/main/kotlin/org/open...ons/notifications/model
EmailRecipient.kt
EmailRecipientStatus.kt
74:83 (25%)
73:82 (22%)
view
10 x 2 src/main/kotlin/org/open...ons/notifications/model
src/main/kotlin/org/open...ons/notifications/model
Chime.kt
Slack.kt
101:119 (25%)
101:119 (25%)
view
10 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ons/notifications/model
CreateNotificationConfigResponse.kt
NotificationConfigInfo.kt
63:72 (26%)
79:88 (15%)
view
10 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ons/notifications/model
CreateNotificationConfigRequest.kt
NotificationConfigInfo.kt
71:81 (20%)
77:87 (15%)
view
10 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ons/notifications/model
UpdateNotificationConfigRequest.kt
FeatureChannel.kt
73:82 (19%)
83:92 (13%)
view
10 x 2 src/main/kotlin/org/open...ons/notifications/model
src/main/kotlin/org/open...ons/notifications/model
Chime.kt
Webhook.kt
76:85 (25%)
84:93 (19%)
view
10 x 2 src/main/kotlin/org/open...ons/notifications/model
src/main/kotlin/org/open...ons/notifications/model
Slack.kt
Webhook.kt
76:85 (25%)
84:93 (19%)
view
10 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ons/notifications/model
UpdateNotificationConfigResponse.kt
FeatureChannel.kt
63:72 (26%)
83:92 (13%)
view
10 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
UpdateNotificationConfigRequest.kt
UpdateNotificationConfigResponse.kt
73:82 (19%)
63:72 (26%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
9 x 2 src/main/kotlin/org/open...ns/notifications/action
src/main/kotlin/org/open...ns/notifications/action
GetNotificationConfigRequest.kt
GetNotificationEventRequest.kt
183:192 
183:192 
view