{"abstract":"Subtracting one also sets trailing zero bits.","category":"Integer arithmetic","checks":4,"contract":"Integer arguments; denominators, steps, moduli, and bit widths are positive. Unsigned word inputs fit the specified width except where masking is explicitly the operation. Sequence sizes are nonnegative. n is nonnegative; clear exactly its least significant one, or return zero for zero. Exact operational definition: n & (n-1)","evaluation_group":"model-9ab9d9cf44b56e65","failed_approach":"Incrementing clears a run of low one bits rather than one set bit.","family":"xn-clear-lowest-set-bit","id":"FA-5401","implementations":{"attempt":{"sha256":"e247945ab2ddcbab29e682c8b134edd9688e57b28575692088c5e518b4821c24","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(n):\n    return n & (n+1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (12,)', solve(*(12,)), 8)\ncheck('fixture 2: (8,)', solve(*(8,)), 0)\ncheck('fixture 3: (0,)', solve(*(0,)), 0)\ncheck('fixture 4: (7,)', solve(*(7,)), 6)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"9df00322629c62f1cf1ce6fdbc3d61a39c0255ee9cf7bd61776406303027cdb9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(n):\n    return n-1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (12,)', solve(*(12,)), 8)\ncheck('fixture 2: (8,)', solve(*(8,)), 0)\ncheck('fixture 3: (0,)', solve(*(0,)), 0)\ncheck('fixture 4: (7,)', solve(*(7,)), 6)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"9f77c26742fbecf660dc5bce1079e41da12bdeab716a6f64e1f3b8267f0b7e1c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(n):\n    return n & (n-1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (12,)', solve(*(12,)), 8)\ncheck('fixture 2: (8,)', solve(*(8,)), 0)\ncheck('fixture 3: (0,)', solve(*(0,)), 0)\ncheck('fixture 4: (7,)', solve(*(7,)), 6)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xn-clear-lowest-set-bit","generated_at":"2026-09-29T14:37:49.183235+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Integer mathematics results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return n & (n-1)","root_cause":"Subtracting one also sets trailing zero bits.","sha256":"cd536b92ec5306b82df5023afbf78b7aa3a7fadbb7cf65a8a8517573ead11859","title":"Clear lowest set bit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.152,"exit_code":1,"observations":[{"actual":12,"check":"fixture 1: (12,)","expected":8,"passed":false},{"actual":8,"check":"fixture 2: (8,)","expected":0,"passed":false},{"actual":0,"check":"fixture 3: (0,)","expected":0,"passed":true},{"actual":0,"check":"fixture 4: (7,)","expected":6,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (12,)\", \"actual\": 12, \"expected\": 8, \"passed\": false}, {\"check\": \"fixture 2: (8,)\", \"actual\": 8, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 3: (0,)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 4: (7,)\", \"actual\": 0, \"expected\": 6, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.984,"exit_code":1,"observations":[{"actual":11,"check":"fixture 1: (12,)","expected":8,"passed":false},{"actual":7,"check":"fixture 2: (8,)","expected":0,"passed":false},{"actual":-1,"check":"fixture 3: (0,)","expected":0,"passed":false},{"actual":6,"check":"fixture 4: (7,)","expected":6,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (12,)\", \"actual\": 11, \"expected\": 8, \"passed\": false}, {\"check\": \"fixture 2: (8,)\", \"actual\": 7, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 3: (0,)\", \"actual\": -1, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 4: (7,)\", \"actual\": 6, \"expected\": 6, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":48.349,"exit_code":0,"observations":[{"actual":8,"check":"fixture 1: (12,)","expected":8,"passed":true},{"actual":0,"check":"fixture 2: (8,)","expected":0,"passed":true},{"actual":0,"check":"fixture 3: (0,)","expected":0,"passed":true},{"actual":6,"check":"fixture 4: (7,)","expected":6,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (12,)\", \"actual\": 8, \"expected\": 8, \"passed\": true}, {\"check\": \"fixture 2: (8,)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 3: (0,)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 4: (7,)\", \"actual\": 6, \"expected\": 6, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}