▸case-06 A Rust CLI application parses `std::env::args()` inside business execution subroutines and validates argument ranges (such as worker count > 0) inside worker thread spawn loops. How should command line argument handling be restructured? | pass→pass | 14,117 | 10,512 | -26% | 1 | 1 | 0% | 2,761 | 2,188 | -21% | 0 | 0 | — |
▸case-19 A dashboard reporting service in Python formats HTML summaries. The function `render_summary_html(user_id)` queries Redis for session details and PostgreSQL for usage stats while assembling HTML strings. How should this function be structured? | pass→pass | 13,467 | 8,389 | -38% | 1 | 1 | 0% | 2,826 | 1,851 | -35% | 0 | 0 | — |
▸case-03 In a Go order processing pipeline, an incoming HTTP payload is parsed into a `ValidatedOrder` struct at the API boundary. However, deep helper functions like `calculateTax(order *ValidatedOrder)` and `applyDiscount(order *ValidatedOrder)` still perform `if order == nil || order.Items == nil` checks before processing. How should these internal helper functions be cleaned up? | pass→pass | 14,105 | 10,615 | -25% | 1 | 1 | 0% | 2,349 | 2,121 | -10% | 0 | 0 | — |
▸case-04 A Node.js AI agent system generates LLM prompts. The current implementation fetches user settings directly from MongoDB inside `buildPrompt(userId)` and constructs the prompt text using template strings. How should this module be refactored? | pass→pass | 12,429 | 10,212 | -18% | 1 | 1 | 0% | 2,444 | 2,219 | -9% | 0 | 0 | — |
▸case-05 In an Express.js API route handling payment creation, `req.body` is passed directly to `processPayment(data)`, where individual fields like `amount` and `currency` are type-checked and validated deep inside the financial calculation routine. How should validation and business logic be organized? | pass→pass | 11,939 | 7,021 | -41% | 1 | 1 | 0% | 2,499 | 1,751 | -30% | 0 | 0 | — |
▸case-01 In a Go backend application, database retry logic currently calls `os.Getenv("DB_TIMEOUT")`, converts it to an integer, and checks `if timeout <= 0` inside every retry attempt function `ExecuteWithRetry()`. How should this configuration handling be refactored? | pass→pass | 13,600 | 8,491 | -38% | 1 | 1 | 0% | 2,544 | 1,981 | -22% | 0 | 0 | — |
▸case-02 You are building a resume scoring module in Python using FastAPI. The current draft passes `fastapi.Request` and `sqlalchemy.orm.Session` directly into `score_candidate_resume(request, db_session)`. How should this function be structured to decouple business logic from framework infrastructure? | pass→pass | 14,897 | 9,376 | -37% | 1 | 1 | 0% | 2,827 | 2,266 | -20% | 0 | 0 | — |
▸case-07 A C++ network service reading custom binary TCP packets interleaves byte array index checks and checksum validation inside its transaction state machine processor `process_state()`. How should packet processing be separated? | pass→pass | 14,074 | 11,441 | -19% | 1 | 1 | 0% | 2,709 | 2,568 | -5% | 0 | 0 | — |
▸case-08 A webhook consumer service in Python receives large JSON payloads containing 80 fields. The system immediately needs only 2 metadata fields for routing, while remaining payload attributes are used conditionally by specific downstream handlers. Should the entrypoint fully validate and parse all 80 fields upfront or handle them differently? | pass→pass | 15,745 | 8,613 | -45% | 1 | 1 | 0% | 2,634 | 1,946 | -26% | 0 | 0 | — |
▸case-09 An e-commerce system written in C# implements `CalculateFinalPrice(HttpContext context)` which directly reads query parameters, looks up tax rates from `DbContext`, and calculates discounts. How should the pricing engine be refactored? | pass→pass | 14,442 | 10,229 | -29% | 1 | 1 | 0% | 2,789 | 2,174 | -22% | 0 | 0 | — |
▸case-10 A Python batch processor reads CSV files line by line inside `generate_monthly_report()`, checking if column values are valid numbers while generating PDF charts. How should file parsing and report generation be separated? | pass→fail | 12,100 | 10,633 | -12% | 1 | 1 | 0% | 2,307 | 2,225 | -4% | 0 | 0 | — |
▸case-11 An internal microservice receives a gRPC request. At the service method boundary, gRPC messages are converted into internal domain structs. Inside downstream calculation functions, code still checks `if domainStruct.Field == ""` and returns parameter validation errors. How should downstream internal functions behave? | pass→pass | 12,780 | 6,005 | -53% | 1 | 1 | 0% | 2,063 | 1,361 | -34% | 0 | 0 | — |
▸case-12 In a Java fraud detection engine, `evaluateRisk(HttpServletRequest request)` fetches user transaction history from PostgreSQL inside risk scoring loops. How should risk assessment logic be structured? | pass→pass | 14,689 | 10,754 | -27% | 1 | 1 | 0% | 2,827 | 2,281 | -19% | 0 | 0 | — |
▸case-13 A Go Kafka consumer reads raw message bytes and passes `[]byte` to `allocateInventory(data []byte)`. Inside `allocateInventory`, `json.Unmarshal` is called and JSON syntax errors are returned. How should event consumption be refactored? | pass→pass | 12,294 | 7,188 | -42% | 1 | 1 | 0% | 2,340 | 1,628 | -30% | 0 | 0 | — |
▸case-14 In a Node.js REST service, the `Authorization` bearer token string is passed down to domain service methods like `updateUserProfile(token, profileData)` where token signature verification and claim decoding take place. How should auth handling be reorganized? | pass→fail | 15,109 | 9,795 | -35% | 1 | 1 | 0% | 2,624 | 2,092 | -20% | 0 | 0 | — |
▸case-15 A TypeScript API receives external webhook JSON payloads typed as `unknown`. Downstream calculation functions use type guards (`typeof obj === 'object' && 'amount' in obj`) inside mathematical operations. How should type narrowing be handled? | pass→pass | 12,174 | 6,507 | -47% | 1 | 1 | 0% | 2,267 | 1,456 | -36% | 0 | 0 | — |
▸case-16 In a C# math calculation library within a microservice core, internal pure matrix operations wrap every operation in `try-catch` blocks and return custom validation result wrappers. Should internal pure math functions contain defensive exception wrapping or allow direct execution? | pass→pass | 15,266 | 6,878 | -55% | 1 | 1 | 0% | 2,706 | 1,507 | -44% | 0 | 0 | — |
▸case-17 A Node.js microservice calls `process.env.PORT` and `process.env.MAX_CONNECTIONS` inside database connection initialization, email sender setup, and queue worker setup, with inline `isNaN()` parsing checks in each file. How should environment configuration be managed? | pass→pass | 11,683 | 7,573 | -35% | 1 | 1 | 0% | 2,161 | 1,665 | -23% | 0 | 0 | — |
▸case-18 A data pipeline function `exportAnalytics()` executes SQL queries, iterates over raw database rows, checks if column values are null, and writes formatted CSV strings in a single loop. How should this pipeline be refactored? | fail→pass | 12,333 | 10,816 | -12% | 1 | 1 | 0% | 2,328 | 2,206 | -5% | 0 | 0 | — |
▸case-20 In a C++ memory allocator engine, internal algorithms use `assert(ptr != nullptr)` and runtime invariant checks during debug builds to catch internal state corruption bugs during development. Should these internal invariant debug assertions be removed in favor of system boundary validation? | pass→pass | 16,146 | 9,326 | -42% | 1 | 1 | 0% | 2,650 | 1,777 | -33% | 0 | 0 | — |
▸case-21 You are authoring an open-source published Python package library `math_utils` exported on PyPI. The exported function `def compute_matrix_inverse(matrix)` receives inputs from arbitrary external caller code. Should this public library entry point validate that `matrix` is non-null and correctly shaped? | pass→pass | 11,942 | 5,904 | -51% | 1 | 1 | 0% | 2,301 | 1,393 | -39% | 0 | 0 | — |
▸case-22 When a Python FastAPI endpoint defined with a Pydantic model receives an incoming HTTP request body that fails schema validation, what HTTP status code is returned to the client? | pass→fail | 4,263 | 2,417 | -43% | 1 | 1 | 0% | 788 | 703 | -11% | 0 | 0 | — |