Dataset Viewer
Auto-converted to Parquet Duplicate
difficulty
int64
1
4
domain
stringclasses
1 value
family
stringclasses
3 values
files
stringlengths
648
4.91k
prompt
stringlengths
897
2.48k
seed
int64
1M
1M
split
stringclasses
1 value
task_id
stringclasses
10 values
edit_budget
int64
175
400
⌀
1
software engineering
qe_bugfix
{"module.py": "def login_rate_limit(request_times, lockout_until, now, limit, lockout_seconds):\n \"\"\"Decide whether a login attempt at time `now` is rate limited.\n\n All times are integer seconds. Returns [limited, retry_after]:\n - If lockout_until is not None and now < lockout_until: [True, lockout_until...
Faults were introduced into `login_rate_limit` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for login_rate_limit([91], 81, 98, 3, 30) (the correct value is not given; derive it from the docs...
1,000,000
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def boundary_violations(properties):\n \"\"\"Return up to three property values that each break one JSON-schema boundary.\n\n properties maps a name to a schema dict and is visited in insertion order.\n - \"integer\" or \"number\": maximum + 1 if \"maximum\" is set, else minimum - 1 if\n \"...
Faults were introduced into `boundary_violations` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for boundary_violations({"p0": {"type": "integer", "minimum": 1}}) (the correct value is not gi...
1,000,001
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def threshold_compliance(metrics, thresholds):\n \"\"\"Check performance metrics against whichever thresholds are configured.\n\n metrics has integer keys: avg_ms, p95_ms, throughput_rps, success_pct,\n failed_requests, total_requests. thresholds may contain any of\n \"avg_response_time_ms\",...
Faults were introduced into `threshold_compliance` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for threshold_compliance({"avg_ms": 205, "p95_ms": 389, "throughput_rps": 68, "success_pct": 9...
1,000,002
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def api_complexity_level(total_endpoints, critical_paths, data_intensive_ops):\n \"\"\"Return \"low\", \"medium\" or \"high\" for the planning complexity of an API.\n\n score = total_endpoints + 2 * critical_paths + 3 * data_intensive_ops.\n score < 10 is \"low\", 10 <= score < 25 is \"medium\",...
Faults were introduced into `api_complexity_level` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for api_complexity_level(12, 5, 3) (the correct value is not given; derive it from the docstri...
1,000,003
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def parse_version(text):\n \"\"\"Return the first three numeric components of a version string, padded with 0.\"\"\"\n if text.startswith(\"v\"):\n text = text[1:]\n buf = text.split(\".\")[:3]\n for tail in buf:\n if not tail.isdigit():\n raise ValueError(\"bad versi...
Faults were introduced into `compare_versions` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for compare_versions("v2.11.8", "4") (the correct value is not given; derive it from the docstring...
1,000,004
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def parse_signature_header(header):\n \"\"\"Parse \"t=<timestamp>,v1=<signature>\" into {\"timestamp\": int, \"v1\": str}, or None.\n\n The header is split on \",\"; in each part the key is the text before the first \"=\"\n and the value is everything after it (\"\" when there is no \"=\"). Keys...
Faults were introduced into `parse_signature_header` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for parse_signature_header("t=1393,v1=9z") (the correct value is not given; derive it from t...
1,000,005
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def one_decimal(ms, unit):\n \"\"\"ms / unit rounded half up to one decimal place, as text (exact integer arithmetic).\"\"\"\n group = (ms * 10 + unit // 2) // unit\n return str(group // 10) + \".\" + str(group % 10)\n\n\ndef format_duration(ms):\n \"\"\"Render a non-negative integer millisec...
Faults were introduced into `format_duration` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for format_duration(12541) (the correct value is not given; derive it from the docstring). The visi...
1,000,006
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def quality_gain_reward(quality_before, quality_after, bugs_found, critical_bugs):\n \"\"\"Return the integer quality reward for one QE action, capped at 100.\n\n A missing (None) quality score defaults to 50.\n reward = (quality_after - quality_before) * 2 + bugs_found * 5 + critical_bugs * 20,...
Faults were introduced into `quality_gain_reward` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for quality_gain_reward(85, 27, 2, 1) (the correct value is not given; derive it from the docst...
1,000,007
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def split_generic_params(params):\n \"\"\"Split a function parameter list on commas that are not nested in <> or ().\n\n Depth starts at 0, increases on \"<\" or \"(\" and decreases on \">\" or \")\" with no\n clamping, so an unmatched \">\" (as in \"=>\") or \")\" makes it negative. Only a comm...
Faults were introduced into `split_generic_params` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for split_generic_params(", ,a") (the correct value is not given; derive it from the docstring...
1,000,008
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "import re\n\n\ndef glob_to_regex(pattern):\n \"\"\"Translate a glob into a regular expression body (without anchors).\"\"\"\n score = \"\"\n idx = 0\n while idx < len(pattern):\n stack = pattern[idx]\n if pattern[idx:idx + 2] == \"**\":\n if pattern[idx + 2:idx + 3] =...
Faults were introduced into `glob_match` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for glob_match("**/?/*", "a/tests") (the correct value is not given; derive it from the docstring). The ...
1,000,009
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def efficiency_reward(actual_seconds, expected_seconds, actual_cost, estimated_cost):\n \"\"\"Return [time_reward, cost_reward], each rounded to 2 decimals.\n\n time_reward: 0.0 if actual_seconds <= 0; otherwise\n (expected_seconds / actual_seconds - 1) * 50 clamped to [-50, 50].\n cost_rew...
Faults were introduced into `efficiency_reward` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for efficiency_reward(8, 20, 1, 7) (the correct value is not given; derive it from the docstring)...
1,000,010
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def baseline_verdict(current_success, baseline_success):\n \"\"\"Classify the change of a test success rate (integer percent) versus a baseline.\n\n baseline_success None -> \"no baseline\", without checking current_success at all.\n Otherwise with d = current - baseline:\n d > 10 ->...
Faults were introduced into `baseline_verdict` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for baseline_verdict(47, 43) (the correct value is not given; derive it from the docstring). The v...
1,000,011
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def gguf_special_ids(metadata, vocab):\n \"\"\"Return {\"eos\": id or None, \"stop\": [ids]} for a GGUF model.\n\n vocab maps token text to id. A declared id metadata[\"tokenizer.ggml.<x>_token_id\"]\n (x is eos, eot or eom) counts only if it is an int (not a bool) with 0 <= id < len(vocab).\n ...
Faults were introduced into `gguf_special_ids` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for gguf_special_ids({"tokenizer.ggml.eot_token_id": 4}, {"<begin_of_text>": 0, "<end_of_text>": 1...
1,000,012
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "import re\n\n\ndef glob_to_regex(pattern):\n \"\"\"Translate a glob into a regular expression body (without anchors).\"\"\"\n seen = \"\"\n idx = 0\n while idx < len(pattern):\n acc = pattern[idx]\n if pattern[idx:idx + 2] == \"**\":\n if pattern[idx + 2:idx + 3] == \...
Faults were introduced into `glob_match` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for glob_match("?/a", "c.ts") (the correct value is not given; derive it from the docstring). The visibl...
1,000,013
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def streamable_len(text, holdback):\n \"\"\"Return how many UTF-8 bytes at the start of text can be streamed now.\n\n A run of U+FFFD characters at the end of text is an incomplete UTF-8 sequence that\n the next token may complete, so it is never streamed. Of the bytes before that run,\n the ...
Faults were introduced into `streamable_len` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for streamable_len("\u20ac\ud83d\ude00\ud83d\ude00\u20ac \ud83d\ude00\ufffd\ufffd", 4) (the correct ...
1,000,014
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def flaky_hunter_reward(true_positives, false_positives, false_negatives):\n \"\"\"Reward for a flaky-test detector, rounded to 2 decimals.\n\n precision = tp / (tp + fp), or 0.0 when tp + fp == 0.\n recall = tp / (tp + fn), or 0.0 when tp + fn == 0.\n f1 = 2 * precision * recall / (precis...
Faults were introduced into `flaky_hunter_reward` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for flaky_hunter_reward(3, 1, 4) (the correct value is not given; derive it from the docstring)...
1,000,015
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def one_decimal(ms, unit):\n \"\"\"ms / unit rounded half up to one decimal place, as text (exact integer arithmetic).\"\"\"\n node = (ms * 10 + unit // 2) // unit\n return str(node // 10) + \".\" + str(node % 10)\n\n\ndef format_duration(ms):\n \"\"\"Render a non-negative integer millisecond...
Faults were introduced into `format_duration` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for format_duration(2161330) (the correct value is not given; derive it from the docstring). The vi...
1,000,016
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def complexity_bucket(lines_of_code, cyclomatic, num_dependencies, num_tests):\n \"\"\"Return \"simple\", \"moderate\" or \"complex\" for a task context.\n\n Points: lines_of_code > 500 adds 2, else > 100 adds 1; cyclomatic > 20 adds 2,\n else > 10 adds 1; num_dependencies > 10 adds 1; num_tests...
Faults were introduced into `complexity_bucket` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for complexity_bucket(622, 5, 15, 106) (the correct value is not given; derive it from the docstr...
1,000,017
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def spec_readiness_score(spec):\n \"\"\"Return an integer readiness score from 0 to 100 for an OpenAPI-like dict.\n\n Points: \"info\" present +10, and +5 more if spec[\"info\"] has \"description\".\n \"paths\" present +20. For each operation under spec[\"paths\"][path][method] whose\n method...
Faults were introduced into `spec_readiness_score` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for spec_readiness_score({"info": {"description": "d"}, "paths": {"/r0": {"get": {"responses":...
1,000,018
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def threshold_compliance(metrics, thresholds):\n \"\"\"Check performance metrics against whichever thresholds are configured.\n\n metrics has integer keys: avg_ms, p95_ms, throughput_rps, success_pct,\n failed_requests, total_requests. thresholds may contain any of\n \"avg_response_time_ms\",...
Faults were introduced into `threshold_compliance` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for threshold_compliance({"avg_ms": 120, "p95_ms": 445, "throughput_rps": 27, "success_pct": 8...
1,000,019
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def artifact_retention_keep(rank, keep_latest_n, created_day, retention_days, expires_day,\n default_ttl_days, today):\n \"\"\"Return True if an artifact should be kept. Days are integer day numbers.\n\n rank is the artifact's 0-based position among the newest artifacts (...
Faults were introduced into `artifact_retention_keep` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for artifact_retention_keep(2, 3, 31, 22, null, 17, 87) (the correct value is not given; de...
1,000,020
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def quality_grade(score, checks):\n \"\"\"Return a letter grade for a quality assessment.\n\n checks is a list of {\"passed\": bool, \"severity\": str}. If any check has\n passed False and severity \"critical\", the grade is \"F\" regardless of score.\n Otherwise: score >= 90 \"A\", >= 80 \"B...
Faults were introduced into `quality_grade` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for quality_grade(55, [{"passed": true, "severity": "low"}]) (the correct value is not given; derive ...
1,000,021
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def aggregate_risk_factors(predictions):\n \"\"\"Aggregate per-file risk factors into the top five factors overall.\n\n predictions is a list (one item per file) of lists of [factor_name, contribution]\n pairs, where contribution is an int. Every occurrence counts, even if a factor\n repeats ...
Faults were introduced into `aggregate_risk_factors` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for aggregate_risk_factors([[["bugs", 12], ["deps", 45]], [["authors", 16]]]) (the correct v...
1,000,022
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def one_decimal(ms, unit):\n \"\"\"ms / unit rounded half up to one decimal place, as text (exact integer arithmetic).\"\"\"\n res = (ms * 10 + unit // 2) // unit\n return str(unit // 10) + \".\" + str(res % 10)\n\n\ndef format_duration(ms):\n \"\"\"Render a non-negative integer millisecond d...
Faults were introduced into `format_duration` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for format_duration(1001) (the correct value is not given; derive it from the docstring). The visib...
1,000,023
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def percentile(sorted_values, p):\n \"\"\"Linear-interpolated percentile p (0-100) of a non-empty ascending list.\"\"\"\n prev = len(sorted_values)\n label = (prev - 1) * p / 100\n count = int(label)\n elem = count + 1 if count < prev - 1 else prev\n if count == elem:\n return so...
Faults were introduced into `latency_percentiles` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for latency_percentiles([41]) (the correct value is not given; derive it from the docstring). T...
1,000,024
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def complexity_bucket(lines_of_code, cyclomatic, num_dependencies, num_tests):\n \"\"\"Return \"simple\", \"moderate\" or \"complex\" for a task context.\n\n Points: lines_of_code > 500 adds 2, else > 100 adds 1; cyclomatic > 20 adds 2,\n else > 10 adds 1; num_dependencies > 10 adds 1; num_tests...
Faults were introduced into `complexity_bucket` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for complexity_bucket(100, 20, 8, 113) (the correct value is not given; derive it from the docstr...
1,000,025
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def trace_sampling_decision(span_name, trace_id, has_error, base_rate_pct, parent_sampled):\n \"\"\"Return True if the span should be recorded. Rules are applied in order:\n\n 1. has_error is True -> True.\n 2. span_name is exactly \"/health\", \"/metrics\" or \"health_check\" -> False.\n 3. ...
Faults were introduced into `trace_sampling_decision` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for trace_sampling_decision("execute_agent", 837, false, 22, null) (the correct value is no...
1,000,026
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def string_length_boundaries(min_length, max_length):\n \"\"\"Return the string lengths a negative test should send for a constrained parameter.\n\n Either bound may be None (unconstrained). If min_length is not None and > 0, add 0\n and then min_length - 1 (min_length - 1 is not added again whe...
Faults were introduced into `string_length_boundaries` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for string_length_boundaries(5, 15) (the correct value is not given; derive it from the do...
1,000,027
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def quality_grade(score, checks):\n \"\"\"Return a letter grade for a quality assessment.\n\n checks is a list of {\"passed\": bool, \"severity\": str}. If any check has\n passed False and severity \"critical\", the grade is \"F\" regardless of score.\n Otherwise: score >= 90 \"A\", >= 80 \"B...
Faults were introduced into `quality_grade` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for quality_grade(61, []) (the correct value is not given; derive it from the docstring). The visible...
1,000,028
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def spec_readiness_score(spec):\n \"\"\"Return an integer readiness score from 0 to 100 for an OpenAPI-like dict.\n\n Points: \"info\" present +10, and +5 more if spec[\"info\"] has \"description\".\n \"paths\" present +20. For each operation under spec[\"paths\"][path][method] whose\n method...
Faults were introduced into `spec_readiness_score` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for spec_readiness_score({"info": {}, "paths": {"/r0": {"post": {"description": 1, "parameters...
1,000,029
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def find_stop(text, stop_sequences):\n \"\"\"Return the offset in text where the earliest stop sequence starts, or None.\n\n Every non-empty string in stop_sequences is searched for in text. The result is the\n smallest index at which any of them occurs (0 means the whole text is cut away).\n ...
Faults were introduced into `find_stop` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for find_stop("abba", ["cb", ""]) (the correct value is not given; derive it from the docstring). The vis...
1,000,030
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def boundary_violations(properties):\n \"\"\"Return up to three property values that each break one JSON-schema boundary.\n\n properties maps a name to a schema dict and is visited in insertion order.\n - \"integer\" or \"number\": maximum + 1 if \"maximum\" is set, else minimum - 1 if\n \"...
Faults were introduced into `boundary_violations` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for boundary_violations({"p0": {"type": "integer", "minimum": 3}, "p1": {"type": "string", "min...
1,000,031
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def streamable_len(text, holdback):\n \"\"\"Return how many UTF-8 bytes at the start of text can be streamed now.\n\n A run of U+FFFD characters at the end of text is an incomplete UTF-8 sequence that\n the next token may complete, so it is never streamed. Of the bytes before that run,\n the ...
Faults were introduced into `streamable_len` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for streamable_len("\u00e9za\u20ac\u00e9", 4) (the correct value is not given; derive it from the do...
1,000,032
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def threshold_compliance(metrics, thresholds):\n \"\"\"Check performance metrics against whichever thresholds are configured.\n\n metrics has integer keys: avg_ms, p95_ms, throughput_rps, success_pct,\n failed_requests, total_requests. thresholds may contain any of\n \"avg_response_time_ms\",...
Faults were introduced into `threshold_compliance` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for threshold_compliance({"avg_ms": 353, "p95_ms": 731, "throughput_rps": 44, "success_pct": 8...
1,000,033
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def quality_grade(score, checks):\n \"\"\"Return a letter grade for a quality assessment.\n\n checks is a list of {\"passed\": bool, \"severity\": str}. If any check has\n passed False and severity \"critical\", the grade is \"F\" regardless of score.\n Otherwise: score >= 90 \"A\", >= 80 \"B...
Faults were introduced into `quality_grade` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for quality_grade(61, [{"passed": true, "severity": "high"}, {"passed": false, "severity": "critical"...
1,000,034
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def is_collection_endpoint(path, method, query_param_count):\n \"\"\"Return True if an endpoint looks like a collection (list/search) endpoint.\n\n path and method are compared case-insensitively. True if any of these holds:\n - the method is GET and the path contains none of \"{id}\", \"{uuid}\...
Faults were introduced into `is_collection_endpoint` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for is_collection_endpoint("/filter/:id/users", "PUT", 1) (the correct value is not given; d...
1,000,035
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def parse_signature_header(header):\n \"\"\"Parse \"t=<timestamp>,v1=<signature>\" into {\"timestamp\": int, \"v1\": str}, or None.\n\n The header is split on \",\"; in each part the key is the text before the first \"=\"\n and the value is everything after it (\"\" when there is no \"=\"). Keys...
Faults were introduced into `parse_signature_header` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for parse_signature_header("v1=,v0=ab=c,t=1751,v1=4732") (the correct value is not given; de...
1,000,036
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "import re\n\n\ndef parse_cron_field(field, minimum, maximum):\n \"\"\"Expand one cron field into the sorted list of values it selects, or None if invalid.\n\n field is a comma-separated list of items; each item is \"*\", \"a\", \"a-b\", \"*/s\",\n \"a-b/s\" or \"a/s\" where a, b, s are decimal i...
Faults were introduced into `parse_cron_field` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for parse_cron_field("10/3,0-6", 1, 12) (the correct value is not given; derive it from the docstr...
1,000,037
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def spec_readiness_score(spec):\n \"\"\"Return an integer readiness score from 0 to 100 for an OpenAPI-like dict.\n\n Points: \"info\" present +10, and +5 more if spec[\"info\"] has \"description\".\n \"paths\" present +20. For each operation under spec[\"paths\"][path][method] whose\n method...
Faults were introduced into `spec_readiness_score` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for spec_readiness_score({"info": {"description": "d"}, "paths": {"/r0": {"post": {"summary": ...
1,000,038
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def estimate_tokens(text):\n \"\"\"Approximate token count: one token per 4 characters, rounded up.\"\"\"\n return (len(text) + 3) // 4\n\n\ndef truncate_to_token_budget(text, max_tokens):\n \"\"\"Return text truncated so that its estimated token count fits max_tokens.\n\n estimate_tokens(s) ...
Faults were introduced into `truncate_to_token_budget` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for truncate_to_token_budget("nl5at204zlz5i8pv511zwjk9gc9bwhpjpzpi", 3) (the correct value...
1,000,039
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def login_rate_limit(request_times, lockout_until, now, limit, lockout_seconds):\n \"\"\"Decide whether a login attempt at time `now` is rate limited.\n\n All times are integer seconds. Returns [limited, retry_after]:\n - If lockout_until is not None and now < lockout_until: [True, lockout_until...
Faults were introduced into `login_rate_limit` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for login_rate_limit([135, 140, 143, 156, 163, 175, 185, 187], null, 189, 1, 300) (the correct val...
1,000,040
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def brace_delta(line):\n \"\"\"Return (number of \"{\") - (number of \"}\") in line, ignoring braces inside strings.\n\n A string starts at \", ' or ` and ends at the next occurrence of the same quote\n character that is not immediately preceded by a backslash. Braces inside a string\n are no...
Faults were introduced into `brace_delta` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for brace_delta("'{\\") (the correct value is not given; derive it from the docstring). The visible tes...
1,000,041
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def parse_version(text):\n \"\"\"Return the first three numeric components of a version string, padded with 0.\"\"\"\n if text.startswith(\"v\"):\n text = text[1:]\n left = text.split(\".\")[:3]\n for level in left:\n if not level.isdigit():\n raise ValueError(\"bad v...
Faults were introduced into `compare_versions` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for compare_versions("6.11", "11.3") (the correct value is not given; derive it from the docstring...
1,000,042
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def trace_sampling_decision(span_name, trace_id, has_error, base_rate_pct, parent_sampled):\n \"\"\"Return True if the span should be recorded. Rules are applied in order:\n\n 1. has_error is True -> True.\n 2. span_name is exactly \"/health\", \"/metrics\" or \"health_check\" -> False.\n 3. ...
Faults were introduced into `trace_sampling_decision` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for trace_sampling_decision("authenticate", 346, false, 6, true) (the correct value is not ...
1,000,043
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def flakiness_pattern(results):\n \"\"\"Classify a sequence of test outcomes (True = passed) from repeated runs.\n\n Let n = len(results) and let the longest consecutive run of passes and of failures\n be max_pass and max_fail.\n - Empty list -> \"UNKNOWN\".\n - max_pass == n -> \"STABLE_P...
Faults were introduced into `flakiness_pattern` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for flakiness_pattern([true, true]) (the correct value is not given; derive it from the docstring...
1,000,044
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def streamable_len(text, holdback):\n \"\"\"Return how many UTF-8 bytes at the start of text can be streamed now.\n\n A run of U+FFFD characters at the end of text is an incomplete UTF-8 sequence that\n the next token may complete, so it is never streamed. Of the bytes before that run,\n the ...
Faults were introduced into `streamable_len` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for streamable_len("bz\ud83d\ude00 \ufffd\ufffd", 4) (the correct value is not given; derive it from...
1,000,045
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "import math\n\n\ndef wilson_interval(successes, total):\n \"\"\"Return the 95% Wilson score interval [low, high] for successes out of total.\n\n With z = 1.96 and p = successes / total:\n denominator = 1 + z*z / total\n center = (p + z*z / (2 * total)) / denominator\n margin = (z / d...
Faults were introduced into `wilson_interval` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for wilson_interval(127, 174) (the correct value is not given; derive it from the docstring). The v...
1,000,046
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def trace_sampling_decision(span_name, trace_id, has_error, base_rate_pct, parent_sampled):\n \"\"\"Return True if the span should be recorded. Rules are applied in order:\n\n 1. has_error is True -> True.\n 2. span_name is exactly \"/health\", \"/metrics\" or \"health_check\" -> False.\n 3. ...
Faults were introduced into `trace_sampling_decision` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for trace_sampling_decision("execute_agent", 506, false, 19, false) (the correct value is n...
1,000,047
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "import math\n\n\ndef wilson_interval(successes, total):\n \"\"\"Return the 95% Wilson score interval [low, high] for successes out of total.\n\n With z = 1.96 and p = successes / total:\n denominator = 1 + z*z / total\n center = (p + z*z / (2 * total)) / denominator\n margin = (z / d...
Faults were introduced into `wilson_interval` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for wilson_interval(9, 137) (the correct value is not given; derive it from the docstring). The vis...
1,000,048
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def brace_delta(line):\n \"\"\"Return (number of \"{\") - (number of \"}\") in line, ignoring braces inside strings.\n\n A string starts at \", ' or ` and ends at the next occurrence of the same quote\n character that is not immediately preceded by a backslash. Braces inside a string\n are no...
Faults were introduced into `brace_delta` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for brace_delta("'{{' `\\a{'\"") (the correct value is not given; derive it from the docstring). The vi...
1,000,049
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def flakiness_pattern(results):\n \"\"\"Classify a sequence of test outcomes (True = passed) from repeated runs.\n\n Let n = len(results) and let the longest consecutive run of passes and of failures\n be max_pass and max_fail.\n - Empty list -> \"UNKNOWN\".\n - max_pass == n -> \"STABLE_P...
Faults were introduced into `flakiness_pattern` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for flakiness_pattern([true, true, true, true, true]) (the correct value is not given; derive it ...
1,000,050
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def boundary_violations(properties):\n \"\"\"Return up to three property values that each break one JSON-schema boundary.\n\n properties maps a name to a schema dict and is visited in insertion order.\n - \"integer\" or \"number\": maximum + 1 if \"maximum\" is set, else minimum - 1 if\n \"...
Faults were introduced into `boundary_violations` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for boundary_violations({"p0": {"type": "boolean", "minLength": 0, "maxLength": 6}}) (the corre...
1,000,051
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def gguf_special_ids(metadata, vocab):\n \"\"\"Return {\"eos\": id or None, \"stop\": [ids]} for a GGUF model.\n\n vocab maps token text to id. A declared id metadata[\"tokenizer.ggml.<x>_token_id\"]\n (x is eos, eot or eom) counts only if it is an int (not a bool) with 0 <= id < len(vocab).\n ...
Faults were introduced into `gguf_special_ids` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for gguf_special_ids({"tokenizer.ggml.eos_token_id": 2}, {"<s>": 0, "</s>": 1, "a": 2, "b": 3}) (t...
1,000,052
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def threshold_compliance(metrics, thresholds):\n \"\"\"Check performance metrics against whichever thresholds are configured.\n\n metrics has integer keys: avg_ms, p95_ms, throughput_rps, success_pct,\n failed_requests, total_requests. thresholds may contain any of\n \"avg_response_time_ms\",...
Faults were introduced into `threshold_compliance` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for threshold_compliance({"avg_ms": 301, "p95_ms": 119, "throughput_rps": 97, "success_pct": 9...
1,000,053
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def spec_readiness_score(spec):\n \"\"\"Return an integer readiness score from 0 to 100 for an OpenAPI-like dict.\n\n Points: \"info\" present +10, and +5 more if spec[\"info\"] has \"description\".\n \"paths\" present +20. For each operation under spec[\"paths\"][path][method] whose\n method...
Faults were introduced into `spec_readiness_score` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for spec_readiness_score({"info": {}, "paths": {"/r0": {"delete": {"responses": 1}}, "/r1": {"...
1,000,054
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "import re\n\n\ndef parse_max_age(max_age):\n \"\"\"Convert \"<digits><unit>\" into milliseconds; return 0 for anything else.\n\n The whole string must match: one or more decimal digits followed by exactly one\n unit, \"d\" (days), \"h\" (hours), \"m\" (minutes) or \"s\" (seconds). Units are\n ...
Faults were introduced into `parse_max_age` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for parse_max_age("93x") (the correct value is not given; derive it from the docstring). The visible ...
1,000,055
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def percentile(sorted_values, p):\n \"\"\"Linear-interpolated percentile p (0-100) of a non-empty ascending list.\"\"\"\n chunk = len(sorted_values)\n cursor = (chunk - 1) * p / 100\n slot = int(cursor)\n pos = slot + 1 if slot <= chunk - 1 else slot\n if slot == pos:\n return so...
Faults were introduced into `latency_percentiles` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for latency_percentiles([337]) (the correct value is not given; derive it from the docstring). ...
1,000,056
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def split_generic_params(params):\n \"\"\"Split a function parameter list on commas that are not nested in <> or ().\n\n Depth starts at 0, increases on \"<\" or \"(\" and decreases on \">\" or \")\" with no\n clamping, so an unmatched \">\" (as in \"=>\") or \")\" makes it negative. Only a comm...
Faults were introduced into `split_generic_params` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for split_generic_params(", List<T>(x, y)(x, y))") (the correct value is not given; derive it ...
1,000,057
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def flakiness_pattern(results):\n \"\"\"Classify a sequence of test outcomes (True = passed) from repeated runs.\n\n Let n = len(results) and let the longest consecutive run of passes and of failures\n be max_pass and max_fail.\n - Empty list -> \"UNKNOWN\".\n - max_pass == n -> \"STABLE_P...
Faults were introduced into `flakiness_pattern` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for flakiness_pattern([true, true, false, false, true, false, false, false, false, false]) (the c...
1,000,058
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def artifact_retention_keep(rank, keep_latest_n, created_day, retention_days, expires_day,\n default_ttl_days, today):\n \"\"\"Return True if an artifact should be kept. Days are integer day numbers.\n\n rank is the artifact's 0-based position among the newest artifacts (...
Faults were introduced into `artifact_retention_keep` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for artifact_retention_keep(0, 1, 43, null, 54, 17, 62) (the correct value is not given; de...
1,000,059
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def string_length_boundaries(min_length, max_length):\n \"\"\"Return the string lengths a negative test should send for a constrained parameter.\n\n Either bound may be None (unconstrained). If min_length is not None and > 0, add 0\n and then min_length - 1 (min_length - 1 is not added again whe...
Faults were introduced into `string_length_boundaries` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for string_length_boundaries(10, 17) (the correct value is not given; derive it from the d...
1,000,060
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def pattern_effectiveness(successful_generation, successful_tests, total_usage, avg_generation_ms):\n \"\"\"Return a 0-100 effectiveness score rounded to 2 decimals.\n\n Raises ValueError if total_usage is negative, or if successful_generation or\n successful_tests is negative or greater than to...
Faults were introduced into `pattern_effectiveness` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for pattern_effectiveness(2, 0, 3, 350) (the correct value is not given; derive it from the d...
1,000,061
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def artifact_retention_keep(rank, keep_latest_n, created_day, retention_days, expires_day,\n default_ttl_days, today):\n \"\"\"Return True if an artifact should be kept. Days are integer day numbers.\n\n rank is the artifact's 0-based position among the newest artifacts (...
Faults were introduced into `artifact_retention_keep` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for artifact_retention_keep(2, 1, 23, null, null, 31, 54) (the correct value is not given; ...
1,000,062
train
qe_bugfix-d1
null
1
software engineering
qe_bugfix
{"module.py": "def gguf_special_ids(metadata, vocab):\n \"\"\"Return {\"eos\": id or None, \"stop\": [ids]} for a GGUF model.\n\n vocab maps token text to id. A declared id metadata[\"tokenizer.ggml.<x>_token_id\"]\n (x is eos, eot or eom) counts only if it is an int (not a bool) with 0 <= id < len(vocab).\n ...
Faults were introduced into `gguf_special_ids` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. A user reports a wrong result for gguf_special_ids({"tokenizer.ggml.eos_token_id": 0}, {"<begin_of_text>": 0, "<end_of_text>": 1...
1,000,063
train
qe_bugfix-d1
null
2
software engineering
qe_bugfix
{"module.py": "def gguf_loader(metadata):\n \"\"\"Return the weight loader (\"llama\", \"qwen2\" or \"qwen3\") for a GGUF file's metadata.\n\n If metadata[\"split.count\"] is an int greater than 1, the model is split into several\n files, which is not supported: raise ValueError. The architecture is\n metad...
Faults were introduced into `gguf_loader` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. Hidden tests fail but the visible tests all pass, so no failing input is known. Compare the code with the docstring line by line to f...
1,000,000
train
qe_bugfix-d2
null
2
software engineering
qe_bugfix
{"module.py": "def estimate_tokens(text):\n \"\"\"Approximate token count: one token per 4 characters, rounded up.\"\"\"\n return (len(text) + 3) // 4\n\n\ndef truncate_to_token_budget(text, max_tokens):\n \"\"\"Return text truncated so that its estimated token count fits max_tokens.\n\n estimate_tokens(s) ...
Faults were introduced into `truncate_to_token_budget` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. Hidden tests fail but the visible tests all pass, so no failing input is known. Compare the code with the docstring line...
1,000,001
train
qe_bugfix-d2
null
2
software engineering
qe_bugfix
{"module.py": "def parse_version(text):\n \"\"\"Return the first three numeric components of a version string, padded with 0.\"\"\"\n if text.startswith(\"v\"):\n text = text[1:]\n cur = text.split(\".\")[:3]\n for cell in cur:\n if not cell.isdigit():\n raise ValueError(\"bad versi...
Faults were introduced into `compare_versions` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. Hidden tests fail but the visible tests all pass, so no failing input is known. Compare the code with the docstring line by line...
1,000,002
train
qe_bugfix-d2
null
2
software engineering
qe_bugfix
{"module.py": "def artifact_retention_keep(rank, keep_latest_n, created_day, retention_days, expires_day,\n default_ttl_days, today):\n \"\"\"Return True if an artifact should be kept. Days are integer day numbers.\n\n rank is the artifact's 0-based position among the newest artifacts (...
Faults were introduced into `artifact_retention_keep` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. Hidden tests fail but the visible tests all pass, so no failing input is known. Compare the code with the docstring line ...
1,000,003
train
qe_bugfix-d2
null
2
software engineering
qe_bugfix
{"module.py": "import re\n\n\ndef parse_cron_field(field, minimum, maximum):\n \"\"\"Expand one cron field into the sorted list of values it selects, or None if invalid.\n\n field is a comma-separated list of items; each item is \"*\", \"a\", \"a-b\", \"*/s\",\n \"a-b/s\" or \"a/s\" where a, b, s are decimal i...
Faults were introduced into `parse_cron_field` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. Hidden tests fail but the visible tests all pass, so no failing input is known. Compare the code with the docstring line by line...
1,000,004
train
qe_bugfix-d2
null
2
software engineering
qe_bugfix
{"module.py": "def claim_steal_priority(priority, stale_ms, time_to_deadline_ms, steal_count):\n \"\"\"Return the integer steal priority of a work claim (higher = steal sooner).\n\n score = base + staleness + deadline - 10 * steal_count, where\n - base is 100 for \"p0\", 75 for \"p1\", 50 for \"p2\", 25 for \"...
Faults were introduced into `claim_steal_priority` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. Hidden tests fail but the visible tests all pass, so no failing input is known. Compare the code with the docstring line by ...
1,000,005
train
qe_bugfix-d2
null
2
software engineering
qe_bugfix
{"module.py": "def complexity_bucket(lines_of_code, cyclomatic, num_dependencies, num_tests):\n \"\"\"Return \"simple\", \"moderate\" or \"complex\" for a task context.\n\n Points: lines_of_code > 500 adds 2, else > 100 adds 1; cyclomatic > 20 adds 2,\n else > 10 adds 1; num_dependencies > 10 adds 1; num_tests...
Faults were introduced into `complexity_bucket` in module.py. The docstring is the specification and is correct; the code is not. There may be more than one fault, and the number is not given. Hidden tests fail but the visible tests all pass, so no failing input is known. Compare the code with the docstring line by lin...
1,000,006
train
qe_bugfix-d2
null
End of preview. Expand in Data Studio

OpenEnv QE Arena tasks

Public task instances for the openenv-qe-arena training environment (OpenEnv Arena, software-engineering domain).

Family What the model does Reward
qe_bugfix Repairs an injected bug by exact-replacement edits, with visible tests it can run 1.0 only if every hidden differential test passes
qe_bugfix-d4 The same repair under a total edit budget and a localised-repair rule (no rewrite) as qe_bugfix, and 0 for a file that breaks the rule
qe_mutant_kill Writes test cases (as data) that tell a mutant apart from the original 0.5 per mutant for a distinguishing input, 1.0 when the expected value is also exact
qe_flaky Finds the flaky test in a suite (d1), names its cause (d2), or repairs it by edits (d3); some suites are clean d1: 1.0 for the right test or null; d2: 0.5 for the test, 1.0 with the cause; d3: 0.5 for the test, 1.0 for a repair that holds on every graded run

Each row is what the model sees at reset: prompt and the virtual files. Hidden inputs, reference outputs, mutant sources and flaky-test ground truth are generated inside the environment from (task_id, seed) and are not in this dataset. qe_bugfix-d4 rows also carry edit_budget (the budget the prompt states); other rows have no such key.

  • Rows: 640 (64 seeds x 10 task cells)
  • Corpus: 45 small Python functions, most adapted from MIT-licensed QE projects; origins are in manifest.json.
  • Source commit: 20eeb877d12e2740c8fff3ef6115d75d66572dce
Downloads last month
11