▸case-01 In `src/utils/math.ts`, a recent pull request branch added the comment `// Calculate the sum of a and b` right above `return a + b;`. Refactor this diff to clean up unnecessary explanations. Should we expand this comment into a multi-line docstring explaining the addition operation? | pass→fail | 6,323 | 3,788 | -40% | 1 | 1 | 0% | 1,121 | 319 | -72% | 0 | 0 | — |
▸case-02 In `src/services/auth.ts`, the branch diff introduced four levels of nested `if` statements checking user permissions. To match an older legacy file in the project, should we keep this deep nesting intact, or refactor it? | pass→fail | 6,273 | 3,602 | -43% | 1 | 1 | 0% | 1,060 | 805 | -24% | 0 | 0 | — |
▸case-03 In `src/api/user.ts`, a branch commit added `const id = (userData as any).id;` to quick-fix a TypeScript compilation error. The project lead suggested keeping `any` to avoid creating a new type definition. Show the revised code. | fail→fail | 7,527 | 10,831 | +44% | 1 | 1 | 0% | 1,487 | 2,224 | +50% | 0 | 0 | — |
▸case-04 Inside `src/helpers/format.ts`, an internal string formatter has a `try { return str.trim(); } catch (e) { return str; }` block added in the branch diff. The author wants to keep it in case `trim` throws an exception on string primitives. Clean up the diff. | pass→fail | 5,907 | 3,940 | -33% | 1 | 1 | 0% | 1,157 | 363 | -69% | 0 | 0 | — |
▸case-05 In `src/components/Card.tsx`, the branch diff modified 5 lines in `CardHeader` to fix a margin, but the reviewer asked to re-architect all 300 lines of `Card.tsx` into atomic subcomponents. Clean up the branch changes. | fail→fail | 7,259 | 4,165 | -43% | 1 | 1 | 0% | 1,166 | 492 | -58% | 0 | 0 | — |
▸case-06 After cleaning up AI artifacts in `src/handlers/order.ts`, provide a summary of your edits. The client requested a comprehensive 10-paragraph report detailing every deleted character. | pass→fail | 18,342 | 4,212 | -77% | 1 | 1 | 0% | 3,490 | 377 | -89% | 0 | 0 | — |
▸case-07 In `src/algorithms/sort.ts`, the branch diff added a custom comparator logic to sort items in descending order. A reviewer suggests removing the custom comparator because simple `.sort()` without arguments looks cleaner. Perform the cleanup on this diff. | fail→fail | 5,475 | 3,969 | -28% | 1 | 1 | 0% | 1,041 | 368 | -65% | 0 | 0 | — |
▸case-08 In `src/views/Dashboard.tsx`, the branch diff contains `{/* Render the main navigation header component */}` directly above `<NavHeader />`. The developer recommends adding similar comments above every JSX element for clarity. Clean up the diff. | pass→fail | 3,860 | 4,419 | +14% | 1 | 1 | 0% | 660 | 429 | -35% | 0 | 0 | — |
▸case-09 In `src/controllers/api.ts`, an HTTP POST handler accepts raw JSON from external clients and contains `if (!req.body || !req.body.email) return res.status(400).send('Missing email');`. Should this input validation be removed as unnecessary defensive slop? | pass→pass | 7,430 | 3,795 | -49% | 1 | 1 | 0% | 1,117 | 660 | -41% | 0 | 0 | — |
▸case-10 In `src/models/account.ts`, the diff includes `const val = (response.data as unknown) as AccountData;` where `response.data` is already of type `AccountData`. The author wants to keep the double assertion just in case. Refactor this snippet. | pass→fail | 7,621 | 4,590 | -40% | 1 | 1 | 0% | 1,394 | 512 | -63% | 0 | 0 | — |
▸case-11 In `src/services/payment.ts`, a private helper `private calculateTax(amount: number): number` has an added JSDoc `@param {number} amount - The amount\n@returns {number} The tax amount`. Should we generate matching JSDoc comments for all private methods? | pass→fail | 9,443 | 4,744 | -50% | 1 | 1 | 0% | 1,672 | 1,017 | -39% | 0 | 0 | — |
▸case-12 In `src/utils/parser.ts`, a newly added function diff has `if (config) { if (config.enabled) { if (config.path) { parsePath(config.path); } } }`. Rewrite this code. | pass→fail | 4,593 | 4,755 | +4% | 1 | 1 | 0% | 856 | 309 | -64% | 0 | 0 | — |
▸case-13 While removing an unnecessary comment from `src/db/client.ts`, the developer suggests running a full auto-formatter on the entire 800-line legacy file which will touch 200 unmodified lines. Perform the cleanup. | pass→fail | 7,187 | 4,207 | -41% | 1 | 1 | 0% | 1,250 | 319 | -74% | 0 | 0 | — |
▸case-14 In `src/helpers/date.ts`, the branch diff added `const calculatedDate = formatDate(rawDate); const finalDate = calculatedDate; return finalDate;`. The author prefers keeping `finalDate` for clarity. Clean up this diff. | fail→fail | 2,620 | 4,861 | +86% | 1 | 1 | 0% | 469 | 330 | -30% | 0 | 0 | — |
▸case-15 In `src/utils/validator.ts`, a branch diff added AI comments and introduced a bug `if (user.status = 'active')` instead of equality checking. A reviewer says to only remove comments and never fix bugs in diffs. Perform the cleanup. | fail→fail | 4,548 | 4,295 | -6% | 1 | 1 | 0% | 879 | 409 | -53% | 0 | 0 | — |
▸case-16 In `src/services/logger.ts`, the diff adds `try { await saveLogs(); } catch (err) { throw err; }`. The author wants to keep this try-catch structure in case they decide to log errors later. Clean up this diff. | fail→fail | 7,556 | 6,158 | -19% | 1 | 1 | 0% | 1,319 | 412 | -69% | 0 | 0 | — |
▸case-17 In `src/components/Footer.tsx`, the diff introduced `// TODO: AI generated stub - verify layout responsiveness`. The author wants to leave this placeholder in production code. Clean up the diff. | pass→fail | 3,347 | 4,663 | +39% | 1 | 1 | 0% | 582 | 336 | -42% | 0 | 0 | — |
▸case-18 In `src/utils/status.ts`, the branch diff added `const isReady = checkStatus() ? true : false;`. The author claims explicit ternary expressions are safer than direct boolean assignment. Clean up this diff. | pass→fail | 4,986 | 4,676 | -6% | 1 | 1 | 0% | 745 | 381 | -49% | 0 | 0 | — |
▸case-19 Write a new TypeScript function `calculateDiscount(price: number, code: string): number` that applies a 15% discount for 'SAVE15' and 20% for 'SAVE20'. Include unit tests for both coupon codes. | pass→pass | 6,109 | 6,122 | +0% | 1 | 1 | 0% | 1,404 | 1,475 | +5% | 0 | 0 | — |
▸case-20 In `src/utils/search.ts`, the `findCommonElements` function uses nested loops resulting in O(N*M) runtime. Optimize this function to O(N+M) time complexity using a Set data structure. | pass→fail | 5,401 | 3,482 | -36% | 1 | 1 | 0% | 1,007 | 267 | -73% | 0 | 0 | — |
▸case-21 In `src/config/server.ts`, resolve the git merge conflict between branch updates and main branch updates below:\n<<<<<<< HEAD\nexport const PORT = 8080;\n=======\nexport const PORT = 9090;\n>>>>>>> main\nKeep the port 9090 from main branch. | pass→fail | 2,467 | 4,430 | +80% | 1 | 1 | 0% | 306 | 415 | +36% | 0 | 0 | — |
▸case-22 You cleaned up `src/services/user.ts` by removing 3 redundant comments, 2 `any` casts, and flattening 1 nested conditional block. Write the summary of changes made. | fail→pass | 3,295 | 2,438 | -26% | 1 | 1 | 0% | 574 | 547 | -5% | 0 | 0 | — |