▸case-01 We're setting up a new Java backend module with Maven and need advice on class design. Can you evaluate our controller-service-repository setup and recommend a clean testing structure, including where to mock external dependencies and how to construct integration tests? | fail→fail | 35,863 | 32,188 | -10% | 1 | 1 | 0% | 3,200 | 671 | -79% | 0 | 0 | — |
▸case-02 We are designing a Java user search service method `findActiveUsers(String departmentId)`. When no matching users are found in the database, our lead developer suggested returning null so callers can check `if (users == null)`. How should this method handle empty query results? | fail→fail | 11,084 | 8,890 | -20% | 1 | 1 | 0% | 1,919 | 1,764 | -8% | 0 | 0 | — |
▸case-03 Our team is creating a Java REST DTO class `UpdateUserProfileRequest` for a Spring Boot application. To represent optional payload fields like middle name or phone number, a developer proposed declaring fields as `private Optional<String> middleName;`. Is this field declaration pattern appropriate? | pass→pass | 12,665 | 11,555 | -9% | 1 | 1 | 0% | 2,382 | 2,185 | -8% | 0 | 0 | — |
▸case-04 We are creating a Java core domain model `Order` that requires a valid positive amount and non-null customer ID. One design proposal uses a no-argument constructor with public setter methods for all fields so object mappers can mutate state anytime. How should we structure this domain model to ensure data integrity? | pass→pass | 11,134 | 10,157 | -9% | 1 | 1 | 0% | 2,576 | 1,916 | -26% | 0 | 0 | — |
▸case-05 In our Java payment processing service, we have code that wraps call blocks with `try { paymentGateway.charge(req); } catch (Exception e) { log.error("failed"); }`. The developer wants to catch `Exception` broadly so the application never crashes. How should this exception handling block be refactored? | pass→pass | 16,727 | 11,051 | -34% | 1 | 1 | 0% | 2,818 | 2,134 | -24% | 0 | 0 | — |
▸case-06 Our Java team is writing unit tests for a complex business workflow in `OrderProcessingService`. The developer created 15 Mockito mocks for internal helper classes, private calculation utilities, and internal sub-services. Is this heavy internal mocking pattern recommended? | pass→pass | 13,352 | 9,159 | -31% | 1 | 1 | 0% | 2,217 | 1,665 | -25% | 0 | 0 | — |
▸case-07 We need to execute the automated test suite for a legacy Java repository that uses Apache Maven. What exact command should be documented and run in our CI pipeline to execute tests? | fail→fail | 9,005 | 3,521 | -61% | 1 | 1 | 0% | 1,555 | 962 | -38% | 0 | 0 | — |
▸case-08 A colleague submitted a pull request where an HTTP Controller class `ProductController` directly executes SQL queries using JdbcTemplate to fetch items and render JSON responses. How should this code be refactored to adhere to architectural layering? | pass→pass | 13,026 | 7,841 | -40% | 1 | 1 | 0% | 2,122 | 2,053 | -3% | 0 | 0 | — |
▸case-09 We are reviewing an exception handling strategy in a Java authentication service that connects to a database. When a database connection error occurs, the DAO catches SQLException and throws a new RuntimeException containing the raw database connection string and password. What review criteria should be applied here? | pass→pass | 12,323 | 7,491 | -39% | 1 | 1 | 0% | 2,227 | 1,701 | -24% | 0 | 0 | — |
▸case-10 During an incident, our Java microservice threw a 200-line stack trace containing dozens of framework internal frames from Spring, Netty, and Tomcat. What step should a developer take when inspecting this trace to locate the root cause? | pass→pass | 9,789 | 2,725 | -72% | 1 | 1 | 0% | 1,424 | 857 | -40% | 0 | 0 | — |
▸case-11 We are onboarding onto a new Java repository and need to determine its build system and entry point before running builds. Which specific configuration files should we check first? | pass→pass | 11,207 | 4,803 | -57% | 1 | 1 | 0% | 2,079 | 1,324 | -36% | 0 | 0 | — |
▸case-12 Our Java application has a single class `UserManager` with over 4,000 lines of code handling password resets, email sending, PDF generation, SQL queries, and OAuth token validation. How should this class be refactored? | pass→pass | 11,627 | 9,229 | -21% | 1 | 1 | 0% | 2,339 | 2,141 | -8% | 0 | 0 | — |
▸case-13 In our Java user registration service, input strings are passed directly down to deep internal database query helpers before checking if input arguments are null, resulting in deeply nested NullPointerExceptions. Where should null validation take place? | pass→pass | 10,355 | 6,614 | -36% | 1 | 1 | 0% | 1,898 | 1,570 | -17% | 0 | 0 | — |
▸case-14 In a Java file cleanup batch job, we found the following code: `try { Files.delete(path); } catch (IOException e) { }`. The author claims ignoring the error is fine because the file might already be deleted. How should this code be improved? | pass→pass | 8,811 | 6,376 | -28% | 1 | 1 | 0% | 1,650 | 1,627 | -1% | 0 | 0 | — |
▸case-15 We have a Java configuration class `DatabaseConfig` with 3 optional properties and 2 required properties. The team is debating whether to create 8 overloaded constructor combinations versus using a builder pattern. When is a builder appropriate according to clean Java design principles? | fail→fail | 12,619 | 8,820 | -30% | 1 | 1 | 0% | 2,340 | 2,138 | -9% | 0 | 0 | — |
▸case-16 We have a Java project structured with Gradle instead of Maven. What exact command should developers run in the terminal to execute the automated test suite? | pass→pass | 4,480 | 2,690 | -40% | 1 | 1 | 0% | 696 | 825 | +19% | 0 | 0 | — |
▸case-17 We are defining a repository method signature in Java for fetching a user by unique UUID: `User findById(UUID id)`. If no user exists with that ID, the method currently returns null. How should this method signature be updated for safer null handling? | pass→pass | 6,772 | 3,553 | -48% | 1 | 1 | 0% | 1,246 | 1,058 | -15% | 0 | 0 | — |
▸case-18 We are configuring a ThreadPoolExecutor in Java 21 for an I/O-intensive REST client service processing 5,000 HTTP requests per minute. Should we use Executors.newFixedThreadPool(200) or configure a custom pool size based on CPU cores? | pass→pass | 13,609 | 12,060 | -11% | 1 | 1 | 0% | 2,652 | 2,583 | -3% | 0 | 0 | — |
▸case-19 Our Java 17 application on a 16GB RAM container experiences 800ms garbage collection pauses during peak load. We want to switch from default G1GC parameters to ZGC using flags like `-XX:+UseZGC -XX:SoftMaxHeapSize`. What are the flags and trade-offs for tuning ZGC on high throughput workloads? | pass→pass | 16,522 | 14,924 | -10% | 1 | 1 | 0% | 2,845 | 3,091 | +9% | 0 | 0 | — |
▸case-20 We are implementing JWT authentication in Spring Boot 3 using SecurityFilterChain bean definitions and BearerTokenAuthenticationFilter. How do we configure http.authorizeHttpRequests() to permit `/api/public/**` while requiring authenticated access for `/api/admin/**`? | pass→pass | 9,661 | 5,947 | -38% | 1 | 1 | 0% | 2,051 | 1,531 | -25% | 0 | 0 | — |
▸case-21 Our Java team is standardizing on a unit testing framework for writing isolated component tests across our microservices. Which test framework is standard for Java unit testing? | pass→pass | 12,827 | 6,957 | -46% | 1 | 1 | 0% | 1,930 | 1,607 | -17% | 0 | 0 | — |
▸case-22 During a code review for a Java web application, what key layering and security boundaries should be verified before approving a pull request? | fail→fail | 16,068 | 10,290 | -36% | 1 | 1 | 0% | 2,852 | 2,063 | -28% | 0 | 0 | — |