Duplication Overall
- 27% duplication:
- 17,528 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 4,741 duplicated lines
- 83 duplicates
Duplication per Extension
Duplication per Component (primary)
Longest Duplicates
The list of 50 longest duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 402 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 1:465 (100%)1:465 (100%) | view | |
| 189 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 1:223 (100%)1:223 (100%) | view | |
| 115 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 1:133 (100%)1:133 (100%) | view | |
| 108 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 27:171 (72%)27:171 (82%) | view | |
| 105 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 1:123 (100%)1:123 (100%) | view | |
| 92 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 5:112 (100%)5:112 (100%) | view | |
| 88 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 1:103 (100%)1:103 (100%) | view | |
| 85 | x 2 | production-ready-agent/solution/appproduction-ready-agent/starter/app | 1:97 (100%)1:97 (100%) | view | |
| 84 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 88:198 (61%)97:207 (65%) | view | |
| 75 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 1:94 (100%)1:94 (100%) | view | |
| 73 | x 2 | production-ready-agent/solution/libproduction-ready-agent/starter/lib | 3:98 (100%)3:98 (100%) | view | |
| 69 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 1:89 (100%)1:89 (100%) | view | |
| 64 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 1:81 (100%)1:81 (100%) | view | |
| 62 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 116:196 (38%)116:196 (48%) | view | |
| 49 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 87:146 (52%)93:152 (54%) | view | |
| 45 | x 2 | production-ready-agent/solutionproduction-ready-agent/starter | 4:48 (100%)4:48 (100%) | view | |
| 38 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 1:45 (100%)1:45 (100%) | view | |
| 35 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 23:65 (37%)23:65 (38%) | view | |
| 34 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 28:70 (25%)33:75 (26%) | view | |
| 32 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 65:108 (19%)60:103 (25%) | view | |
| 31 | x 2 | production-ready-agent/solution/libproduction-ready-agent/starter/lib | 2:40 (100%)2:40 (100%) | view | |
| 29 | x 2 | production-ready-agent/solution/components/uiproduction-ready-agent/starter/components/ui | 4:36 (100%)4:36 (100%) | view | |
| 27 | x 2 | production-ready-agent/solution/libproduction-ready-agent/starter/lib | 10:42 (100%)10:42 (100%) | view | |
| 27 | x 2 | production-ready-agent/solution/libproduction-ready-agent/starter/lib | 9:47 (100%)9:47 (100%) | view | |
| 27 | x 2 | production-ready-agent/solution/components/uiproduction-ready-agent/starter/components/ui | 1:33 (100%)1:33 (100%) | view | |
| 25 | x 2 | agent-decomposition/agents/beforeagent-decomposition/agents | 125:153 (16%)188:216 (17%) | view | |
| 25 | x 2 | production-ready-agent/solution/components/uiproduction-ready-agent/starter/components/ui | 5:32 (100%)5:32 (100%) | view | |
| 23 | x 2 | production-ready-agent/solution/components/uiproduction-ready-agent/starter/components/ui | 1:28 (100%)1:28 (100%) | view | |
| 22 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 1:25 (100%)1:25 (100%) | view | |
| 18 | x 2 | production-ready-agent/solution/components/uiproduction-ready-agent/starter/components/ui | 1:22 (100%)1:22 (100%) | view | |
| 15 | x 2 | production-ready-agent/s.../[id]/thread/[threadId]production-ready-agent/s.../[id]/thread/[threadId] | 4:20 (100%)4:20 (100%) | view | |
| 14 | x 2 | production-ready-agent/solution/app/session/[id]production-ready-agent/starter/app/session/[id] | 5:18 (100%)5:18 (100%) | view | |
| 12 | x 2 | agent-decomposition/agents/beforeagent-decomposition/agents | 47:67 (7%)83:98 (8%) | view | |
| 12 | x 2 | eval-driven-agent-development/srceval-driven-agent-development/src | 65:77 (17%)107:119 (10%) | view | |
| 11 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 229:240 (6%)234:245 (8%) | view | |
| 11 | x 2 | production-ready-agent/solution/appproduction-ready-agent/starter/app | 5:16 (100%)5:16 (100%) | view | |
| 10 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 215:225 (6%)217:227 (7%) | view | |
| 9 | x 2 | agent-decomposition/agentsagent-decomposition/agents | 224:232 (1%)288:296 (1%) | view | |
| 9 | x 2 | agent-decomposition/agents/beforeagent-decomposition/agents | 105:117 (5%)159:171 (6%) | view | |
| 9 | x 2 | eval-driven-agent-development/solutionseval-driven-agent-development/solutions | 4:15 (64%)4:15 (64%) | view | |
| 8 | x 2 | agent-battle/harnessagent-battle/harness | 41:48 (4%)66:73 (4%) | view | |
| 8 | x 2 | agent-decomposition/agents/beforeagent-decomposition/agents | 81:88 (5%)127:134 (5%) | view | |
| 8 | x 2 | agent-decomposition/agents/beforeagent-decomposition/agents | 91:101 (5%)136:145 (5%) | view | |
| 8 | x 2 | production-ready-agent/s...pi/session/[id]/threadsproduction-ready-agent/s...pi/session/[id]/threads | 3:16 (100%)3:16 (100%) | view | |
| 8 | x 2 | research-desk/solutions/src/app/api/desk/streamresearch-desk/src/app/api/desk/stream | 7:19 (23%)7:19 (57%) | view | |
| 8 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/solution/components | 89:96 (1%)98:105 (4%) | view | |
| 8 | x 2 | production-ready-agent/starter/componentsproduction-ready-agent/starter/components | 89:96 (1%)98:105 (4%) | view | |
| 8 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 98:105 (4%)89:96 (1%) | view | |
| 8 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 89:96 (1%)98:105 (4%) | view | |
| 7 | x 2 | agent-battle/harnessagent-battle/harness | 42:48 (4%)122:128 (4%) | view |
Most Frequent Duplicates
The list of 11 most frequently found duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 6 | x 5 | agent-battle/harnessagent-battle/harnessagent-battle/harnessagent-battle/harnessagent-battle/harness | 43:48 (3%)68:73 (3%)102:107 (3%)123:128 (3%)161:166 (3%) | view | |
| 6 | x 4 | production-ready-agent/solution/componentsproduction-ready-agent/starter/componentsproduction-ready-agent/solution/componentsproduction-ready-agent/starter/components | 100:105 (3%)91:96 (1%)91:96 (1%)100:105 (3%) | view | |
| 6 | x 4 | production-ready-agent/solution/componentsproduction-ready-agent/starter/componentsproduction-ready-agent/solution/componentsproduction-ready-agent/starter/components | 99:104 (3%)90:95 (1%)90:95 (1%)99:104 (3%) | view | |
| 6 | x 4 | production-ready-agent/solution/componentsproduction-ready-agent/starter/componentsproduction-ready-agent/solution/componentsproduction-ready-agent/starter/components | 98:103 (3%)89:94 (1%)89:94 (1%)98:103 (3%) | view | |
| 6 | x 3 | research-desk/src/componentsresearch-desk/src/componentsresearch-desk/src/components | 74:82 (5%)55:63 (5%)69:77 (5%) | view | |
| 6 | x 3 | research-desk/src/app/api/desk/analyzeresearch-desk/src/libresearch-desk/solutions/src/lib | 35:40 (16%)164:169 (4%)164:169 (4%) | view | |
| 6 | x 3 | research-desk/solutions/src/libresearch-desk/src/libresearch-desk/src/lib | 24:29 (6%)24:29 (6%)18:23 (7%) | view | |
| 6 | x 3 | research-desk/solutions/src/libresearch-desk/src/libresearch-desk/src/lib | 25:30 (6%)25:30 (6%)19:24 (7%) | view | |
| 6 | x 3 | how-we-claude-code/phase-3-verify/src/verify/corehow-we-claude-code/phase-3-verify/src/verify/corehow-we-claude-code/phase-3-verify/src/verify/core | 53:58 (4%)93:98 (4%)134:139 (4%) | view | |
| 6 | x 3 | eval-driven-agent-development/solutionseval-driven-agent-development/solutionseval-driven-agent-development/solutions | 9:15 (42%)9:15 (42%)11:17 (21%) | view | |
| 6 | x 3 | agent-battle/harnessagent-battle/harnessagent-battle/harness | 42:47 (3%)67:72 (3%)122:127 (3%) | view |
Duplicated Units
The list of top 38 duplicated units.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 162 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 35:249 35:249 | view | |
| 55 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 11:90 11:90 | view | |
| 63 | x 2 | production-ready-agent/solution/libproduction-ready-agent/starter/lib | 28:99 28:99 | view | |
| 47 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 352:414 352:414 | view | |
| 53 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 19:91 19:91 | view | |
| 37 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 45:89 45:89 | view | |
| 34 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 49:85 49:85 | view | |
| 33 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 116:153 116:153 | view | |
| 30 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 256:290 256:290 | view | |
| 28 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 13:47 13:47 | view | |
| 24 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 5:37 5:37 | view | |
| 25 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 12:48 12:48 | view | |
| 24 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 425:456 425:456 | view | |
| 24 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 321:350 321:350 | view | |
| 25 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 38:66 38:66 | view | |
| 22 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 292:319 292:319 | view | |
| 22 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 78:104 73:99 | view | |
| 20 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 14:37 14:37 | view | |
| 21 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 13:36 13:36 | view | |
| 10 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 5:26 5:26 | view | |
| 27 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 98:130 98:130 | view | |
| 16 | x 2 | production-ready-agent/solution/components/uiproduction-ready-agent/starter/components/ui | 10:29 10:29 | view | |
| 17 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 107:126 113:132 | view | |
| 17 | x 2 | production-ready-agent/solution/libproduction-ready-agent/starter/lib | 19:43 19:43 | view | |
| 16 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 170:187 179:196 | view | |
| 13 | x 2 | production-ready-agent/solution/components/aiproduction-ready-agent/starter/components/ai | 87:104 87:104 | view | |
| 15 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 35:53 35:53 | view | |
| 15 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 22:38 22:38 | view | |
| 13 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 132:146 132:146 | view | |
| 10 | x 2 | production-ready-agent/solution/app/session/[id]production-ready-agent/starter/app/session/[id] | 5:19 5:19 | view | |
| 13 | x 2 | agent-decomposition/agentsagent-decomposition/agents/before | 192:206 129:143 | view | |
| 12 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 41:54 46:59 | view | |
| 8 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 140:149 149:158 | view | |
| 7 | x 2 | research-desk/solutions/src/libresearch-desk/src/lib | 110:118 110:118 | view | |
| 26 | x 2 | production-ready-agent/solution/libproduction-ready-agent/starter/lib | 15:48 15:48 | view | |
| 6 | x 2 | production-ready-agent/solution/componentsproduction-ready-agent/starter/components | 10:17 10:17 | view | |
| 6 | x 2 | agent-decomposition/agentsagent-decomposition/agents/before | 209:216 146:153 | view | |
| 7 | x 2 | production-ready-agent/s...pi/session/[id]/threadsproduction-ready-agent/s...pi/session/[id]/threads | 7:17 7:17 | 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."