google-gemini/genai-processors
Duplication Places in code with 6 or more lines that are exactly the same. |
Duplication Overall
- 12% duplication:
- 14,650 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 1,884 duplicated lines
- 1,977 duplicates
Duplication per Extension
Duplication per Component (primary)
Longest Duplicates
The list of 50 longest duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 27 | x 2 | notebooksnotebooks | 35:61 (10%)36:62 (6%) | view | |
| 24 | x 2 | genai_processors/devgenai_processors/dev | 1754:1781 (<1%)1797:1824 (<1%) | view | |
| 23 | x 2 | notebooksnotebooks | 671:693 (3%)313:335 (6%) | view | |
| 23 | x 2 | notebooksnotebooks | 313:335 (6%)1259:1281 (1%) | view | |
| 23 | x 2 | notebooksnotebooks | 671:693 (3%)1259:1281 (1%) | view | |
| 22 | x 2 | notebooksnotebooks | 244:265 (8%)399:420 (5%) | view | |
| 19 | x 2 | genai_processors/devgenai_processors/dev | 1000:1021 (<1%)1098:1119 (<1%) | view | |
| 15 | x 2 | notebooksnotebooks | 705:719 (2%)323:337 (4%) | view | |
| 15 | x 2 | notebooksnotebooks | 323:337 (4%)313:327 (4%) | view | |
| 15 | x 2 | notebooksnotebooks | 705:719 (2%)313:327 (4%) | view | |
| 14 | x 2 | genai_processors/devgenai_processors/dev | 1162:1175 (<1%)1411:1424 (<1%) | view | |
| 14 | x 2 | notebooksnotebooks | 435:448 (1%)868:881 (1%) | view | |
| 14 | x 2 | notebooksnotebooks | 503:516 (1%)543:556 (1%) | view | |
| 14 | x 2 | notebooksnotebooks | 6:19 (5%)6:19 (3%) | view | |
| 13 | x 2 | notebooksnotebooks | 371:383 (1%)434:446 (1%) | view | |
| 13 | x 2 | genai_processors/devgenai_processors/dev | 1024:1038 (<1%)1122:1136 (<1%) | view | |
| 13 | x 2 | notebooksnotebooks | 176:188 (3%)234:246 (3%) | view | |
| 13 | x 2 | notebooksnotebooks | 542:554 (2%)315:327 (3%) | view | |
| 13 | x 2 | notebooksnotebooks | 542:554 (2%)325:337 (3%) | view | |
| 13 | x 2 | notebooksnotebooks | 542:554 (2%)707:719 (1%) | view | |
| 12 | x 2 | notebooksnotebooks | 543:554 (2%)682:693 (1%) | view | |
| 12 | x 2 | notebooksnotebooks | 77:88 (4%)81:92 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 708:719 (1%)1270:1281 (<1%) | view | |
| 12 | x 2 | notebooksnotebooks | 682:693 (1%)316:327 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 326:337 (3%)1270:1281 (<1%) | view | |
| 12 | x 2 | notebooksnotebooks | 54:65 (1%)68:79 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 67:78 (1%)81:92 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 324:335 (3%)316:327 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 67:78 (1%)77:88 (4%) | view | |
| 12 | x 2 | notebooksnotebooks | 543:554 (2%)324:335 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 682:693 (1%)326:337 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 129:140 (3%)588:599 (<1%) | view | |
| 12 | x 2 | notebooksnotebooks | 708:719 (1%)324:335 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 687:698 (1%)291:302 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 326:337 (3%)324:335 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 543:554 (2%)1270:1281 (<1%) | view | |
| 12 | x 2 | notebooksnotebooks | 1270:1281 (<1%)316:327 (3%) | view | |
| 12 | x 2 | notebooksnotebooks | 708:719 (1%)682:693 (1%) | view | |
| 11 | x 2 | notebooksnotebooks | 389:399 (1%)447:457 (1%) | view | |
| 11 | x 2 | notebooksnotebooks | 6:16 (1%)6:16 (3%) | view | |
| 11 | x 2 | notebooksnotebooks | 688:698 (1%)302:312 (3%) | view | |
| 11 | x 2 | notebooksnotebooks | 118:128 (3%)575:585 (<1%) | view | |
| 11 | x 2 | notebooksnotebooks | 302:312 (3%)292:302 (3%) | view | |
| 11 | x 2 | notebooksnotebooks | 6:16 (1%)6:16 (<1%) | view | |
| 11 | x 2 | notebooksnotebooks | 6:16 (<1%)6:16 (3%) | view | |
| 10 | x 2 | notebooksnotebooks | 509:518 (1%)571:580 (1%) | view | |
| 10 | x 2 | notebooksnotebooks | 176:185 (2%)292:301 (2%) | view | |
| 10 | x 2 | notebooksnotebooks | 234:243 (2%)292:301 (2%) | view | |
| 10 | x 2 | notebooksnotebooks | 6:15 (2%)6:15 (2%) | view | |
| 10 | x 2 | notebooksnotebooks | 43:52 (2%)46:55 (2%) | view |
Most Frequent Duplicates
The list of 50 most frequently found duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 6 | x 46 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks... | 10:15 (1%)10:15 (1%)10:15 (<1%)10:15 (2%)10:15 (1%)10:15 (<1%)202:207 (1%)57:62 (2%)83:88 (2%)125:130 (2%)... | view | |
| 6 | x 39 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks... | 63:68 (1%)60:65 (1%)44:49 (<1%)87:92 (1%)107:112 (1%)149:154 (1%)204:209 (1%)270:275 (1%)319:324 (1%)368:373 (1%)... | view | |
| 6 | x 9 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 6:11 (<1%)6:11 (<1%)6:11 (1%)6:11 (1%)6:11 (<1%)6:11 (2%)6:11 (1%)6:11 (1%)6:11 (1%) | view | |
| 6 | x 9 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 7:12 (1%)7:12 (1%)7:12 (<1%)7:12 (<1%)7:12 (<1%)7:12 (2%)7:12 (1%)7:12 (1%)7:12 (1%) | view | |
| 6 | x 9 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 9:14 (1%)9:14 (1%)9:14 (<1%)9:14 (<1%)9:14 (<1%)9:14 (2%)9:14 (1%)9:14 (1%)9:14 (1%) | view | |
| 6 | x 9 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 8:13 (1%)8:13 (1%)8:13 (<1%)8:13 (<1%)8:13 (<1%)8:13 (2%)8:13 (1%)8:13 (1%)8:13 (1%) | view | |
| 6 | x 8 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 10:15 (1%)10:15 (1%)538:543 (<1%)10:15 (<1%)58:63 (1%)240:245 (1%)306:311 (1%)345:350 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 546:551 (1%)319:324 (1%)711:716 (<1%)1273:1278 (<1%)685:690 (<1%)327:332 (1%)329:334 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 549:554 (1%)322:327 (1%)688:693 (<1%)714:719 (<1%)1276:1281 (<1%)330:335 (1%)332:337 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 689:694 (<1%)1261:1266 (<1%)533:538 (1%)293:298 (1%)673:678 (<1%)315:320 (1%)303:308 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 544:549 (1%)317:322 (1%)709:714 (<1%)1271:1276 (<1%)683:688 (<1%)325:330 (1%)327:332 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 688:693 (<1%)1260:1265 (<1%)532:537 (1%)292:297 (1%)672:677 (<1%)314:319 (1%)302:307 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 547:552 (1%)320:325 (1%)712:717 (<1%)1274:1279 (<1%)686:691 (<1%)328:333 (1%)330:335 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 230:235 (<1%)286:291 (<1%)325:330 (<1%)511:516 (<1%)551:556 (<1%)712:717 (<1%)1086:1091 (<1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 691:696 (<1%)1263:1268 (<1%)535:540 (1%)295:300 (1%)675:680 (<1%)317:322 (1%)305:310 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 543:548 (1%)316:321 (1%)708:713 (<1%)1270:1275 (<1%)682:687 (<1%)324:329 (1%)326:331 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 545:550 (1%)318:323 (1%)710:715 (<1%)1272:1277 (<1%)684:689 (<1%)326:331 (1%)328:333 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 548:553 (1%)321:326 (1%)713:718 (<1%)1275:1280 (<1%)687:692 (<1%)329:334 (1%)331:336 (1%) | view | |
| 6 | x 7 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 690:695 (<1%)1262:1267 (<1%)534:539 (1%)294:299 (1%)674:679 (<1%)316:321 (1%)304:309 (1%) | view | |
| 6 | x 6 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 687:692 (<1%)1259:1264 (<1%)531:536 (1%)291:296 (1%)671:676 (<1%)313:318 (1%) | view | |
| 6 | x 6 | notebooksnotebooksnotebooksnotebooksnotebooksnotebooks | 371:376 (<1%)403:408 (<1%)457:462 (<1%)813:818 (<1%)891:896 (<1%)1197:1202 (<1%) | view | |
| 6 | x 5 | notebooksnotebooksnotebooksnotebooksnotebooks | 222:227 (<1%)170:175 (2%)305:310 (1%)430:435 (<1%)195:200 (2%) | view | |
| 6 | x 5 | notebooksnotebooksnotebooksnotebooksnotebooks | 539:544 (<1%)59:64 (1%)241:246 (1%)307:312 (1%)346:351 (1%) | view | |
| 6 | x 5 | notebooksnotebooksnotebooksnotebooksnotebooks | 35:40 (<1%)45:50 (2%)46:51 (1%)49:54 (1%)41:46 (<1%) | view | |
| 6 | x 4 | notebooksnotebooksnotebooksnotebooks | 45:50 (1%)48:53 (1%)44:49 (2%)40:45 (<1%) | view | |
| 6 | x 4 | notebooksnotebooksnotebooksnotebooks | 46:51 (<1%)56:61 (2%)57:62 (1%)60:65 (1%) | view | |
| 6 | x 4 | notebooksnotebooksnotebooksnotebooks | 45:50 (<1%)55:60 (2%)56:61 (1%)59:64 (1%) | view | |
| 6 | x 4 | notebooksnotebooksnotebooksnotebooks | 542:547 (1%)315:320 (1%)707:712 (<1%)325:330 (1%) | view | |
| 6 | x 4 | notebooksnotebooksnotebooksnotebooks | 44:49 (<1%)54:59 (2%)55:60 (1%)58:63 (1%) | view | |
| 6 | x 4 | notebooksnotebooksnotebooksnotebooks | 36:41 (<1%)46:51 (2%)47:52 (1%)50:55 (1%) | view | |
| 6 | x 4 | notebooksnotebooksnotebooksnotebooks | 43:48 (<1%)53:58 (2%)54:59 (1%)57:62 (1%) | view | |
| 6 | x 4 | genai_processorsgenai_processorsgenai_processorsgenai_processors | 793:803 (<1%)953:962 (<1%)1172:1177 (<1%)1241:1246 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 44:49 (1%)47:52 (1%)43:48 (2%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 21:26 (1%)21:26 (1%)21:26 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 693:698 (<1%)307:312 (1%)297:302 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 252:257 (<1%)393:398 (<1%)451:456 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 681:686 (<1%)323:328 (1%)1269:1274 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 676:681 (<1%)318:323 (1%)1264:1269 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 179:184 (1%)237:242 (1%)295:300 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 167:172 (1%)225:230 (1%)283:288 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 705:710 (<1%)323:328 (1%)313:318 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 70:75 (<1%)80:85 (2%)84:89 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 69:74 (<1%)79:84 (2%)83:88 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 93:98 (1%)73:78 (1%)59:64 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 680:685 (<1%)322:327 (1%)1268:1273 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 677:682 (<1%)319:324 (1%)1265:1270 (<1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 72:77 (<1%)82:87 (2%)86:91 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 177:182 (1%)235:240 (1%)293:298 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 692:697 (<1%)306:311 (1%)296:301 (1%) | view | |
| 6 | x 3 | notebooksnotebooksnotebooks | 679:684 (<1%)321:326 (1%)1267:1272 (<1%) | 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."