Duplication Overall
- 12% duplication:
- 10,964 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 1,364 duplicated lines
- 134 duplicates
Duplication per Extension
Duplication per Component (primary)
Duplication Between Components (50+ lines)
flowchart TB
n0["api-models"]
n1["common"]
n2["notificationworkerlambda"]
n3["schedulelambda"]
n0 ---|"122"| n1
n2 ---|"120"| n3
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
linkStyle 1 stroke:#DC143CED,stroke-width:9px
Download:
Mermaid (.mmd)
(open online Mermaid editor)
2D force graph
|
3D force graph
Show more details on duplication between components...
From Component
--> To Component
Duplicated
Lines
File Pairs
Details
api-models (10%)
  --> common (4%)
122
1 file pair
details...
notificationworkerlambda (2%)
  --> schedulelambda (20%)
120
4 file pairs
details...
flowchart TB
n0["api-models"]
n1["common"]
n2["notificationworkerlambda"]
n3["schedulelambda"]
n0 ---|"122"| n1
n2 ---|"120"| n3
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
linkStyle 1 stroke:#DC143CED,stroke-width:9px
Show more details on duplication between components...
| From Component --> To Component |
Duplicated Lines |
File Pairs | Details |
|---|---|---|---|
| api-models (10%)   --> common (4%) |
122 | 1 file pair | details... |
| notificationworkerlambda (2%)   --> schedulelambda (20%) |
120 | 4 file pairs | details... |
Longest Duplicates
The list of 50 longest duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 36 | x 2 | notificationworkerlambdanotificationworkerlambda | 67:103 (14%)51:88 (20%) | view | |
| 29 | x 2 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/models | 201:229 (11%)138:166 (11%) | view | |
| 29 | x 2 | notificationworkerlambdanotificationworkerlambda | 3:31 (16%)3:31 (18%) | view | |
| 27 | x 2 | notificationworkerlambdanotificationworkerlambda | 14:40 (11%)11:37 (17%) | view | |
| 25 | x 2 | notificationworkerlambdanotificationworkerlambda | 25:49 (20%)29:55 (16%) | view | |
| 22 | x 2 | notificationworkerlambdanotificationworkerlambda | 3:24 (17%)3:24 (12%) | view | |
| 22 | x 2 | notificationworkerlambdanotificationworkerlambda | 82:103 (9%)43:64 (14%) | view | |
| 22 | x 2 | notificationworkerlambdanotificationworkerlambda | 3:24 (17%)3:24 (14%) | view | |
| 22 | x 2 | notificationworkerlambdanotificationworkerlambda | 67:88 (12%)43:64 (14%) | view | |
| 21 | x 2 | notificationworkerlambdanotificationworkerlambda | 14:34 (8%)11:31 (12%) | view | |
| 20 | x 2 | notificationworkerlambda...ery/apns/models/payloadnotificationworkerlambda...very/fcm/models/payload | 49:68 (31%)57:76 (28%) | view | |
| 19 | x 2 | notificationworkerlambdaschedulelambda | 36:54 (15%)21:39 (20%) | view | |
| 18 | x 2 | notificationworkerlambdanotificationworkerlambda | 117:135 (10%)97:115 (11%) | view | |
| 16 | x 2 | common/src/main/scala/modelscommon/src/main/scala/models | 152:167 (6%)193:208 (6%) | view | |
| 16 | x 2 | api-models/src/main/scal...fications.client/modelsapi-models/src/main/scal...fications.client/models | 215:230 (6%)287:302 (6%) | view | |
| 15 | x 2 | api-models/src/main/scal...fications.client/modelsapi-models/src/main/scal...fications.client/models | 184:198 (6%)254:268 (6%) | view | |
| 15 | x 2 | ROOTROOT | 2:16 (18%)21:35 (18%) | view | |
| 15 | x 2 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/models | 215:229 (6%)193:207 (6%) | view | |
| 15 | x 2 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/models | 287:301 (6%)152:166 (6%) | view | |
| 15 | x 2 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/models | 287:301 (6%)193:207 (6%) | view | |
| 15 | x 2 | notificationworkerlambdanotificationworkerlambda | 121:135 (6%)65:79 (9%) | view | |
| 15 | x 2 | notificationworkerlambdanotificationworkerlambda | 121:135 (6%)95:109 (8%) | view | |
| 15 | x 2 | notificationworkerlambdanotificationworkerlambda | 95:109 (8%)65:79 (9%) | view | |
| 14 | x 2 | notification/confreport/conf | 5:28 (87%)7:30 (82%) | view | |
| 14 | x 2 | notificationworkerlambdanotificationworkerlambda | 137:150 (5%)111:124 (8%) | view | |
| 14 | x 2 | notification/confregistration/conf | 5:28 (87%)5:28 (87%) | view | |
| 14 | x 2 | notificationworkerlambdanotificationworkerlambda | 11:24 (11%)14:27 (5%) | view | |
| 14 | x 2 | registration/confreport/conf | 5:28 (87%)7:30 (82%) | view | |
| 14 | x 2 | notificationworkerlambdaschedulelambda | 42:55 (8%)21:34 (14%) | view | |
| 13 | x 2 | cdk/libcdk/lib | 166:180 (5%)192:206 (5%) | view | |
| 13 | x 2 | notificationworkerlambdanotificationworkerlambda | 37:49 (10%)67:79 (7%) | view | |
| 13 | x 2 | cdk/libcdk/lib | 136:149 (9%)116:129 (5%) | view | |
| 13 | x 2 | notificationworkerlambdanotificationworkerlambda | 175:188 (5%)159:173 (7%) | view | |
| 13 | x 2 | notificationworkerlambdanotificationworkerlambda | 37:49 (10%)82:94 (5%) | view | |
| 13 | x 2 | notificationworkerlambdaschedulelambda | 67:79 (7%)22:34 (13%) | view | |
| 13 | x 2 | notificationworkerlambdaschedulelambda | 82:94 (5%)22:34 (13%) | view | |
| 12 | x 2 | cdk/libcdk/lib | 191:202 (5%)217:228 (5%) | view | |
| 12 | x 2 | notificationworkerlambdanotificationworkerlambda | 156:167 (6%)135:146 (7%) | view | |
| 12 | x 2 | api-models/src/main/scal...fications.client/modelsnotificationworkerlambda...very/fcm/models/payload | 17:39 (36%)5:27 (63%) | view | |
| 11 | x 2 | cdk/libcdk/lib | 166:176 (4%)218:228 (4%) | view | |
| 11 | x 2 | cdk/libcdk/lib | 137:147 (3%)204:214 (3%) | view | |
| 11 | x 2 | notificationworkerlambdanotificationworkerlambda | 90:100 (8%)138:148 (6%) | view | |
| 11 | x 2 | notificationworkerlambdanotificationworkerlambda | 90:100 (8%)118:128 (7%) | view | |
| 11 | x 2 | notificationworkerlambdanotificationworkerlambda | 138:148 (6%)118:128 (7%) | view | |
| 10 | x 2 | notificationworkerlambda...ery/apns/models/payloadnotificationworkerlambda...very/fcm/models/payload | 32:41 (15%)25:34 (14%) | view | |
| 10 | x 2 | notification/app/notification/servicesnotification/app/notification/services/azure | 18:27 (50%)18:27 (50%) | view | |
| 9 | x 2 | common/src/main/scala/modelscommon/src/main/scala/models | 138:146 (3%)177:185 (3%) | view | |
| 9 | x 2 | api-models/src/main/scal...fications.client/modelsapi-models/src/main/scal...fications.client/models | 170:178 (3%)238:246 (3%) | view | |
| 9 | x 2 | api-models/src/main/scal...fications.client/modelsapi-models/src/main/scal...fications.client/models | 201:209 (3%)271:279 (3%) | view | |
| 9 | x 2 | football/src/main/scala/...ll/notificationbuildersfootball/src/main/scala/...ll/notificationbuilders | 58:66 (4%)94:102 (4%) | view |
Most Frequent Duplicates
The list of 50 most frequently found duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 6 | x 6 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 55:60 (2%)140:145 (3%)55:60 (3%)161:166 (3%)71:76 (2%)177:182 (2%) | view | |
| 6 | x 6 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 56:61 (2%)141:146 (3%)56:61 (3%)162:167 (3%)72:77 (2%)178:183 (2%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 49:54 (3%)28:33 (6%)88:93 (2%)43:48 (4%)73:78 (3%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 43:48 (3%)22:27 (6%)82:87 (2%)37:42 (4%)67:72 (3%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 44:49 (3%)23:28 (6%)83:88 (2%)38:43 (4%)68:73 (3%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 47:52 (3%)26:31 (6%)86:91 (2%)41:46 (4%)71:76 (3%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 50:55 (3%)29:34 (6%)89:94 (2%)44:49 (4%)74:79 (3%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 46:51 (3%)25:30 (6%)85:90 (2%)40:45 (4%)70:75 (3%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 48:53 (3%)27:32 (6%)87:92 (2%)42:47 (4%)72:77 (3%) | view | |
| 6 | x 5 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 45:50 (3%)24:29 (6%)84:89 (2%)39:44 (4%)69:74 (3%) | view | |
| 6 | x 5 | notificationworkerlambdanotificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambda | 14:19 (2%)11:16 (3%)10:15 (6%)11:16 (3%)11:16 (4%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 204:209 (2%)141:146 (2%)180:185 (2%)274:279 (2%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 15:20 (2%)12:17 (3%)12:17 (3%)12:17 (4%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 222:227 (2%)159:164 (2%)200:205 (2%)294:299 (2%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 123:128 (2%)67:72 (3%)97:102 (3%)73:78 (4%) | view | |
| 6 | x 4 | ROOTROOTROOTROOT | 40:45 (7%)54:59 (7%)67:72 (7%)80:85 (7%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 201:206 (2%)138:143 (2%)177:182 (2%)271:276 (2%) | view | |
| 6 | x 4 | ROOTROOTROOTROOT | 42:47 (7%)56:61 (7%)69:74 (7%)82:87 (7%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 221:226 (2%)158:163 (2%)199:204 (2%)293:298 (2%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 217:222 (2%)154:159 (2%)195:200 (2%)289:294 (2%) | view | |
| 6 | x 4 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambda | 8:13 (3%)7:12 (6%)8:13 (4%)8:13 (3%) | view | |
| 6 | x 4 | cdk/libcdk/libcdk/libcdk/lib | 142:147 (2%)166:171 (2%)192:197 (2%)218:223 (2%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 20:25 (2%)17:22 (3%)17:22 (3%)17:22 (4%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 145:150 (2%)99:104 (3%)119:124 (3%)82:87 (4%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 153:158 (2%)118:123 (3%)138:143 (3%)90:95 (4%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 122:127 (2%)66:71 (3%)96:101 (3%)72:77 (4%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 224:229 (2%)161:166 (2%)202:207 (2%)296:301 (2%) | view | |
| 6 | x 4 | ROOTROOTROOTROOT | 41:46 (7%)55:60 (7%)68:73 (7%)81:86 (7%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 121:126 (2%)65:70 (3%)95:100 (3%)71:76 (4%) | view | |
| 6 | x 4 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambda | 9:14 (3%)8:13 (6%)9:14 (4%)9:14 (3%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 18:23 (2%)15:20 (3%)15:20 (3%)15:20 (4%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 16:21 (2%)13:18 (3%)13:18 (3%)13:18 (4%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 21:26 (2%)18:23 (3%)18:23 (3%)18:23 (4%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 22:27 (2%)19:24 (3%)19:24 (3%)19:24 (4%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 19:24 (2%)16:21 (3%)16:21 (3%)16:21 (4%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 203:208 (2%)140:145 (2%)179:184 (2%)273:278 (2%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 216:221 (2%)153:158 (2%)194:199 (2%)288:293 (2%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 143:148 (2%)97:102 (3%)117:122 (3%)80:85 (4%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 219:224 (2%)156:161 (2%)197:202 (2%)291:296 (2%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 202:207 (2%)139:144 (2%)178:183 (2%)272:277 (2%) | view | |
| 6 | x 4 | eventconsumer/src/main/resourcesliveactivities/src/main/resourcesreportextractor/src/main/resourcesslomonitor/src/main/resources | 1:7 (85%)1:7 (85%)1:7 (85%)1:7 (85%) | view | |
| 6 | x 4 | notificationworkerlambdaschedulelambdanotificationworkerlambdanotificationworkerlambda | 10:15 (3%)9:14 (6%)10:15 (4%)10:15 (3%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 35:40 (2%)32:37 (3%)35:40 (3%)28:33 (4%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 215:220 (2%)152:157 (2%)193:198 (2%)287:292 (2%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 218:223 (2%)155:160 (2%)196:201 (2%)290:295 (2%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 220:225 (2%)157:162 (2%)198:203 (2%)292:297 (2%) | view | |
| 6 | x 4 | eventconsumer/src/main/resourcesliveactivities/src/main/resourcesreportextractor/src/main/resourcesslomonitor/src/main/resources | 2:8 (85%)2:8 (85%)2:8 (85%)2:8 (85%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 144:149 (2%)98:103 (3%)118:123 (3%)81:86 (4%) | view | |
| 6 | x 4 | api-models/src/main/scal...fications.client/modelscommon/src/main/scala/modelscommon/src/main/scala/modelsapi-models/src/main/scal...fications.client/models | 223:228 (2%)160:165 (2%)201:206 (2%)295:300 (2%) | view | |
| 6 | x 4 | notificationworkerlambdanotificationworkerlambdanotificationworkerlambdanotificationworkerlambda | 17:22 (2%)14:19 (3%)14:19 (3%)14:19 (4%) | view |
Duplicated Units
The list of top 1 duplicated units.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 7 | x 2 | schedulelambda/src/main/...gu/notificationschedulefakebreakingnewslambda/s.../scala/fakebreakingnews | 30:38 22:30 | view |
About This Analysis
- 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...
- To learn more about duplications and techniques for eliminating duplication, Sokrates recommends the following resources:
- Avoid Repetition, MartinFlower.com (IEEE Software article)
- Refactoring duplicated code, sourcemaking.com
- Beck Design Rules, MartinFowler.com
- DRY (Don't Repeat Yourself) Principle, Wikipedia
- The Cut-and-Paste Programming Software Development Anti-Pattern, sourcemaking.com
- Code Smells / Duplicated Code, Jeff Atwood, codinghorror.com:
- "Duplicated code is the bane of software development. Stamp out duplication whenever possible. You should always be on the lookout for more subtle cases of near-duplication, too. Don't Repeat Yourself!"
- Reducing Coupling, MartinFlower.com (IEEE Software article):
- "There are several ways to describe coupling, but it boils down to this: If changing one module in a program requires changing another module, then coupling exists. ... Duplication always implies coupling, because changing one piece of duplicate code implies changing the other."