{"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def combinations(n: int, k: int) -> int:\n \"\"\"\n Returns the number of different combinations of k length which can\n be made from n values, where n >= k.\n\n Examples:\n >>> combinations(10,5)\n 252\n\n >>> combinations(6,3)\n 20\n\n >>> combinations(20,5)\n 15504\n\n >>> combinations(52, 5)\n 2598960\n\n >>> combinations(0, 0)\n 1\n\n >>> combinations(-4, -5)\n ...\n Traceback (most recent call last):\n ValueError: Please enter positive integers for n and k where n >= k\n \"\"\"\n\n # If either of the conditions are true, the function is being asked\n # to calculate a factorial of a negative number, which is not possible\n if n < k or k < 0:\n raise ValueError(\"Please enter positive integers for n and k where n >= k\")\n res = 1\n for i in range(k):\n res *= n - i\n res //= i + 1\n return res\n"}, "sha256": "9375225a62b50f62f24e6bf5eee1e0d224b87772ffe4095895308554cb206987"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "9375225a62b50f62f24e6bf5eee1e0d224b87772ffe4095895308554cb206987", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "2e3b5d5f5ab13c9b6c253561f9cf05c4b98d75e78b2c46b882bc85a1d1da4e80", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00025"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00025", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 24, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def combinations(n: int, k: int) -> int:\n \"\"\"\n Returns the number of different combinations of k length which can\n be made from n values, where n >= k.\n\n Examples:\n >>> combinations(10,5)\n 252\n\n >>> combinations(6,3)\n 20\n\n >>> combinations(20,5)\n 15504\n\n >>> combinations(52, 5)\n 2598960\n\n >>> combinations(0, 0)\n 1\n\n >>> combinations(-4, -5)\n ...\n Traceback (most recent call last):\n ValueError: Please enter positive integers for n and k where n >= k\n \"\"\"\n\n # If either of the conditions are true, the function is being asked\n # to calculate a factorial of a negative number, which is not possible\n if n < k or k < 1:\n raise ValueError(\"Please enter positive integers for n and k where n >= k\")\n res = 1\n for i in range(k):\n res *= n - i\n res //= i + 1\n return res\n"}, "sha256": "ea7fe19f54a253fdf92a0e65b42c391109085c9a06377890c302854cad791a0a"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "combinations:4", "got": "ValueError: Please enter positive integers for n and k where n >= k", "source": "combinations(0, 0)\n", "truncated": false, "want": "1\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "off_by_one", "seed": 7, "span": {"col_offset": 20, "end_byte": 684, "lineno": 30, "node": "Constant", "node_col_offset": 20, "node_end_col_offset": 21, "node_end_lineno": 30, "node_lineno": 30, "op_index": 0, "original_text": "0", "replacement_text": "1", "start_byte": 683}}, "public_tests": {"examples": [{"example_id": "combinations:0", "source": "combinations(10,5)\n", "want": "252\n"}, {"example_id": "combinations:1", "source": "combinations(6,3)\n", "want": "20\n"}, {"example_id": "combinations:2", "source": "combinations(20,5)\n", "want": "15504\n"}, {"example_id": "combinations:3", "source": "combinations(52, 5)\n", "want": "2598960\n"}, {"example_id": "combinations:4", "source": "combinations(0, 0)\n", "want": "1\n"}, {"example_id": "combinations:5", "source": "combinations(-4, -5)\n", "want": "Traceback (most recent call last):\nValueError: Please enter positive integers for n and k where n >= k\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-da353a13a5977d46", "tree_sha256": "9375225a62b50f62f24e6bf5eee1e0d224b87772ffe4095895308554cb206987", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:maths/combinations.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def combinations(n: int, k: int) -> int:\n \"\"\"\n Returns the number of different combinations of k length which can\n be made from n values, where n >= k.\n\n Examples:\n >>> combinations(10,5)\n 252\n\n >>> combinations(6,3)\n 20\n\n >>> combinations(20,5)\n 15504\n\n >>> combinations(52, 5)\n 2598960\n\n >>> combinations(0, 0)\n 1\n\n >>> combinations(-4, -5)\n ...\n Traceback (most recent call last):\n ValueError: Please enter positive integers for n and k where n >= k\n \"\"\"\n\n # If either of the conditions are true, the function is being asked\n # to calculate a factorial of a negative number, which is not possible\n if n < k or k < 0:\n raise ValueError(\"Please enter positive integers for n and k where n >= k\")\n res = 1\n for i in range(k):\n res *= n - i\n res //= i + 1\n return res\n"}, "sha256": "9375225a62b50f62f24e6bf5eee1e0d224b87772ffe4095895308554cb206987"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "9375225a62b50f62f24e6bf5eee1e0d224b87772ffe4095895308554cb206987", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "2d9d4630dbfd3aac7a9d16f4d11e813cc693d63e690b78a5de5c6307b18cdf76", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00050"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00050", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 24, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def combinations(n: int, k: int) -> int:\n \"\"\"\n Returns the number of different combinations of k length which can\n be made from n values, where n >= k.\n\n Examples:\n >>> combinations(10,5)\n 252\n\n >>> combinations(6,3)\n 20\n\n >>> combinations(20,5)\n 15504\n\n >>> combinations(52, 5)\n 2598960\n\n >>> combinations(0, 0)\n 1\n\n >>> combinations(-4, -5)\n ...\n Traceback (most recent call last):\n ValueError: Please enter positive integers for n and k where n >= k\n \"\"\"\n\n # If either of the conditions are true, the function is being asked\n # to calculate a factorial of a negative number, which is not possible\n if n <= k or k < 0:\n raise ValueError(\"Please enter positive integers for n and k where n >= k\")\n res = 1\n for i in range(k):\n res *= n - i\n res //= i + 1\n return res\n"}, "sha256": "1d80ab3e8ccc127eddc0eeb73a9d3e313707b3dea055244d8cd68fdfd211361d"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "combinations:4", "got": "ValueError: Please enter positive integers for n and k where n >= k", "source": "combinations(0, 0)\n", "truncated": false, "want": "1\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "comparison_boundary", "seed": 7, "span": {"col_offset": 9, "end_byte": 673, "lineno": 30, "node": "Compare", "node_col_offset": 7, "node_end_col_offset": 12, "node_end_lineno": 30, "node_lineno": 30, "op_index": 0, "original_text": "<", "replacement_text": "<=", "start_byte": 672}}, "public_tests": {"examples": [{"example_id": "combinations:0", "source": "combinations(10,5)\n", "want": "252\n"}, {"example_id": "combinations:1", "source": "combinations(6,3)\n", "want": "20\n"}, {"example_id": "combinations:2", "source": "combinations(20,5)\n", "want": "15504\n"}, {"example_id": "combinations:3", "source": "combinations(52, 5)\n", "want": "2598960\n"}, {"example_id": "combinations:4", "source": "combinations(0, 0)\n", "want": "1\n"}, {"example_id": "combinations:5", "source": "combinations(-4, -5)\n", "want": "Traceback (most recent call last):\nValueError: Please enter positive integers for n and k where n >= k\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-da353a13a5977d46", "tree_sha256": "9375225a62b50f62f24e6bf5eee1e0d224b87772ffe4095895308554cb206987", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:maths/combinations.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def split(string: str, separator: str = \" \") -> list:\n \"\"\"\n Will split the string up into all the values separated by the separator\n (defaults to spaces)\n\n >>> split(\"apple#banana#cherry#orange\",separator='#')\n ['apple', 'banana', 'cherry', 'orange']\n\n >>> split(\"Hello there\")\n ['Hello', 'there']\n\n >>> split(\"11/22/63\",separator = '/')\n ['11', '22', '63']\n\n >>> split(\"12:43:39\",separator = \":\")\n ['12', '43', '39']\n\n >>> split(\";abbb;;c;\", separator=';')\n ['', 'abbb', '', 'c', '']\n \"\"\"\n\n split_words = []\n\n last_index = 0\n for index, char in enumerate(string):\n if char == separator:\n split_words.append(string[last_index:index])\n last_index = index + 1\n if index + 1 == len(string):\n split_words.append(string[last_index : index + 1])\n return split_words\n"}, "sha256": "b82095eb4c4578bf11c36b5715c4892fcac09fffada99e57de24852e3bd57ef3"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "b82095eb4c4578bf11c36b5715c4892fcac09fffada99e57de24852e3bd57ef3", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "3ba06c4e4366d7083979b99a6610dee4a898d09ec5b38a62f7fd0bc484d0ec14", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00068"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00068", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 6, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def split(string: str, separator: str = \" \") -> list:\n \"\"\"\n Will split the string up into all the values separated by the separator\n (defaults to spaces)\n\n >>> split(\"apple#banana#cherry#orange\",separator='#')\n ['apple', 'banana', 'cherry', 'orange']\n\n >>> split(\"Hello there\")\n ['Hello', 'there']\n\n >>> split(\"11/22/63\",separator = '/')\n ['11', '22', '63']\n\n >>> split(\"12:43:39\",separator = \":\")\n ['12', '43', '39']\n\n >>> split(\";abbb;;c;\", separator=';')\n ['', 'abbb', '', 'c', '']\n \"\"\"\n\n split_words = []\n\n last_index = 0\n for index, char in enumerate(string):\n if char == separator:\n split_words.append(string[last_index:index])\n last_index = index + 1\n if index + 1 != len(string):\n split_words.append(string[last_index : index + 1])\n return split_words\n"}, "sha256": "c3a2e2c2b0a8e788ee237f6edfd7e68e6e3849985b87381208d273c8716d1fd6"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "split:0", "got": "['a', 'ap', 'app', 'appl', 'apple', 'apple', '', 'b', 'ba', 'ban', 'bana', 'banan', 'banana', 'banana', '', 'c', 'ch', 'che', 'cher', 'cherr', 'cherry', 'cherry', '', 'o', 'or', 'ora', 'oran', 'orang']\n", "source": "split(\"apple#banana#cherry#orange\",separator='#')\n", "truncated": false, "want": "['apple', 'banana', 'cherry', 'orange']\n"}, {"example_id": "split:1", "got": "['H', 'He', 'Hel', 'Hell', 'Hello', 'Hello', '', 't', 'th', 'the', 'ther']\n", "source": "split(\"Hello there\")\n", "truncated": false, "want": "['Hello', 'there']\n"}, {"example_id": "split:2", "got": "['1', '11', '11', '', '2', '22', '22', '', '6']\n", "source": "split(\"11/22/63\",separator = '/')\n", "truncated": false, "want": "['11', '22', '63']\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "boolean_condition", "seed": 7, "span": {"col_offset": 21, "end_byte": 761, "lineno": 29, "node": "Compare", "node_col_offset": 11, "node_end_col_offset": 35, "node_end_lineno": 29, "node_lineno": 29, "op_index": 0, "original_text": "==", "replacement_text": "!=", "start_byte": 759}}, "public_tests": {"examples": [{"example_id": "split:0", "source": "split(\"apple#banana#cherry#orange\",separator='#')\n", "want": "['apple', 'banana', 'cherry', 'orange']\n"}, {"example_id": "split:1", "source": "split(\"Hello there\")\n", "want": "['Hello', 'there']\n"}, {"example_id": "split:2", "source": "split(\"11/22/63\",separator = '/')\n", "want": "['11', '22', '63']\n"}, {"example_id": "split:3", "source": "split(\"12:43:39\",separator = \":\")\n", "want": "['12', '43', '39']\n"}, {"example_id": "split:4", "source": "split(\";abbb;;c;\", separator=';')\n", "want": "['', 'abbb', '', 'c', '']\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-58ab7a39a093d083", "tree_sha256": "b82095eb4c4578bf11c36b5715c4892fcac09fffada99e57de24852e3bd57ef3", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:strings/split.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def merge_sort(collection: list) -> list:\n \"\"\"\n Sorts a list using the merge sort algorithm.\n\n :param collection: A mutable ordered collection with comparable items.\n :return: The same collection ordered in ascending order.\n\n Time Complexity: O(n log n)\n Space Complexity: O(n)\n\n Examples:\n >>> merge_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> merge_sort([])\n []\n >>> merge_sort([-2, -5, -45])\n [-45, -5, -2]\n \"\"\"\n\n def merge(left: list, right: list) -> list:\n \"\"\"\n Merge two sorted lists into a single sorted list.\n\n :param left: Left collection\n :param right: Right collection\n :return: Merged result\n \"\"\"\n result = []\n while left and right:\n result.append(left.pop(0) if left[0] <= right[0] else right.pop(0))\n result.extend(left)\n result.extend(right)\n return result\n\n if len(collection) <= 1:\n return collection\n mid_index = len(collection) // 2\n return merge(merge_sort(collection[:mid_index]), merge_sort(collection[mid_index:]))\n"}, "sha256": "565fc992c82d3872eb3181e98916d234ad4144f5787c6184f74aa0904f024ff9"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "565fc992c82d3872eb3181e98916d234ad4144f5787c6184f74aa0904f024ff9", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "5bba1326a6727a10f123c2d6891c91e652f3b5297aaa13eb825f8bcd4f76b270", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00088"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00088", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 11, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def merge_sort(collection: list) -> list:\n \"\"\"\n Sorts a list using the merge sort algorithm.\n\n :param collection: A mutable ordered collection with comparable items.\n :return: The same collection ordered in ascending order.\n\n Time Complexity: O(n log n)\n Space Complexity: O(n)\n\n Examples:\n >>> merge_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> merge_sort([])\n []\n >>> merge_sort([-2, -5, -45])\n [-45, -5, -2]\n \"\"\"\n\n def merge(left: list, right: list) -> list:\n \"\"\"\n Merge two sorted lists into a single sorted list.\n\n :param left: Left collection\n :param right: Right collection\n :return: Merged result\n \"\"\"\n result = []\n while left or right:\n result.append(left.pop(0) if left[0] <= right[0] else right.pop(0))\n result.extend(left)\n result.extend(right)\n return result\n\n if len(collection) <= 1:\n return collection\n mid_index = len(collection) // 2\n return merge(merge_sort(collection[:mid_index]), merge_sort(collection[mid_index:]))\n"}, "sha256": "66e04a54d62dab73d62418556ea9e5a4ab82abef80bdba69c0856b2f6cb63733"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "merge_sort:0", "got": "IndexError: list index out of range", "source": "merge_sort([0, 5, 3, 2, 2])\n", "truncated": false, "want": "[0, 2, 2, 3, 5]\n"}, {"example_id": "merge_sort:2", "got": "IndexError: list index out of range", "source": "merge_sort([-2, -5, -45])\n", "truncated": false, "want": "[-45, -5, -2]\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "boolean_condition", "seed": 7, "span": {"col_offset": 19, "end_byte": 738, "lineno": 29, "node": "BoolOp", "node_col_offset": 14, "node_end_col_offset": 28, "node_end_lineno": 29, "node_lineno": 29, "op_index": 0, "original_text": "and", "replacement_text": "or", "start_byte": 735}}, "public_tests": {"examples": [{"example_id": "merge_sort:0", "source": "merge_sort([0, 5, 3, 2, 2])\n", "want": "[0, 2, 2, 3, 5]\n"}, {"example_id": "merge_sort:1", "source": "merge_sort([])\n", "want": "[]\n"}, {"example_id": "merge_sort:2", "source": "merge_sort([-2, -5, -45])\n", "want": "[-45, -5, -2]\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-1a7ba0f93acb90b3", "tree_sha256": "565fc992c82d3872eb3181e98916d234ad4144f5787c6184f74aa0904f024ff9", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:sorts/merge_sort.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def upper(word: str) -> str:\n \"\"\"\n Convert an entire string to ASCII uppercase letters by looking for lowercase ASCII\n letters and subtracting 32 from their integer representation to get the uppercase\n letter.\n\n >>> upper(\"wow\")\n 'WOW'\n >>> upper(\"Hello\")\n 'HELLO'\n >>> upper(\"WHAT\")\n 'WHAT'\n >>> upper(\"wh[]32\")\n 'WH[]32'\n \"\"\"\n return \"\".join(chr(ord(char) - 32) if \"a\" <= char <= \"z\" else char for char in word)\n"}, "sha256": "da79f4abbb402652b314715788e4c0f4f1359736fa1fd9cd504ef905ee1a0911"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "da79f4abbb402652b314715788e4c0f4f1359736fa1fd9cd504ef905ee1a0911", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "5128e0e3d3f9c5b9051f863cb7a057a494334705a9a98e2152e6f96063925efb", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00108"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00108", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 18, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def upper(word: str) -> str:\n \"\"\"\n Convert an entire string to ASCII uppercase letters by looking for lowercase ASCII\n letters and subtracting 32 from their integer representation to get the uppercase\n letter.\n\n >>> upper(\"wow\")\n 'WOW'\n >>> upper(\"Hello\")\n 'HELLO'\n >>> upper(\"WHAT\")\n 'WHAT'\n >>> upper(\"wh[]32\")\n 'WH[]32'\n \"\"\"\n return \"\".join(chr(ord(char) + 32) if \"a\" <= char <= \"z\" else char for char in word)\n"}, "sha256": "12d97d7f62bee181f2bb4cc9b621e868381c60e3c44cfd86c6a7edb6ed9e0b01"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "upper:0", "got": "'\\x97\\x8f\\x97'\n", "source": "upper(\"wow\")\n", "truncated": false, "want": "'WOW'\n"}, {"example_id": "upper:1", "got": "'H\\x85\\x8c\\x8c\\x8f'\n", "source": "upper(\"Hello\")\n", "truncated": false, "want": "'HELLO'\n"}, {"example_id": "upper:3", "got": "'\\x97\\x88[]32'\n", "source": "upper(\"wh[]32\")\n", "truncated": false, "want": "'WH[]32'\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "arithmetic_operator", "seed": 7, "span": {"col_offset": 33, "end_byte": 401, "lineno": 16, "node": "BinOp", "node_col_offset": 23, "node_end_col_offset": 37, "node_end_lineno": 16, "node_lineno": 16, "op_index": 0, "original_text": "-", "replacement_text": "+", "start_byte": 400}}, "public_tests": {"examples": [{"example_id": "upper:0", "source": "upper(\"wow\")\n", "want": "'WOW'\n"}, {"example_id": "upper:1", "source": "upper(\"Hello\")\n", "want": "'HELLO'\n"}, {"example_id": "upper:2", "source": "upper(\"WHAT\")\n", "want": "'WHAT'\n"}, {"example_id": "upper:3", "source": "upper(\"wh[]32\")\n", "want": "'WH[]32'\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-87b677b196070067", "tree_sha256": "da79f4abbb402652b314715788e4c0f4f1359736fa1fd9cd504ef905ee1a0911", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:strings/upper.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "import math\n\n\ndef rectangular_to_polar(real: float, img: float) -> tuple[float, float]:\n \"\"\"\n https://en.wikipedia.org/wiki/Polar_coordinate_system\n\n >>> rectangular_to_polar(5,-5)\n (7.07, -45.0)\n >>> rectangular_to_polar(-1,1)\n (1.41, 135.0)\n >>> rectangular_to_polar(-1,-1)\n (1.41, -135.0)\n >>> rectangular_to_polar(1e-10,1e-10)\n (0.0, 45.0)\n >>> rectangular_to_polar(-1e-10,1e-10)\n (0.0, 135.0)\n >>> rectangular_to_polar(9.75,5.93)\n (11.41, 31.31)\n >>> rectangular_to_polar(10000,99999)\n (100497.76, 84.29)\n \"\"\"\n\n mod = round(math.sqrt((real**2) + (img**2)), 2)\n ang = round(math.degrees(math.atan2(img, real)), 2)\n return (mod, ang)\n"}, "sha256": "97b13fe58dd48f06a9063bf79bd6c23b8387fa3fbf018537cd50587ca7534ec2"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "97b13fe58dd48f06a9063bf79bd6c23b8387fa3fbf018537cd50587ca7534ec2", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "2072383156976b61147dccdaa04e306e76a60e70945d872c2881a48db6403a7c", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00114"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00114", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 24, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "import math\n\n\ndef rectangular_to_polar(real: float, img: float) -> tuple[float, float]:\n \"\"\"\n https://en.wikipedia.org/wiki/Polar_coordinate_system\n\n >>> rectangular_to_polar(5,-5)\n (7.07, -45.0)\n >>> rectangular_to_polar(-1,1)\n (1.41, 135.0)\n >>> rectangular_to_polar(-1,-1)\n (1.41, -135.0)\n >>> rectangular_to_polar(1e-10,1e-10)\n (0.0, 45.0)\n >>> rectangular_to_polar(-1e-10,1e-10)\n (0.0, 135.0)\n >>> rectangular_to_polar(9.75,5.93)\n (11.41, 31.31)\n >>> rectangular_to_polar(10000,99999)\n (100497.76, 84.29)\n \"\"\"\n\n mod = round(math.sqrt((real**2) - (img**2)), 2)\n ang = round(math.degrees(math.atan2(img, real)), 2)\n return (mod, ang)\n"}, "sha256": "b29f52f001fdb43c77d5390ea38d487d9e30a0bb8a588afd4269c4d04c26d975"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "rectangular_to_polar:0", "got": "(0.0, -45.0)\n", "source": "rectangular_to_polar(5,-5)\n", "truncated": false, "want": "(7.07, -45.0)\n"}, {"example_id": "rectangular_to_polar:1", "got": "(0.0, 135.0)\n", "source": "rectangular_to_polar(-1,1)\n", "truncated": false, "want": "(1.41, 135.0)\n"}, {"example_id": "rectangular_to_polar:2", "got": "(0.0, -135.0)\n", "source": "rectangular_to_polar(-1,-1)\n", "truncated": false, "want": "(1.41, -135.0)\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "arithmetic_operator", "seed": 7, "span": {"col_offset": 36, "end_byte": 604, "lineno": 24, "node": "BinOp", "node_col_offset": 26, "node_end_col_offset": 46, "node_end_lineno": 24, "node_lineno": 24, "op_index": 0, "original_text": "+", "replacement_text": "-", "start_byte": 603}}, "public_tests": {"examples": [{"example_id": "rectangular_to_polar:0", "source": "rectangular_to_polar(5,-5)\n", "want": "(7.07, -45.0)\n"}, {"example_id": "rectangular_to_polar:1", "source": "rectangular_to_polar(-1,1)\n", "want": "(1.41, 135.0)\n"}, {"example_id": "rectangular_to_polar:2", "source": "rectangular_to_polar(-1,-1)\n", "want": "(1.41, -135.0)\n"}, {"example_id": "rectangular_to_polar:3", "source": "rectangular_to_polar(1e-10,1e-10)\n", "want": "(0.0, 45.0)\n"}, {"example_id": "rectangular_to_polar:4", "source": "rectangular_to_polar(-1e-10,1e-10)\n", "want": "(0.0, 135.0)\n"}, {"example_id": "rectangular_to_polar:5", "source": "rectangular_to_polar(9.75,5.93)\n", "want": "(11.41, 31.31)\n"}, {"example_id": "rectangular_to_polar:6", "source": "rectangular_to_polar(10000,99999)\n", "want": "(100497.76, 84.29)\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-97ad0b9175676ab0", "tree_sha256": "97b13fe58dd48f06a9063bf79bd6c23b8387fa3fbf018537cd50587ca7534ec2", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:conversions/rectangular_to_polar.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def counting_sort(collection):\n \"\"\"Pure implementation of counting sort algorithm in Python\n :param collection: some mutable ordered collection with heterogeneous\n comparable items inside\n :return: the same collection ordered by ascending\n Examples:\n >>> counting_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> counting_sort([])\n []\n >>> counting_sort([-2, -5, -45])\n [-45, -5, -2]\n \"\"\"\n # if the collection is empty, returns empty\n if collection == []:\n return []\n\n # get some information about the collection\n coll_len = len(collection)\n coll_max = max(collection)\n coll_min = min(collection)\n\n # create the counting array\n counting_arr_length = coll_max + 1 - coll_min\n counting_arr = [0] * counting_arr_length\n\n # count how much a number appears in the collection\n for number in collection:\n counting_arr[number - coll_min] += 1\n\n # sum each position with it's predecessors. now, counting_arr[i] tells\n # us how many elements <= i has in the collection\n for i in range(1, counting_arr_length):\n counting_arr[i] = counting_arr[i] + counting_arr[i - 1]\n\n # create the output collection\n ordered = [0] * coll_len\n\n # place the elements in the output, respecting the original order (stable\n # sort) from end to begin, updating counting_arr\n for i in reversed(range(coll_len)):\n ordered[counting_arr[collection[i] - coll_min] - 1] = collection[i]\n counting_arr[collection[i] - coll_min] -= 1\n\n return ordered\n"}, "sha256": "561f6a62a69f2317abb99a5c1855bd542ec445eee50237f48b155fc9aa1cc2cf"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "561f6a62a69f2317abb99a5c1855bd542ec445eee50237f48b155fc9aa1cc2cf", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "189565d69666f8ae58d8cf4db5746fb50591ba4c77a6fd730eb33b4434921a03", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00152"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00152", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 12, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def counting_sort(collection):\n \"\"\"Pure implementation of counting sort algorithm in Python\n :param collection: some mutable ordered collection with heterogeneous\n comparable items inside\n :return: the same collection ordered by ascending\n Examples:\n >>> counting_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> counting_sort([])\n []\n >>> counting_sort([-2, -5, -45])\n [-45, -5, -2]\n \"\"\"\n # if the collection is empty, returns empty\n if collection != []:\n return []\n\n # get some information about the collection\n coll_len = len(collection)\n coll_max = max(collection)\n coll_min = min(collection)\n\n # create the counting array\n counting_arr_length = coll_max + 1 - coll_min\n counting_arr = [0] * counting_arr_length\n\n # count how much a number appears in the collection\n for number in collection:\n counting_arr[number - coll_min] += 1\n\n # sum each position with it's predecessors. now, counting_arr[i] tells\n # us how many elements <= i has in the collection\n for i in range(1, counting_arr_length):\n counting_arr[i] = counting_arr[i] + counting_arr[i - 1]\n\n # create the output collection\n ordered = [0] * coll_len\n\n # place the elements in the output, respecting the original order (stable\n # sort) from end to begin, updating counting_arr\n for i in reversed(range(coll_len)):\n ordered[counting_arr[collection[i] - coll_min] - 1] = collection[i]\n counting_arr[collection[i] - coll_min] -= 1\n\n return ordered\n"}, "sha256": "acf423bb33ad3e817fa374fc13b46d5566ce8f519c86a553d25637a0fe32058d"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "counting_sort:0", "got": "[]\n", "source": "counting_sort([0, 5, 3, 2, 2])\n", "truncated": false, "want": "[0, 2, 2, 3, 5]\n"}, {"example_id": "counting_sort:1", "got": "ValueError: max() iterable argument is empty", "source": "counting_sort([])\n", "truncated": false, "want": "[]\n"}, {"example_id": "counting_sort:2", "got": "[]\n", "source": "counting_sort([-2, -5, -45])\n", "truncated": false, "want": "[-45, -5, -2]\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "boolean_condition", "seed": 7, "span": {"col_offset": 18, "end_byte": 488, "lineno": 15, "node": "Compare", "node_col_offset": 7, "node_end_col_offset": 23, "node_end_lineno": 15, "node_lineno": 15, "op_index": 0, "original_text": "==", "replacement_text": "!=", "start_byte": 486}}, "public_tests": {"examples": [{"example_id": "counting_sort:0", "source": "counting_sort([0, 5, 3, 2, 2])\n", "want": "[0, 2, 2, 3, 5]\n"}, {"example_id": "counting_sort:1", "source": "counting_sort([])\n", "want": "[]\n"}, {"example_id": "counting_sort:2", "source": "counting_sort([-2, -5, -45])\n", "want": "[-45, -5, -2]\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-d14bea5b881289e3", "tree_sha256": "561f6a62a69f2317abb99a5c1855bd542ec445eee50237f48b155fc9aa1cc2cf", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:sorts/counting_sort.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "from math import pi\n\n\ndef arc_length(angle: int, radius: int) -> float:\n \"\"\"\n >>> arc_length(45, 5)\n 3.9269908169872414\n >>> arc_length(120, 15)\n 31.415926535897928\n >>> arc_length(90, 10)\n 15.707963267948966\n \"\"\"\n return 2 * pi * radius * (angle / 360)\n"}, "sha256": "ac866cb24c86c47f1ea0f85047e7ee4bb7563a70e98443f8b3590359528ad888"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "ac866cb24c86c47f1ea0f85047e7ee4bb7563a70e98443f8b3590359528ad888", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "41c368c48cd6cecd9f25830ca5fd4b0fc670bf8f9665641c5853cd38cd7c1e5d", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00195"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00195", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 24, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "from math import pi\n\n\ndef arc_length(angle: int, radius: int) -> float:\n \"\"\"\n >>> arc_length(45, 5)\n 3.9269908169872414\n >>> arc_length(120, 15)\n 31.415926535897928\n >>> arc_length(90, 10)\n 15.707963267948966\n \"\"\"\n return 2 * pi * radius * (angle / 360) - 1\n"}, "sha256": "c2ee62b8b7184406fcc2df89a9f2439df0662a4fd0a2a661dbb7cbb7b61b3d08"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "arc_length:0", "got": "2.9269908169872414\n", "source": "arc_length(45, 5)\n", "truncated": false, "want": "3.9269908169872414\n"}, {"example_id": "arc_length:1", "got": "30.415926535897928\n", "source": "arc_length(120, 15)\n", "truncated": false, "want": "31.415926535897928\n"}, {"example_id": "arc_length:2", "got": "14.707963267948966\n", "source": "arc_length(90, 10)\n", "truncated": false, "want": "15.707963267948966\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "return_value", "seed": 7, "span": {"col_offset": 11, "end_byte": 280, "lineno": 13, "node": "Return", "node_col_offset": 4, "node_end_col_offset": 42, "node_end_lineno": 13, "node_lineno": 13, "op_index": 0, "original_text": "2 * pi * radius * (angle / 360)", "replacement_text": "2 * pi * radius * (angle / 360) - 1", "start_byte": 249}}, "public_tests": {"examples": [{"example_id": "arc_length:0", "source": "arc_length(45, 5)\n", "want": "3.9269908169872414\n"}, {"example_id": "arc_length:1", "source": "arc_length(120, 15)\n", "want": "31.415926535897928\n"}, {"example_id": "arc_length:2", "source": "arc_length(90, 10)\n", "want": "15.707963267948966\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-b290a4519e24f363", "tree_sha256": "ac866cb24c86c47f1ea0f85047e7ee4bb7563a70e98443f8b3590359528ad888", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:maths/arc_length.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def cycle_sort(array: list) -> list:\n \"\"\"\n >>> cycle_sort([4, 3, 2, 1])\n [1, 2, 3, 4]\n\n >>> cycle_sort([-4, 20, 0, -50, 100, -1])\n [-50, -4, -1, 0, 20, 100]\n\n >>> cycle_sort([-.1, -.2, 1.3, -.8])\n [-0.8, -0.2, -0.1, 1.3]\n\n >>> cycle_sort([])\n []\n \"\"\"\n array_len = len(array)\n for cycle_start in range(array_len - 1):\n item = array[cycle_start]\n\n pos = cycle_start\n for i in range(cycle_start + 1, array_len):\n if array[i] < item:\n pos += 1\n\n if pos == cycle_start:\n continue\n\n while item == array[pos]:\n pos += 1\n\n array[pos], item = item, array[pos]\n while pos != cycle_start:\n pos = cycle_start\n for i in range(cycle_start + 1, array_len):\n if array[i] < item:\n pos += 1\n\n while item == array[pos]:\n pos += 1\n\n array[pos], item = item, array[pos]\n\n return array\n"}, "sha256": "702c9e79056c6cf58d176b5716c4af8d1339b98212abcc6322edb4523d7e54ac"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "702c9e79056c6cf58d176b5716c4af8d1339b98212abcc6322edb4523d7e54ac", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "0b7c3bd3b64b393d1a346343dd0835d37a05905372af7241960c91b82edde946", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00221"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00221", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 18, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def cycle_sort(array: list) -> list:\n \"\"\"\n >>> cycle_sort([4, 3, 2, 1])\n [1, 2, 3, 4]\n\n >>> cycle_sort([-4, 20, 0, -50, 100, -1])\n [-50, -4, -1, 0, 20, 100]\n\n >>> cycle_sort([-.1, -.2, 1.3, -.8])\n [-0.8, -0.2, -0.1, 1.3]\n\n >>> cycle_sort([])\n []\n \"\"\"\n array_len = len(array)\n for cycle_start in range(array_len - 1):\n item = array[cycle_start]\n\n pos = cycle_start\n for i in range(cycle_start + 1, array_len):\n if array[i] < item:\n pos += 1\n\n if pos == cycle_start:\n continue\n\n while item == array[pos]:\n pos += 1\n\n array[pos], item = item, array[pos]\n while pos == cycle_start:\n pos = cycle_start\n for i in range(cycle_start + 1, array_len):\n if array[i] < item:\n pos += 1\n\n while item == array[pos]:\n pos += 1\n\n array[pos], item = item, array[pos]\n\n return array\n"}, "sha256": "b6a5d0a8d193df4026d2e58eff3b67d1e55716dc168bf59f413011be30fb58ca"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "cycle_sort:0", "got": "[4, 3, 3, 4]\n", "source": "cycle_sort([4, 3, 2, 1])\n", "truncated": false, "want": "[1, 2, 3, 4]\n"}, {"example_id": "cycle_sort:1", "got": "[-4, -4, -4, -4, 100, 100]\n", "source": "cycle_sort([-4, 20, 0, -50, 100, -1])\n", "truncated": false, "want": "[-50, -4, -1, 0, 20, 100]\n"}, {"example_id": "cycle_sort:2", "got": "[-0.1, -0.2, -0.2, -0.2]\n", "source": "cycle_sort([-.1, -.2, 1.3, -.8])\n", "truncated": false, "want": "[-0.8, -0.2, -0.1, 1.3]\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "boolean_condition", "seed": 7, "span": {"col_offset": 18, "end_byte": 697, "lineno": 31, "node": "Compare", "node_col_offset": 14, "node_end_col_offset": 32, "node_end_lineno": 31, "node_lineno": 31, "op_index": 0, "original_text": "!=", "replacement_text": "==", "start_byte": 695}}, "public_tests": {"examples": [{"example_id": "cycle_sort:0", "source": "cycle_sort([4, 3, 2, 1])\n", "want": "[1, 2, 3, 4]\n"}, {"example_id": "cycle_sort:1", "source": "cycle_sort([-4, 20, 0, -50, 100, -1])\n", "want": "[-50, -4, -1, 0, 20, 100]\n"}, {"example_id": "cycle_sort:2", "source": "cycle_sort([-.1, -.2, 1.3, -.8])\n", "want": "[-0.8, -0.2, -0.1, 1.3]\n"}, {"example_id": "cycle_sort:3", "source": "cycle_sort([])\n", "want": "[]\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-fea63ea2f45a978c", "tree_sha256": "702c9e79056c6cf58d176b5716c4af8d1339b98212abcc6322edb4523d7e54ac", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:sorts/cycle_sort.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def wave(txt: str) -> list:\n \"\"\"\n Returns a so called 'wave' of a given string\n >>> wave('cat')\n ['Cat', 'cAt', 'caT']\n >>> wave('one')\n ['One', 'oNe', 'onE']\n >>> wave('book')\n ['Book', 'bOok', 'boOk', 'booK']\n \"\"\"\n\n return [\n txt[:a] + txt[a].upper() + txt[a + 1 :]\n for a in range(len(txt))\n if txt[a].isalpha()\n ]\n"}, "sha256": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "90fe7f225ada8aaa1e45fba4248de9f8fede18f482e2ce56b205a13be5733e77", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00236"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00236", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 16, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def wave(txt: str) -> list:\n \"\"\"\n Returns a so called 'wave' of a given string\n >>> wave('cat')\n ['Cat', 'cAt', 'caT']\n >>> wave('one')\n ['One', 'oNe', 'onE']\n >>> wave('book')\n ['Book', 'bOok', 'boOk', 'booK']\n \"\"\"\n\n return [\n txt[:a] + txt[a].upper() - txt[a + 1 :]\n for a in range(len(txt))\n if txt[a].isalpha()\n ]\n"}, "sha256": "242ac1e071e75446a88f1f0eeb3a983228716ebed7eb85bbf93d91329b61d58b"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "wave:0", "got": "TypeError: unsupported operand type(s) for -: 'str' and 'str'", "source": "wave('cat')\n", "truncated": false, "want": "['Cat', 'cAt', 'caT']\n"}, {"example_id": "wave:1", "got": "TypeError: unsupported operand type(s) for -: 'str' and 'str'", "source": "wave('one')\n", "truncated": false, "want": "['One', 'oNe', 'onE']\n"}, {"example_id": "wave:2", "got": "TypeError: unsupported operand type(s) for -: 'str' and 'str'", "source": "wave('book')\n", "truncated": false, "want": "['Book', 'bOok', 'boOk', 'booK']\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "arithmetic_operator", "seed": 7, "span": {"col_offset": 33, "end_byte": 291, "lineno": 13, "node": "BinOp", "node_col_offset": 8, "node_end_col_offset": 47, "node_end_lineno": 13, "node_lineno": 13, "op_index": 0, "original_text": "+", "replacement_text": "-", "start_byte": 290}}, "public_tests": {"examples": [{"example_id": "wave:0", "source": "wave('cat')\n", "want": "['Cat', 'cAt', 'caT']\n"}, {"example_id": "wave:1", "source": "wave('one')\n", "want": "['One', 'oNe', 'onE']\n"}, {"example_id": "wave:2", "source": "wave('book')\n", "want": "['Book', 'bOok', 'boOk', 'booK']\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-507883496a560632", "tree_sha256": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:strings/wave_string.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "import functools\n\n\ndef min_distance_up_bottom(word1: str, word2: str) -> int:\n \"\"\"\n >>> min_distance_up_bottom(\"intention\", \"execution\")\n 5\n >>> min_distance_up_bottom(\"intention\", \"\")\n 9\n >>> min_distance_up_bottom(\"\", \"\")\n 0\n >>> min_distance_up_bottom(\"zooicoarchaeologist\", \"zoologist\")\n 10\n \"\"\"\n len_word1 = len(word1)\n len_word2 = len(word2)\n\n @functools.cache\n def min_distance(index1: int, index2: int) -> int:\n # if first word index overflows - delete all from the second word\n if index1 >= len_word1:\n return len_word2 - index2\n # if second word index overflows - delete all from the first word\n if index2 >= len_word2:\n return len_word1 - index1\n diff = int(word1[index1] != word2[index2]) # current letters not identical\n return min(\n 1 + min_distance(index1 + 1, index2),\n 1 + min_distance(index1, index2 + 1),\n diff + min_distance(index1 + 1, index2 + 1),\n )\n\n return min_distance(0, 0)\n"}, "sha256": "72cf12f876db434e9229de994d20896411904062b28ee2b4c1eb8da7f261d67f"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "72cf12f876db434e9229de994d20896411904062b28ee2b4c1eb8da7f261d67f", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "7ad29a6b9f8f147704792d2f83149dbe7991a3e549d59f5dd91fae1fece93531", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00238"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00238", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 24, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "import functools\n\n\ndef min_distance_up_bottom(word1: str, word2: str) -> int:\n \"\"\"\n >>> min_distance_up_bottom(\"intention\", \"execution\")\n 5\n >>> min_distance_up_bottom(\"intention\", \"\")\n 9\n >>> min_distance_up_bottom(\"\", \"\")\n 0\n >>> min_distance_up_bottom(\"zooicoarchaeologist\", \"zoologist\")\n 10\n \"\"\"\n len_word1 = len(word1)\n len_word2 = len(word2)\n\n @functools.cache\n def min_distance(index1: int, index2: int) -> int:\n # if first word index overflows - delete all from the second word\n if index1 >= len_word1:\n return len_word2 - index2\n # if second word index overflows - delete all from the first word\n if index2 >= len_word2:\n return len_word1 - index1\n diff = int(word1[index1] == word2[index2]) # current letters not identical\n return min(\n 1 + min_distance(index1 + 1, index2),\n 1 + min_distance(index1, index2 + 1),\n diff + min_distance(index1 + 1, index2 + 1),\n )\n\n return min_distance(0, 0)\n"}, "sha256": "9832c7f5842d358f2a8d01503450cab1663af6e35e6da21d9c7767946408544f"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "min_distance_up_bottom:0", "got": "2\n", "source": "min_distance_up_bottom(\"intention\", \"execution\")\n", "truncated": false, "want": "5\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "boolean_condition", "seed": 7, "span": {"col_offset": 33, "end_byte": 784, "lineno": 26, "node": "Compare", "node_col_offset": 19, "node_end_col_offset": 49, "node_end_lineno": 26, "node_lineno": 26, "op_index": 0, "original_text": "!=", "replacement_text": "==", "start_byte": 782}}, "public_tests": {"examples": [{"example_id": "min_distance_up_bottom:0", "source": "min_distance_up_bottom(\"intention\", \"execution\")\n", "want": "5\n"}, {"example_id": "min_distance_up_bottom:1", "source": "min_distance_up_bottom(\"intention\", \"\")\n", "want": "9\n"}, {"example_id": "min_distance_up_bottom:2", "source": "min_distance_up_bottom(\"\", \"\")\n", "want": "0\n"}, {"example_id": "min_distance_up_bottom:3", "source": "min_distance_up_bottom(\"zooicoarchaeologist\", \"zoologist\")\n", "want": "10\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-47ce09c891cc9d4b", "tree_sha256": "72cf12f876db434e9229de994d20896411904062b28ee2b4c1eb8da7f261d67f", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:dynamic_programming/min_distance_up_bottom.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def cocktail_shaker_sort(arr: list[int]) -> list[int]:\n \"\"\"\n Sorts a list using the Cocktail Shaker Sort algorithm.\n\n :param arr: List of elements to be sorted.\n :return: Sorted list.\n\n >>> cocktail_shaker_sort([4, 5, 2, 1, 2])\n [1, 2, 2, 4, 5]\n >>> cocktail_shaker_sort([-4, 5, 0, 1, 2, 11])\n [-4, 0, 1, 2, 5, 11]\n >>> cocktail_shaker_sort([0.1, -2.4, 4.4, 2.2])\n [-2.4, 0.1, 2.2, 4.4]\n >>> cocktail_shaker_sort([1, 2, 3, 4, 5])\n [1, 2, 3, 4, 5]\n >>> cocktail_shaker_sort([-4, -5, -24, -7, -11])\n [-24, -11, -7, -5, -4]\n >>> cocktail_shaker_sort([\"elderberry\", \"banana\", \"date\", \"apple\", \"cherry\"])\n ['apple', 'banana', 'cherry', 'date', 'elderberry']\n >>> cocktail_shaker_sort((-4, -5, -24, -7, -11))\n Traceback (most recent call last):\n ...\n TypeError: 'tuple' object does not support item assignment\n \"\"\"\n start, end = 0, len(arr) - 1\n\n while start < end:\n swapped = False\n\n # Pass from left to right\n for i in range(start, end):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n swapped = True\n\n if not swapped:\n break\n\n end -= 1 # Decrease the end pointer after each pass\n\n # Pass from right to left\n for i in range(end, start, -1):\n if arr[i] < arr[i - 1]:\n arr[i], arr[i - 1] = arr[i - 1], arr[i]\n swapped = True\n\n if not swapped:\n break\n\n start += 1 # Increase the start pointer after each pass\n\n return arr\n"}, "sha256": "4ded14ae00274c7522859760a01694810f132519d0d698d097581614c6bf8da3"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "4ded14ae00274c7522859760a01694810f132519d0d698d097581614c6bf8da3", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "4e96a535aab5bc7cd77dc9c7e9c67c63e3faaa5ccecad1f80885512d4ba6009f", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00259"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00259", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 24, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def cocktail_shaker_sort(arr: list[int]) -> list[int]:\n \"\"\"\n Sorts a list using the Cocktail Shaker Sort algorithm.\n\n :param arr: List of elements to be sorted.\n :return: Sorted list.\n\n >>> cocktail_shaker_sort([4, 5, 2, 1, 2])\n [1, 2, 2, 4, 5]\n >>> cocktail_shaker_sort([-4, 5, 0, 1, 2, 11])\n [-4, 0, 1, 2, 5, 11]\n >>> cocktail_shaker_sort([0.1, -2.4, 4.4, 2.2])\n [-2.4, 0.1, 2.2, 4.4]\n >>> cocktail_shaker_sort([1, 2, 3, 4, 5])\n [1, 2, 3, 4, 5]\n >>> cocktail_shaker_sort([-4, -5, -24, -7, -11])\n [-24, -11, -7, -5, -4]\n >>> cocktail_shaker_sort([\"elderberry\", \"banana\", \"date\", \"apple\", \"cherry\"])\n ['apple', 'banana', 'cherry', 'date', 'elderberry']\n >>> cocktail_shaker_sort((-4, -5, -24, -7, -11))\n Traceback (most recent call last):\n ...\n TypeError: 'tuple' object does not support item assignment\n \"\"\"\n start, end = 0, len(arr) - 1\n\n while start < end:\n swapped = False\n\n # Pass from left to right\n for i in range(start, end):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n swapped = True\n\n if not swapped:\n break\n\n end -= 1 # Decrease the end pointer after each pass\n\n # Pass from right to left\n for i in range(end, start, -1):\n if arr[i] < arr[i - 1]:\n arr[i], arr[i - 1] = arr[i - 1], arr[i]\n swapped = True\n\n if swapped:\n break\n\n start += 1 # Increase the start pointer after each pass\n\n return arr\n"}, "sha256": "fb45ada6a938fb0e22615f4432d12972174dac207b204a2c47cfba41f1001514"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "cocktail_shaker_sort:0", "got": "[1, 4, 2, 2, 5]\n", "source": "cocktail_shaker_sort([4, 5, 2, 1, 2])\n", "truncated": false, "want": "[1, 2, 2, 4, 5]\n"}, {"example_id": "cocktail_shaker_sort:4", "got": "[-24, -5, -11, -7, -4]\n", "source": "cocktail_shaker_sort([-4, -5, -24, -7, -11])\n", "truncated": false, "want": "[-24, -11, -7, -5, -4]\n"}, {"example_id": "cocktail_shaker_sort:5", "got": "['apple', 'banana', 'date', 'cherry', 'elderberry']\n", "source": "cocktail_shaker_sort([\"elderberry\", \"banana\", \"date\", \"apple\", \"cherry\"])\n", "truncated": false, "want": "['apple', 'banana', 'cherry', 'date', 'elderberry']\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "boolean_condition", "seed": 7, "span": {"col_offset": 11, "end_byte": 1470, "lineno": 47, "node": "UnaryOp", "node_col_offset": 11, "node_end_col_offset": 22, "node_end_lineno": 47, "node_lineno": 47, "op_index": 0, "original_text": "not ", "replacement_text": "", "start_byte": 1466}}, "public_tests": {"examples": [{"example_id": "cocktail_shaker_sort:0", "source": "cocktail_shaker_sort([4, 5, 2, 1, 2])\n", "want": "[1, 2, 2, 4, 5]\n"}, {"example_id": "cocktail_shaker_sort:1", "source": "cocktail_shaker_sort([-4, 5, 0, 1, 2, 11])\n", "want": "[-4, 0, 1, 2, 5, 11]\n"}, {"example_id": "cocktail_shaker_sort:2", "source": "cocktail_shaker_sort([0.1, -2.4, 4.4, 2.2])\n", "want": "[-2.4, 0.1, 2.2, 4.4]\n"}, {"example_id": "cocktail_shaker_sort:3", "source": "cocktail_shaker_sort([1, 2, 3, 4, 5])\n", "want": "[1, 2, 3, 4, 5]\n"}, {"example_id": "cocktail_shaker_sort:4", "source": "cocktail_shaker_sort([-4, -5, -24, -7, -11])\n", "want": "[-24, -11, -7, -5, -4]\n"}, {"example_id": "cocktail_shaker_sort:5", "source": "cocktail_shaker_sort([\"elderberry\", \"banana\", \"date\", \"apple\", \"cherry\"])\n", "want": "['apple', 'banana', 'cherry', 'date', 'elderberry']\n"}, {"example_id": "cocktail_shaker_sort:6", "source": "cocktail_shaker_sort((-4, -5, -24, -7, -11))\n", "want": "Traceback (most recent call last):\n ...\nTypeError: 'tuple' object does not support item assignment\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-4c754d90905b8371", "tree_sha256": "4ded14ae00274c7522859760a01694810f132519d0d698d097581614c6bf8da3", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:sorts/cocktail_shaker_sort.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def comb_sort(data: list) -> list:\n \"\"\"Pure implementation of comb sort algorithm in Python\n :param data: mutable collection with comparable items\n :return: the same collection in ascending order\n Examples:\n >>> comb_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> comb_sort([])\n []\n >>> comb_sort([99, 45, -7, 8, 2, 0, -15, 3])\n [-15, -7, 0, 2, 3, 8, 45, 99]\n \"\"\"\n shrink_factor = 1.3\n gap = len(data)\n completed = False\n\n while not completed:\n # Update the gap value for a next comb\n gap = int(gap / shrink_factor)\n if gap <= 1:\n completed = True\n\n index = 0\n while index + gap < len(data):\n if data[index] > data[index + gap]:\n # Swap values\n data[index], data[index + gap] = data[index + gap], data[index]\n completed = False\n index += 1\n\n return data\n"}, "sha256": "761308c9dc580fddd805671e443531d0c76d0ec6f2f8bb62e5030dc2a5af6b41"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "761308c9dc580fddd805671e443531d0c76d0ec6f2f8bb62e5030dc2a5af6b41", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "bb25f6d5fe01dcada71629af336244eb87f4814747bb4ab04a077815e9105591", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00304"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00304", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 12, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def comb_sort(data: list) -> list:\n \"\"\"Pure implementation of comb sort algorithm in Python\n :param data: mutable collection with comparable items\n :return: the same collection in ascending order\n Examples:\n >>> comb_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> comb_sort([])\n []\n >>> comb_sort([99, 45, -7, 8, 2, 0, -15, 3])\n [-15, -7, 0, 2, 3, 8, 45, 99]\n \"\"\"\n shrink_factor = 1.3\n gap = len(data)\n completed = False\n\n while not completed:\n # Update the gap value for a next comb\n gap = int(gap / shrink_factor)\n if gap <= 2:\n completed = True\n\n index = 0\n while index + gap < len(data):\n if data[index] > data[index + gap]:\n # Swap values\n data[index], data[index + gap] = data[index + gap], data[index]\n completed = False\n index += 1\n\n return data\n"}, "sha256": "2594da8e85edd1fc187e6a4a31d90e46e669c5c52192641a0d0ace54af1af45b"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "comb_sort:0", "got": "[0, 2, 3, 2, 5]\n", "source": "comb_sort([0, 5, 3, 2, 2])\n", "truncated": false, "want": "[0, 2, 2, 3, 5]\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "off_by_one", "seed": 7, "span": {"col_offset": 18, "end_byte": 591, "lineno": 20, "node": "Constant", "node_col_offset": 18, "node_end_col_offset": 19, "node_end_lineno": 20, "node_lineno": 20, "op_index": 0, "original_text": "1", "replacement_text": "2", "start_byte": 590}}, "public_tests": {"examples": [{"example_id": "comb_sort:0", "source": "comb_sort([0, 5, 3, 2, 2])\n", "want": "[0, 2, 2, 3, 5]\n"}, {"example_id": "comb_sort:1", "source": "comb_sort([])\n", "want": "[]\n"}, {"example_id": "comb_sort:2", "source": "comb_sort([99, 45, -7, 8, 2, 0, -15, 3])\n", "want": "[-15, -7, 0, 2, 3, 8, 45, 99]\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-090bfdaf9dbf3831", "tree_sha256": "761308c9dc580fddd805671e443531d0c76d0ec6f2f8bb62e5030dc2a5af6b41", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:sorts/comb_sort.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def wave(txt: str) -> list:\n \"\"\"\n Returns a so called 'wave' of a given string\n >>> wave('cat')\n ['Cat', 'cAt', 'caT']\n >>> wave('one')\n ['One', 'oNe', 'onE']\n >>> wave('book')\n ['Book', 'bOok', 'boOk', 'booK']\n \"\"\"\n\n return [\n txt[:a] + txt[a].upper() + txt[a + 1 :]\n for a in range(len(txt))\n if txt[a].isalpha()\n ]\n"}, "sha256": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "6c15dee2c16e02998ab4da17f46c3c95b2eb08066fda348b459a3f2466bec1d4", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00312"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00312", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 16, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def wave(txt: str) -> list:\n \"\"\"\n Returns a so called 'wave' of a given string\n >>> wave('cat')\n ['Cat', 'cAt', 'caT']\n >>> wave('one')\n ['One', 'oNe', 'onE']\n >>> wave('book')\n ['Book', 'bOok', 'boOk', 'booK']\n \"\"\"\n\n return [\n txt[:a] + txt[a].upper() + txt[a - 1 :]\n for a in range(len(txt))\n if txt[a].isalpha()\n ]\n"}, "sha256": "de62fb19bb89a02f25853049c3c8c2e618feaabdb87186cefaa67963487bbe6a"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "wave:0", "got": "['Ct', 'cAcat', 'caTat']\n", "source": "wave('cat')\n", "truncated": false, "want": "['Cat', 'cAt', 'caT']\n"}, {"example_id": "wave:1", "got": "['Oe', 'oNone', 'onEne']\n", "source": "wave('one')\n", "truncated": false, "want": "['One', 'oNe', 'onE']\n"}, {"example_id": "wave:2", "got": "['Bk', 'bObook', 'boOook', 'booKok']\n", "source": "wave('book')\n", "truncated": false, "want": "['Book', 'bOok', 'boOk', 'booK']\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "arithmetic_operator", "seed": 7, "span": {"col_offset": 41, "end_byte": 299, "lineno": 13, "node": "BinOp", "node_col_offset": 39, "node_end_col_offset": 44, "node_end_lineno": 13, "node_lineno": 13, "op_index": 0, "original_text": "+", "replacement_text": "-", "start_byte": 298}}, "public_tests": {"examples": [{"example_id": "wave:0", "source": "wave('cat')\n", "want": "['Cat', 'cAt', 'caT']\n"}, {"example_id": "wave:1", "source": "wave('one')\n", "want": "['One', 'oNe', 'onE']\n"}, {"example_id": "wave:2", "source": "wave('book')\n", "want": "['Book', 'bOok', 'boOk', 'booK']\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-507883496a560632", "tree_sha256": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:strings/wave_string.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def comb_sort(data: list) -> list:\n \"\"\"Pure implementation of comb sort algorithm in Python\n :param data: mutable collection with comparable items\n :return: the same collection in ascending order\n Examples:\n >>> comb_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> comb_sort([])\n []\n >>> comb_sort([99, 45, -7, 8, 2, 0, -15, 3])\n [-15, -7, 0, 2, 3, 8, 45, 99]\n \"\"\"\n shrink_factor = 1.3\n gap = len(data)\n completed = False\n\n while not completed:\n # Update the gap value for a next comb\n gap = int(gap / shrink_factor)\n if gap <= 1:\n completed = True\n\n index = 0\n while index + gap < len(data):\n if data[index] > data[index + gap]:\n # Swap values\n data[index], data[index + gap] = data[index + gap], data[index]\n completed = False\n index += 1\n\n return data\n"}, "sha256": "761308c9dc580fddd805671e443531d0c76d0ec6f2f8bb62e5030dc2a5af6b41"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "761308c9dc580fddd805671e443531d0c76d0ec6f2f8bb62e5030dc2a5af6b41", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "6fc35ea5feb8408030613d25b289e586c050463b35823708d8f0b5ceb6585c4e", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00386"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00386", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 12, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def comb_sort(data: list) -> list:\n \"\"\"Pure implementation of comb sort algorithm in Python\n :param data: mutable collection with comparable items\n :return: the same collection in ascending order\n Examples:\n >>> comb_sort([0, 5, 3, 2, 2])\n [0, 2, 2, 3, 5]\n >>> comb_sort([])\n []\n >>> comb_sort([99, 45, -7, 8, 2, 0, -15, 3])\n [-15, -7, 0, 2, 3, 8, 45, 99]\n \"\"\"\n shrink_factor = 1.3\n gap = len(data)\n completed = False\n\n while not completed:\n # Update the gap value for a next comb\n gap = int(gap / shrink_factor)\n if gap <= 1:\n completed = True\n\n index = 0\n while index + gap < len(data):\n if data[index] > data[index + gap]:\n # Swap values\n data[index], data[index + gap] = data[index + gap], data[index]\n completed = False\n index -= 1\n\n return data\n"}, "sha256": "3763494f31637f03f3482be9b5bbb291d1ea81fdc63cbd4976e3a8ddb38df5a6"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "comb_sort:0", "got": "IndexError: list index out of range", "source": "comb_sort([0, 5, 3, 2, 2])\n", "truncated": false, "want": "[0, 2, 2, 3, 5]\n"}, {"example_id": "comb_sort:2", "got": "IndexError: list index out of range", "source": "comb_sort([99, 45, -7, 8, 2, 0, -15, 3])\n", "truncated": false, "want": "[-15, -7, 0, 2, 3, 8, 45, 99]\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "arithmetic_operator", "seed": 7, "span": {"col_offset": 18, "end_byte": 892, "lineno": 29, "node": "AugAssign", "node_col_offset": 12, "node_end_col_offset": 22, "node_end_lineno": 29, "node_lineno": 29, "op_index": 0, "original_text": "+=", "replacement_text": "-=", "start_byte": 890}}, "public_tests": {"examples": [{"example_id": "comb_sort:0", "source": "comb_sort([0, 5, 3, 2, 2])\n", "want": "[0, 2, 2, 3, 5]\n"}, {"example_id": "comb_sort:1", "source": "comb_sort([])\n", "want": "[]\n"}, {"example_id": "comb_sort:2", "source": "comb_sort([99, 45, -7, 8, 2, 0, -15, 3])\n", "want": "[-15, -7, 0, 2, 3, 8, 45, 99]\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-090bfdaf9dbf3831", "tree_sha256": "761308c9dc580fddd805671e443531d0c76d0ec6f2f8bb62e5030dc2a5af6b41", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:sorts/comb_sort.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"} {"candidate_prediction": {"claimed_outcome": "repaired", "final_patch": {"files": {"program.py": "def wave(txt: str) -> list:\n \"\"\"\n Returns a so called 'wave' of a given string\n >>> wave('cat')\n ['Cat', 'cAt', 'caT']\n >>> wave('one')\n ['One', 'oNe', 'onE']\n >>> wave('book')\n ['Book', 'bOok', 'boOk', 'booK']\n \"\"\"\n\n return [\n txt[:a] + txt[a].upper() + txt[a + 1 :]\n for a in range(len(txt))\n if txt[a].isalpha()\n ]\n"}, "sha256": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b"}, "method": "inverse of the generator's own mutation (original span restored)"}, "family": "python-repair-agent-trajectory", "intervention": {"solver": {"digest": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b", "name": "inverse-mutation", "runtime": "programmatic", "temperature": null}, "trajectory": []}, "license": "Apache-2.0", "provenance": {"actors": {"oracle_certifier": {"kind": "programmatic", "name": "python-doctest-reference-harness", "role": "oracle_certifier", "version": "1.0.0"}, "solver": {"kind": "programmatic", "name": "inverse-mutation", "role": "solver", "version": "2.0.0"}, "task_author": {"kind": "programmatic", "name": "python-repair-mutator", "role": "task_author", "version": "2.0.0"}}, "license": "Apache-2.0", "lineage": {"command": "python3 pipelines/code_repair_cli.py generate --catalog catalogs/python-repair-v1 --seed 7 --count 400 --out --produced-at 2026-10-15T00:00:00Z", "commit_sha": "5e3b0488dd5671eceb47e3af9651e61d5a76373d", "gate": "code_repair REPLAY_PASSED", "lane": "code_repair", "project_training_policy": null, "record_sha256": "d386ddcd2dbffeafb186bf3b11569b0b11e22d271dcbb2a6ed38763f6644dcc5", "replay_command": "python3 pipelines/code_repair_cli.py replay --run --catalog catalogs/python-repair-v1 --out ", "repo": "rmems/synthetic-factory", "source_record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00393"}, "produced_at": "2026-10-15T00:00:00Z"}, "record_id": "pfr-890a8af791f8e079cc8bb97e221f32e9afac59da36174d4fa78e7d18d8727e2d-7-00393", "result": {"claims": {"claimed_outcome_matches_rerun": true, "observations_match_replay": true}, "execution_verification": "REPLAY_PASSED", "oracle": {"name": "python-doctest-reference-harness", "type": "measured_execution", "version": "1.0.0"}, "rerun": {"harness_sha256": "ea8da47dd3defc85bca778c3839eb1689fe114986c527d5be96def45ed81a743", "hidden_cases": 16, "mutant": false, "original": true, "patched": true, "tests_untouched": true, "timeout_s": 2.0}, "verdict": "REPAIRED_VERIFIED"}, "scenario": {"broken_program": {"files": {"program.py": "def wave(txt: str) -> list:\n \"\"\"\n Returns a so called 'wave' of a given string\n >>> wave('cat')\n ['Cat', 'cAt', 'caT']\n >>> wave('one')\n ['One', 'oNe', 'onE']\n >>> wave('book')\n ['Book', 'bOok', 'boOk', 'booK']\n \"\"\"\n\n return [\n txt[:a] - txt[a].upper() + txt[a + 1 :]\n for a in range(len(txt))\n if txt[a].isalpha()\n ]\n"}, "sha256": "ee9793ecb101e163e1c7823ea27518a48ec089f06ab09f79d500679a25a75192"}, "failing_test": {"cmd": "pipelines/code_repair/_harness.py:main", "excerpt": [{"example_id": "wave:0", "got": "TypeError: unsupported operand type(s) for -: 'str' and 'str'", "source": "wave('cat')\n", "truncated": false, "want": "['Cat', 'cAt', 'caT']\n"}, {"example_id": "wave:1", "got": "TypeError: unsupported operand type(s) for -: 'str' and 'str'", "source": "wave('one')\n", "truncated": false, "want": "['One', 'oNe', 'onE']\n"}, {"example_id": "wave:2", "got": "TypeError: unsupported operand type(s) for -: 'str' and 'str'", "source": "wave('book')\n", "truncated": false, "want": "['Book', 'bOok', 'boOk', 'booK']\n"}], "exit_code": null, "stdout_sha256": null}, "injection": {"kind": "ast_mutation", "operator": "arithmetic_operator", "seed": 7, "span": {"col_offset": 16, "end_byte": 274, "lineno": 13, "node": "BinOp", "node_col_offset": 8, "node_end_col_offset": 32, "node_end_lineno": 13, "node_lineno": 13, "op_index": 0, "original_text": "+", "replacement_text": "-", "start_byte": 273}}, "public_tests": {"examples": [{"example_id": "wave:0", "source": "wave('cat')\n", "want": "['Cat', 'cAt', 'caT']\n"}, {"example_id": "wave:1", "source": "wave('one')\n", "want": "['One', 'oNe', 'onE']\n"}, {"example_id": "wave:2", "source": "wave('book')\n", "want": "['Book', 'bOok', 'boOk', 'booK']\n"}], "kind": "doctest"}, "repo_snapshot": {"catalog": "python-repair-v1", "license": "MIT", "license_sha256": null, "program_id": "tap-507883496a560632", "tree_sha256": "9f9b86262bcea23b2ec01c4d462b8584ac8dbb63e21120c06111b03035a6415b", "upstream": "TheAlgorithms/Python@2067ce6dfb3b0426a88c7a40531e355a5c703cff:strings/wave_string.py"}, "task": "You are given a Python module containing one function whose docstring examples are its specification. The function has a bug: at least one docstring example fails under doctest. Return the corrected module."}, "split": "held_out"}