{
  "id": "java/junit-assertion-expected-actual-mismatch",
  "signature": "java.lang.AssertionError: expected: [1, 2, 3] but was: [1, 2, 4]",
  "signature_zh": "断言错误：期望 [1, 2, 3] 但实际是 [1, 2, 4]",
  "regex": "java\\.lang\\.AssertionError:\\ expected:\\ \\[1,\\ 2,\\ 3\\]\\ but\\ was:\\ \\[1,\\ 2,\\ 4\\]",
  "domain": "java",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "Test assertion failed due to mismatch between expected and actual values, often from incorrect test data or logic.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试断言失败，因为期望值与实际值不匹配，通常由于测试数据或逻辑错误。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Changing expected value to match actual without investigation",
      "why_fails": "Hides real bug in production code.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignoring order in lists without using appropriate matcher",
      "why_fails": "AssertEquals checks order; using it for unordered lists causes false failures.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use assertIterableEquals for lists",
      "success_rate": 0.9,
      "how": "import static org.junit.jupiter.api.Assertions.assertIterableEquals;\nassertIterableEquals(expectedList, actualList);",
      "condition": "",
      "sources": []
    },
    {
      "action": "Debug by printing actual values",
      "success_rate": 0.85,
      "how": "System.out.println(\"Actual: \" + actualList);\n// Then fix production code",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-01-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}