Validation: The code_fix and product_bug_report fields are mutually exclusive. Only one will be present based on the classification.
Backward Compatibility: The analysis field accepts legacy string format for data stored before the AnalysisDetail model was introduced. String values are automatically wrapped in the details field.
{ "test_name": "com.example.TestClass.testNullPointer", "error": "NullPointerException at line 42", "analysis": { "classification": "CODE ISSUE", "affected_tests": ["com.example.TestClass.testNullPointer"], "details": "The test is failing due to a null pointer dereference when initializing the User object. The code attempts to access user.getName() without checking if user is null.", "code_fix": { "file": "src/main/java/com/example/UserService.java", "line": "42", "change": "Add null check: if (user != null) { return user.getName(); } else { return \"Unknown\"; }" } }}
{ "test_name": "com.example.api.TestUserEndpoint.testGetUser", "error": "AssertionError: Expected 200 but got 500", "analysis": { "classification": "PRODUCT BUG", "affected_tests": ["com.example.api.TestUserEndpoint.testGetUser"], "details": "The API endpoint /api/users/{id} is returning a 500 Internal Server Error instead of successfully retrieving user data. This appears to be a regression in the user service.", "product_bug_report": { "title": "User API endpoint returns 500 error on valid requests", "severity": "high", "component": "user-service", "description": "The GET /api/users/{id} endpoint fails with HTTP 500 when requesting valid user IDs. Expected behavior is to return HTTP 200 with user data.", "evidence": "HTTP 500 Internal Server Error\nResponse: {\"error\": \"Database connection failed\"}", "jira_search_keywords": ["user-service", "API", "500 error", "database"], "jira_matches": [ { "key": "PROJ-456", "summary": "User service intermittently returns 500 errors", "status": "Open", "priority": "High", "url": "https://example.atlassian.net/browse/PROJ-456", "score": 0.85 } ] } }}