Dataset Viewer
Auto-converted to Parquet Duplicate
rubric_id
stringlengths
12
12
criterion_sha256
stringlengths
16
16
retrieval_text
stringlengths
11
975
prompt_block
stringlengths
13
981
family
stringclasses
2 values
predicate
stringclasses
2 values
title
stringlengths
11
208
input_condition
stringlengths
0
537
code_requirement
stringlengths
0
862
prediction
stringlengths
0
855
target_failing_test
stringlengths
0
143
target_exception_class
stringclasses
5 values
text
stringlengths
15
3.18k
source_file
stringlengths
93
144
source_instance_id
stringlengths
15
65
source_repo
stringlengths
9
28
source_dataset
stringclasses
2 values
library
stringclasses
1 value
library_target
int64
100
100
a6c21cacd053
aaed981854de8306
The `compute_uv=False` branch of `grad_svd` is left untouched by the patch because `compute_uv=False` never enters the edited `full_matrices`/`m<n`/`m>n` block, the singular-values-only VJP is exactly as it was before the patch — the code path the issue reports as raising `ValueError: negative dimensions` / returning a...
- The `compute_uv=False` branch of `grad_svd` is left untouched by the patch because `compute_uv=False` never enters the edited `full_matrices`/`m<n`/`m>n` block, the singular-values-only VJP is exactly as it was before the patch — the code path the issue reports as raising `ValueError: negative dimensions` / retur...
perf_spec
a named unit test will fail
The `compute_uv=False` branch of `grad_svd` is left untouched by the patch
`code`: the only edits to `autograd/numpy/linalg.py` are the two `anp.eye(...)`/`anp.concatenate((anp.ones(a.ndim - k, dtype=int), (n, n)))` reshape lines, both of which sit inside the branch of `grad_svd`'s vjp that runs when `compute_uv=True` (they use `gu`, `gv`, `u`, `v`, `s` from the unpacked `usv_` triple). No li...
the test calls `fun(x) = np.linalg.svd(x, full_matrices=False, compute_uv=False)` on `mat = npr.randn(5, 3)` and runs `check_grads(fun)(mat)`, which requires the VJP of that call to match the numerical directional derivative of `s` w.r.t. a 5×3 real input (and to run at all, returning a (5, 3) cotangent).
because `compute_uv=False` never enters the edited `full_matrices`/`m<n`/`m>n` block, the singular-values-only VJP is exactly as it was before the patch — the code path the issue reports as raising `ValueError: negative dimensions` / returning a wrongly-shaped or wrongly-valued cotangent. `check_grads` therefore either...
tests/test_linalg.py::test_svd_only_s_2d
### The `compute_uv=False` branch of `grad_svd` is left untouched by the patch - **Input condition**: `code`: the only edits to `autograd/numpy/linalg.py` are the two `anp.eye(...)`/`anp.concatenate((anp.ones(a.ndim - k, dtype=int), (n, n)))` reshape lines, both of which sit inside the branch of `grad_svd`'s vjp that r...
stb100r1__HIPS__autograd.ac044f0d.func_pm_op_change_const__9w9bk4c0__spec__the--compute-uv-false--branch-of--grad-svd__a6c21cacd053.md
HIPS__autograd.ac044f0d.func_pm_op_change_const__9w9bk4c0
HIPS/autograd
swe-smith
swe_100
100
78f0eef16b24
ddc4a55ee240e338
`_finalize` treats `idist.all_gather`'s concatenated tensor as a per-rank list, so the pickled caches are never reassembled `idist.all_gather` on a 1-D tensor returns a single tensor of shape `(ws * max_len,)` (all ranks' bytes concatenated), not a list of per-rank tensors. Iterating over it yields 0-dim scalar uint8 e...
- `_finalize` treats `idist.all_gather`'s concatenated tensor as a per-rank list, so the pickled caches are never reassembled `idist.all_gather` on a 1-D tensor returns a single tensor of shape `(ws * max_len,)` (all ranks' bytes concatenated), not a list of per-rank tensors. Iterating over it yields 0-dim scalar u...
perf_spec
a named unit test will fail
`_finalize` treats `idist.all_gather`'s concatenated tensor as a per-rank list, so the pickled caches are never reassembled
`code`: `_finalize` gathers each rank's pickled `self.saver._cache_dict` with `gathered_tensors = idist.all_gather(cache_tensor)` and then iterates `for rank_idx, (tensor, length) in enumerate(zip(gathered_tensors, all_lens))`, slicing `tensor[:length]` and calling `pickle.loads`.
The test runs with `DistCall(nnodes=1, nproc_per_node=2)`, rank 0 producing 8 rows (`testfile0`..`testfile7`) and rank 1 producing 10 rows (`testfile8`..`testfile17`), with `ClassificationSaver(..., save_rank=1)`; on rank 1 it opens `predictions.csv` and requires `row[0] == "testfile" + str(i)` for every row and finall...
`idist.all_gather` on a 1-D tensor returns a single tensor of shape `(ws * max_len,)` (all ranks' bytes concatenated), not a list of per-rank tensors. Iterating over it yields 0-dim scalar uint8 elements, so `tensor[:length]` on a 0-dim tensor raises `IndexError`/produces no valid pickle stream and `pickle.loads` canno...
tests/test_handler_classification_saver_dist.py::DistributedHandlerClassificationSaver::test_saved_content
### `_finalize` treats `idist.all_gather`'s concatenated tensor as a per-rank list, so the pickled caches are never reassembled - **Input condition**: `code`: `_finalize` gathers each rank's pickled `self.saver._cache_dict` with `gathered_tensors = idist.all_gather(cache_tensor)` and then iterates `for rank_idx, (tenso...
stb100r1__Project-MONAI__MONAI-1535__spec__finalize--treats--idist-all-gather--s-conc__78f0eef16b24.md
Project-MONAI__MONAI-1535
Project-MONAI/MONAI
swe-gym
swe_100
100
4cdd5bf5588c
53bf3c733e0b116b
Locale `names` entries not normalized to the lowercase `xx`/`xx-yy` pattern the test enforces because the code ships locale `names` entries that are not in that canonical form (uppercase region codes such as `"en-US"`, or codes with a script/region segment that is not two lowercase letters nor `-latn`/`-cyrl`), the fir...
- Locale `names` entries not normalized to the lowercase `xx`/`xx-yy` pattern the test enforces because the code ships locale `names` entries that are not in that canonical form (uppercase region codes such as `"en-US"`, or codes with a script/region segment that is not two lowercase letters nor `-latn`/`-cyrl`), t...
perf_spec
a named unit test will fail
Locale `names` entries not normalized to the lowercase `xx`/`xx-yy` pattern the test enforces
`code`: the submission only edits `Arrow.time()` in `arrow/arrow.py` and leaves `arrow/locales.py` untouched, so every `Locale` subclass keeps whatever string literals are in its `names` list.
the test iterates `for locale_cls in self.locales.values(): for locale_name in locale_cls.names:` and requires both `assert locale_name.islower()` and `assert re.match(r"^[a-z]{2}(-[a-z]{2})?(?:-latn|-cyrl)?$", locale_name)` — i.e. every entry of every locale's `names` must be all lowercase and be exactly a 2-letter la...
because the code ships locale `names` entries that are not in that canonical form (uppercase region codes such as `"en-US"`, or codes with a script/region segment that is not two lowercase letters nor `-latn`/`-cyrl`), the first such entry reached in the iteration makes `locale_name.islower()` return `False` or `re.mat...
tests/test_locales.py::TestLocaleValidation::test_locale_name_validation
### Locale `names` entries not normalized to the lowercase `xx`/`xx-yy` pattern the test enforces - **Input condition**: `code`: the submission only edits `Arrow.time()` in `arrow/arrow.py` and leaves `arrow/locales.py` untouched, so every `Locale` subclass keeps whatever string literals are in its `names` list. - **Co...
stb100r1__arrow-py__arrow.1d70d009.func_basic__ayqp3lg2__spec__locale--names--entries-not-normalized-to-the__4cdd5bf5588c.md
arrow-py__arrow.1d70d009.func_basic__ayqp3lg2
arrow-py/arrow
swe-smith
swe_100
100
fde8c669b724
b2fa3a3afab9b07d
Base `Unreader` buffer handling left broken; only `IterUnreader.chunk` was patched since neither test ever reaches `IterUnreader`, the null-byte fix cannot affect them; they fail because the unpatched base `Unreader` does not correctly write to / rewind / truncate `self.buf`, so data passed to `unread()` is not returne...
- Base `Unreader` buffer handling left broken; only `IterUnreader.chunk` was patched since neither test ever reaches `IterUnreader`, the null-byte fix cannot affect them; they fail because the unpatched base `Unreader` does not correctly write to / rewind / truncate `self.buf`, so data passed to `unread()` is not r...
perf_spec
a named unit test will fail
Base `Unreader` buffer handling left broken; only `IterUnreader.chunk` was patched
`code`: the diff touches only `IterUnreader.__init__` and `IterUnreader.chunk` in `gunicorn/http/unreader.py`; the base class `Unreader` (its `__init__`, `chunk`, `read`, `unread` and the `self.buf` BytesIO bookkeeping) is left exactly as found.
the test constructs a bare `Unreader()` — no `IterUnreader`, no chunk source at all — calls `unreader.unread(b'hi there')` and then asserts `b'hi there' in unreader.read()`. Likewise `test_unreader_read_with_nonzero_size` mocks `unreader.chunk` and requires `read(size=5)` to return exactly `b'qwert'`, then `b'yasdf'`, ...
since neither test ever reaches `IterUnreader`, the null-byte fix cannot affect them; they fail because the unpatched base `Unreader` does not correctly write to / rewind / truncate `self.buf`, so data passed to `unread()` is not returned by the following `read()` and the residue of a partially consumed chunk is droppe...
tests/test_http.py::test_unreader_unread
### Base `Unreader` buffer handling left broken; only `IterUnreader.chunk` was patched - **Input condition**: `code`: the diff touches only `IterUnreader.__init__` and `IterUnreader.chunk` in `gunicorn/http/unreader.py`; the base class `Unreader` (its `__init__`, `chunk`, `read`, `unread` and the `self.buf` BytesIO boo...
stb100r1__benoitc__gunicorn.bacbf8aa.combine_file__i9w62u4z__spec__base--unreader--buffer-handling-left-broken__fde8c669b724.md
benoitc__gunicorn.bacbf8aa.combine_file__i9w62u4z
benoitc/gunicorn
swe-smith
swe_100
100
741050a2dcb5
797f0e8f5b243558
html_quote still wraps the escaped string in single quotes instead of double quotes With the `"'%s'"` template, the returned value is `'&lt;&#039;&#13;&#10;&#9;&quot;\&gt;'` — correct entities now, but delimited by `'` rather than `"`. The first and last characters differ from the expected string, so assertEqual fails ...
- html_quote still wraps the escaped string in single quotes instead of double quotes With the `"'%s'"` template, the returned value is `'&lt;&#039;&#13;&#10;&#9;&quot;\&gt;'` — correct entities now, but delimited by `'` rather than `"`. The first and last characters differ from the expected string, so assertEqual ...
perf_spec
a named unit test will fail
html_quote still wraps the escaped string in single quotes instead of double quotes
`code`: `html_quote` returns `"'%s'" % html_escape(string)...`, i.e. the format string literal surrounds the escaped body with `'` characters; only the `\r`/`\n` replacement order was changed.
The test asserts `self.assertEqual('"&lt;&#039;&#13;&#10;&#9;&quot;\\&gt;"', html_quote('<\'\r\n\t"\\>'))` — the returned string must begin and end with a double-quote character `"`, giving `"&lt;&#039;&#13;&#10;&#9;&quot;\&gt;"`.
With the `"'%s'"` template, the returned value is `'&lt;&#039;&#13;&#10;&#9;&quot;\&gt;'` — correct entities now, but delimited by `'` rather than `"`. The first and last characters differ from the expected string, so assertEqual fails even though the `&#13;`/`&#10;` ordering was fixed.
`test/test_stpl.py::TestSimpleTemplate::test_htmlutils_quote`
### html_quote still wraps the escaped string in single quotes instead of double quotes - **Input condition**: `code`: `html_quote` returns `"'%s'" % html_escape(string)...`, i.e. the format string literal surrounds the escaped body with `'` characters; only the `\r`/`\n` replacement order was changed. - **Code require...
stb100r1__bottlepy__bottle.a8dfef30.func_basic__45wi5g3r__spec__html-quote-still-wraps-the-escaped-string-in__741050a2dcb5.md
bottlepy__bottle.a8dfef30.func_basic__45wi5g3r
bottlepy/bottle
swe-smith
swe_100
100
625f30567542
979916969a44037f
Second `def charset` shadows the new `@property`, so `rs.charset` is a bound method, not a string in a class body the later `def charset` rebinds the class attribute, discarding the property object entirely. `BaseResponse.charset` is therefore an ordinary function and `rs.charset` evaluates to `<bound method BaseRespon...
- Second `def charset` shadows the new `@property`, so `rs.charset` is a bound method, not a string in a class body the later `def charset` rebinds the class attribute, discarding the property object entirely. `BaseResponse.charset` is therefore an ordinary function and `rs.charset` evaluates to `<bound method Base...
perf_spec
a named unit test will fail
Second `def charset` shadows the new `@property`, so `rs.charset` is a bound method, not a string
`code`: the diff adds `@property def charset(self)` but leaves the pre-existing `def charset(self, default='UTF-8')` immediately after it in the same class body, with no decorator on the second definition.
the test does `rs = BaseResponse()` then `self.assertEqual(rs.charset, 'UTF-8')`, then after `rs.content_type = 'text/html; charset=latin9'` asserts `rs.charset == 'latin9'`, i.e. attribute access `rs.charset` must evaluate to those plain strings.
in a class body the later `def charset` rebinds the class attribute, discarding the property object entirely. `BaseResponse.charset` is therefore an ordinary function and `rs.charset` evaluates to `<bound method BaseResponse.charset ...>`, never calling the parsing code. The very first assertion `assertEqual(rs.charset...
test/test_environ.py::TestResponse::test_charset
### Second `def charset` shadows the new `@property`, so `rs.charset` is a bound method, not a string - **Input condition**: `code`: the diff adds `@property def charset(self)` but leaves the pre-existing `def charset(self, default='UTF-8')` immediately after it in the same class body, with no decorator on the second d...
stb100r1__bottlepy__bottle.a8dfef30.func_basic__rqd7kk81__spec__second--def-charset--shadows-the-new---prope__625f30567542.md
bottlepy__bottle.a8dfef30.func_basic__rqd7kk81
bottlepy/bottle
swe-smith
swe_100
100
9e4ffca94bd6
130c9c6938251209
Only `Did.__init__` was corrected; the `__repr__` rendering of dids/datas was left in its broken form because the fix stops at the constructor, whatever field ordering/format the existing `__repr__` code emits (e.g. identifier before name, wrong hex width, missing indentation/blank separator, or a field emitted in the ...
- Only `Did.__init__` was corrected; the `__repr__` rendering of dids/datas was left in its broken form because the fix stops at the constructor, whatever field ordering/format the existing `__repr__` code emits (e.g. identifier before name, wrong hex width, missing indentation/blank separator, or a field emitted i...
perf_spec
a named unit test will fail
Only `Did.__init__` was corrected; the `__repr__` rendering of dids/datas was left in its broken form
`code`: the submitted diff touches nothing but the four assignments in `Did.__init__` in `src/cantools/database/diagnostics/did.py`; the `__repr__` implementations used to render a loaded CDD database (`Database.__repr__`, `Did.__repr__`, `Data.__repr__`) are unchanged.
the test does `db = cantools.db.load_file('tests/files/cdd/example.cdd', encoding='iso-8859-1')` and asserts `repr(db)` equals, character for character, a string whose did header lines are of the form `"did('ECU_Identification', 0x0090)\n"` (name first, then the identifier formatted as `0x%04x`), each followed by data ...
because the fix stops at the constructor, whatever field ordering/format the existing `__repr__` code emits (e.g. identifier before name, wrong hex width, missing indentation/blank separator, or a field emitted in the wrong slot — the same kind of positional mix-up the constructor had) is still emitted; the loaded data...
tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr
### Only `Did.__init__` was corrected; the `__repr__` rendering of dids/datas was left in its broken form - **Input condition**: `code`: the submitted diff touches nothing but the four assignments in `Did.__init__` in `src/cantools/database/diagnostics/did.py`; the `__repr__` implementations used to render a loaded CDD...
stb100r1__cantools__cantools.0c6a7871.combine_file__446ox3s6__spec__only--did---init----was-corrected--the----re__9e4ffca94bd6.md
cantools__cantools.0c6a7871.combine_file__446ox3s6
cantools/cantools
swe-smith
swe_100
100
59c1b179e04c
9b82c4d6bafcfa22
`_resolve_replace_requires` depends on names/state that the patch never defines, so every replacement aborts the graph as soon as a require matches the `dep/*` pattern, `_resolve_replace_requires` evaluates `profile_build if node.context == CONTEX
- `_resolve_replace_requires` depends on names/state that the patch never defines, so every replacement aborts the graph as soon as a require matches the `dep/*` pattern, `_resolve_replace_requires` evaluates `profile_build if node.context == CONTEX
perf_spec
a named unit test will fail
`_resolve_replace_requires` depends on names/state that the patch never defines, so every replacement aborts the graph
`code`: the patch only edits `conans/client/graph/graph_builder.py`; the new `_resolve_replace_requires` uses `CONTEXT_BUILD` (no import added in the diff), `self._resolve_prereleases`, `node.conanfile.requires.reindex(...)`, and writes `graph.replaced_requires[original_require]`, `node.replaced_requires[original_requi...
the test writes the profile `"profile": f"[{profile_tag}]\n{pattern}: {alternative}"` with `replace_requires` `dep/*: depng/*`, runs `c.run("install pkg -pr=profile")` (which asserts a zero exit code) and then `c.assert_listed_require({f"{pkg}#{rrev}": "Cache"}, build=tool_require)` with `pkg == "depng/1.0"`; afterward...
as soon as a require matches the `dep/*` pattern, `_resolve_replace_requires` evaluates `profile_build if node.context == CONTEX
`test/integration/graph/test_replace_requires.py::TestReplaceRequires::test_alternative[False-dep/1.0-dep/*-depng/*-depng/1.0]`
### `_resolve_replace_requires` depends on names/state that the patch never defines, so every replacement aborts the graph - **Input condition**: `code`: the patch only edits `conans/client/graph/graph_builder.py`; the new `_resolve_replace_requires` uses `CONTEXT_BUILD` (no import added in the diff), `self._resolve_pr...
stb100r1__conan-io__conan.86f29e13.pr_15136__spec__resolve-replace-requires--depends-on-names__59c1b179e04c.md
conan-io__conan.86f29e13.pr_15136
conan-io/conan
swe-smith
swe_100
100
cceb5a0db854
9521848a6b3bd7c0
`config install-pkg` builds an empty profile list instead of falling back to the `default` profile With no `-pr` on the command line, `args.profile` is falsy, so `profiles` is `[]` and `get_profile([], None, None)` returns a profile with no settings — exactly the previous "empty profiles" behaviour; the `default` profi...
- `config install-pkg` builds an empty profile list instead of falling back to the `default` profile With no `-pr` on the command line, `args.profile` is falsy, so `profiles` is `[]` and `get_profile([], None, None)` returns a profile with no settings — exactly the previous "empty profiles" behaviour; the `default`...
perf_spec
a named unit test will fail
`config install-pkg` builds an empty profile list instead of falling back to the `default` profile
`code`: in `conan/cli/commands/config.py::config_install_pkg`, the profile list is computed as `profiles = [args.profile] if args.profile else []` and handed to `ConfigAPI.install_pkg`, which does `profiles = profiles or []` and then `conan_api.profiles.get_profile(profiles, settings, options)`.
The test runs `c.run("config install-pkg myconf/[*]")` with **no** `-pr` argument after writing `c.save_home({"profiles/default": "[settings]\nos=Windows"})`, and then asserts `"user.myteam:myconf: mywinvalue" in c.out` from `config show *`; after rewriting the default profile to `os=Linux` and re-running the same comm...
With no `-pr` on the command line, `args.profile` is falsy, so `profiles` is `[]` and `get_profile([], None, None)` returns a profile with no settings — exactly the previous "empty profiles" behaviour; the `default` profile with `os=Windows`/`os=Linux` is never loaded. The package resolved is the settings-less/default-...
test/functional/command/config_install_test.py::TestConfigInstallPkgSettings::test_config_install_from_pkg_profile_default
### `config install-pkg` builds an empty profile list instead of falling back to the `default` profile - **Input condition**: `code`: in `conan/cli/commands/config.py::config_install_pkg`, the profile list is computed as `profiles = [args.profile] if args.profile else []` and handed to `ConfigAPI.install_pkg`, which do...
stb100r1__conan-io__conan.86f29e13.pr_16876__spec__config-install-pkg--builds-an-empty-profile__cceb5a0db854.md
conan-io__conan.86f29e13.pr_16876
conan-io/conan
swe-smith
swe_100
100
43d99b4ead06
2b18396c957bf0a6
Broken `add_issue` call left in the spacing check path (only the E741 call was repaired) E10.py (like every other normalizer issue file, and the trivial sources in `test_pep8.py`) drives the spacing branch, where the still-malformed `add_issue` call raises `TypeError: add_issue() missing 1 required positional argument:...
- Broken `add_issue` call left in the spacing check path (only the E741 call was repaired) E10.py (like every other normalizer issue file, and the trivial sources in `test_pep8.py`) drives the spacing branch, where the still-malformed `add_issue` call raises `TypeError: add_issue() missing 1 required positional arg...
perf_spec
a named unit test will fail
Broken `add_issue` call left in the spacing check path (only the E741 call was repaired)
`code`: the diff changes exactly one line in `parso/python/pep8.py` (the E741 `variables` branch, formerly `self.add_issuadd_issue(741, message % 'variables', leaf)`), leaving every other `add_issue` invocation in `PEP8Normalizer` untouched — in particular the whitespace/spacing reporting helper inside `_check_spacing`...
the test does `grammar = parso.load_grammar(version=normalizer_issue_case.python_version)`, `module = grammar.parse(code)`, `issues = grammar._get_normalizer_issues(module)` and then `sort(issues)`, asserting `desired == actual` where `desired` is the list of `#:`-annotated codes in `test/normalizer_issue_files/E10.py`...
E10.py (like every other normalizer issue file, and the trivial sources in `test_pep8.py`) drives the spacing branch, where the still-malformed `add_issue` call raises `TypeError: add_issue() missing 1 required positional argument: 'message'` before `_get_normalizer_issues` can return; `issues` is never assigned, so th...
test/test_normalizer_issues_files.py::test_normalizer_issue[E10.py]
### Broken `add_issue` call left in the spacing check path (only the E741 call was repaired) - **Input condition**: `code`: the diff changes exactly one line in `parso/python/pep8.py` (the E741 `variables` branch, formerly `self.add_issuadd_issue(741, message % 'variables', leaf)`), leaving every other `add_issue` invo...
stb100r1__davidhalter__parso.338a5760.func_basic__ap337jbv__spec__broken--add-issue--call-left-in-the-spacing__43d99b4ead06.md
davidhalter__parso.338a5760.func_basic__ap337jbv
davidhalter/parso
swe-smith
swe_100
100
3970f4af1fa5
28794efb9878e0b6
`--proxy-headers` is never translated into the `X-Forwarded-For` header value passed to the Server `run()` does not contain the mapping `if args.proxy_headers: proxy_forwarded_address_header = "X-Forwarded-For"` followed by the override `if args.proxy_headers_host: proxy_forwarded_address_header = args.proxy_headers_ho...
- `--proxy-headers` is never translated into the `X-Forwarded-For` header value passed to the Server `run()` does not contain the mapping `if args.proxy_headers: proxy_forwarded_address_header = "X-Forwarded-For"` followed by the override `if args.proxy_headers_host: proxy_forwarded_address_header = args.proxy_head...
perf_spec
a named unit test will fail
`--proxy-headers` is never translated into the `X-Forwarded-For` header value passed to the Server
`code`: `daphne/cli.py`'s `CommandLineInterface.run()` — the only changes made were to argparse defaults (`--proxy-headers-host`/`--proxy-headers-port` from `False` to `None`); the body of `run()` that builds the `Server(...)` kwargs from `args.proxy_headers`, `args.proxy_headers_host` and `args.proxy_headers_port` was...
the test calls `self.assertCLI(["--proxy-headers"], {"proxy_forwarded_address_header": "X-Forwarded-For"})`, i.e. after `CommandLineInterface().run(["--proxy-headers"])` the mocked/inspected server kwargs must contain `proxy_forwarded_address_header == "X-Forwarded-For"` (and, in `test_custom_proxyhost`, `== "blah"` wh...
`run()` does not contain the mapping `if args.proxy_headers: proxy_forwarded_address_header = "X-Forwarded-For"` followed by the override `if args.proxy_headers_host: proxy_forwarded_address_header = args.proxy_headers_host`; the value handed to `Server` therefore stays at the parser default (now `None` after the diff,...
tests/test_cli.py::TestCLIInterface::test_default_proxyheaders
### `--proxy-headers` is never translated into the `X-Forwarded-For` header value passed to the Server - **Input condition**: `code`: `daphne/cli.py`'s `CommandLineInterface.run()` — the only changes made were to argparse defaults (`--proxy-headers-host`/`--proxy-headers-port` from `False` to `None`); the body of `run(...
stb100r1__django__daphne.32ac73e1.combine_file__807agcgh__spec__proxy-headers--is-never-translated-into-t__3970f4af1fa5.md
django__daphne.32ac73e1.combine_file__807agcgh
django/daphne
swe-smith
swe_100
100
0fe08bbc6864
f0b37554aed72b8b
`checkout()` builds its result with `defaultdict`, a name that is never imported in `dvc/stage/__init__.py` the first statement of `checkout()` evaluates `defaultdict(list)`
- `checkout()` builds its result with `defaultdict`, a name that is never imported in `dvc/stage/__init__.py` the first statement of `checkout()` evaluates `defaultdict(list)`
perf_spec
a named unit test will fail
`checkout()` builds its result with `defaultdict`, a name that is never imported in `dvc/stage/__init__.py`
`code`: the rewritten `Stage.checkout()` in `dvc/stage/__init__.py` initializes its accumulator as `stats: dict[str, list[StrPath]] = defaultdict(list)` while the module's import block (top of `dvc/stage/__init__.py`) contains no `from collections import defaultdict`.
the test does `stage = dvc.run(cmd="cp bar foo", deps=["bar"], outs=["foo"], name="copy-foo-bar")` and then asserts `Stage.PARAM_WDIR not in d`, `Stage.PARAM_WDIR not in d["stages"]["copy-foo-bar"]` and, after `stage = stage.reload()`, `assert not stage.changed()`. `dvc.run(...)` executes the stage and calls `Stage.che...
the first statement of `checkout()` evaluates `defaultdict(list)`
tests/func/test_stage.py::test_default_wdir_ignored_in_checksum
### `checkout()` builds its result with `defaultdict`, a name that is never imported in `dvc/stage/__init__.py` - **Input condition**: `code`: the rewritten `Stage.checkout()` in `dvc/stage/__init__.py` initializes its accumulator as `stats: dict[str, list[StrPath]] = defaultdict(list)` while the module's import block ...
stb100r1__iterative__dvc.1d6ea681.combine_module__vwauxlpf__spec__checkout----builds-its-result-with--default__0fe08bbc6864.md
iterative__dvc.1d6ea681.combine_module__vwauxlpf
iterative/dvc
swe-smith
swe_100
100
17ff5febd26e
8bc46e2a92fa8ed6
Imports `fetch_running_exp_from_temp_dir` from a `queue/utils.py` module that was never re-added since `dvc/repo/experiments/queue/utils.py` does not exist in the tree (it was the removed file described in the bug report, and the diff never restores it), the new `from .utils import fetch_running_exp_from_temp_dir` line...
- Imports `fetch_running_exp_from_temp_dir` from a `queue/utils.py` module that was never re-added since `dvc/repo/experiments/queue/utils.py` does not exist in the tree (it was the removed file described in the bug report, and the diff never restores it), the new `from .utils import fetch_running_exp_from_temp_dir...
perf_spec
a named unit test will fail
Imports `fetch_running_exp_from_temp_dir` from a `queue/utils.py` module that was never re-added
`code`: the diff only adds `from .utils import fetch_running_exp_from_temp_dir` to `dvc/repo/experiments/queue/celery.py` and `dvc/repo/experiments/queue/tempdir.py`, and adds no `dvc/repo/experiments/queue/utils.py` file (nor any other definition of `fetch_running_exp_from_temp_dir`).
the test calls `api.params_show(repo=erepo_dir)` and asserts it equals `{"foo": 1}`; `dvc.api.params_show` imports the repo/experiments machinery, which imports `dvc.repo.experiments.queue.celery` and `...queue.tempdir`.
since `dvc/repo/experiments/queue/utils.py` does not exist in the tree (it was the removed file described in the bug report, and the diff never restores it), the new `from .utils import fetch_running_exp_from_temp_dir` lines raise `ModuleNotFoundError`/`ImportError` at import time of `celery.py`/`tempdir.py`. The error...
tests/func/api/test_show.py::test_params_show_repo
### Imports `fetch_running_exp_from_temp_dir` from a `queue/utils.py` module that was never re-added - **Input condition**: `code`: the diff only adds `from .utils import fetch_running_exp_from_temp_dir` to `dvc/repo/experiments/queue/celery.py` and `dvc/repo/experiments/queue/tempdir.py`, and adds no `dvc/repo/experim...
stb100r1__iterative__dvc.1d6ea681.pr_8469__spec__imports--fetch-running-exp-from-temp-dir--fr__17ff5febd26e.md
iterative__dvc.1d6ea681.pr_8469
iterative/dvc
swe-smith
swe_100
100
57a4660be819
cc0d197f4d14a1be
rwlock path building switched to `fs.join`, an API the repo's filesystem object doesn't expose (original used `fs.path.join`)
- rwlock path building switched to `fs.join`, an API the repo's filesystem object doesn't expose (original used `fs.path.join`)
perf_spec
a named unit test will fail
rwlock path building switched to `fs.join`, an API the repo's filesystem object doesn't expose (original used `fs.path.join`)
`code`: `dvc/rwlock.py::_edit_rwlock` was changed from `path = fs.path.join(lock_dir, "rwlock")` / `make_lock(fs.path.join(lock_dir, "rwlock.lock"), ...)` to `fs.join(lock_dir, RWLOCK_FILE)` / `fs.join(lock_dir, RWLOCK_LOCK)`, while everywhere else in this tree the filesystem exposes path helpers via `fs.path.*`.
The test first executes a real stage — `dvc.run(cmd="python copy.py params.yaml metrics.yaml && echo out > out", metrics_no_cache=["metrics.yaml"], params=["foo", "bar"], name="copy-file", deps=["copy.py"], outs=["out"])` — and later `tm
tests/func/experiments/test_show.py::test_show_outs
### rwlock path building switched to `fs.join`, an API the repo's filesystem object doesn't expose (original used `fs.path.join`) - **Input condition**: `code`: `dvc/rwlock.py::_edit_rwlock` was changed from `path = fs.path.join(lock_dir, "rwlock")` / `make_lock(fs.path.join(lock_dir, "rwlock.lock"), ...)` to `fs.join(...
stb100r1__iterative__dvc.1d6ea681.pr_8469__spec__rwlock-path-building-switched-to--fs-join__57a4660be819.md
iterative__dvc.1d6ea681.pr_8469
iterative/dvc
swe-smith
swe_100
100
4f811d6f4ac2
005710c743b3a667
Swiss UID check digit still uses the altered (non-official) weighting and lacks the remainder-10/11 special cases because only the formatting line was fixed, `check_digit` is still produced by the modified arithmetic (different weight vector / modulus handling) and there is no branch mapping a remainder result of 10 to...
- Swiss UID check digit still uses the altered (non-official) weighting and lacks the remainder-10/11 special cases because only the formatting line was fixed, `check_digit` is still produced by the modified arithmetic (different weight vector / modulus handling) and there is no branch mapping a remainder result of...
perf_spec
a named unit test will fail
Swiss UID check digit still uses the altered (non-official) weighting and lacks the remainder-10/11 special cases
`code`: `faker/providers/ssn/fr_CH/__init__.py`'s `vat_id()` — the diff only renames the signature spacing and rewrites the return string to `f"CHE{digits_str}"`; the body that computes `check_digit` from the 8 random digits is left exactly as it was.
the `TestFrCH::test_checksum` parametrizations (`checksum_remainder_10`, `checksum_remainder_11`, `checksum_remainder_other`) exercise `vat_id()` with fixed digit sequences and require the official UID algorithm: weights `(5, 4, 3, 2, 7, 6, 5, 4)` over the 8 digits, `check = 11 - (sum % 11)`, with `check == 10` meaning...
because only the formatting line was fixed, `check_digit` is still produced by the modified arithmetic (different weight vector / modulus handling) and there is no branch mapping a remainder result of 10 to a retry nor of 11 to `0`. So for the `checksum_remainder_11` case the code emits `11` (or an out-of-range digit) ...
tests/providers/test_ssn.py::TestFrCH::test_checksum[checksum_remainder_10]
### Swiss UID check digit still uses the altered (non-official) weighting and lacks the remainder-10/11 special cases - **Input condition**: `code`: `faker/providers/ssn/fr_CH/__init__.py`'s `vat_id()` — the diff only renames the signature spacing and rewrites the return string to `f"CHE{digits_str}"`; the body that co...
stb100r1__joke2k__faker.8b401a7d.lm_rewrite__rxhvdmf6__spec__swiss-uid-check-digit-still-uses-the-altered__4f811d6f4ac2.md
joke2k__faker.8b401a7d.lm_rewrite__rxhvdmf6
joke2k/faker
swe-smith
swe_100
100
afbafcc50293
2944cf67510ee5cc
Cached writ
- Cached writ
perf_spec
a named unit test will fail
Cached writ
tests/test_middlewares.py::test_caching_json_write
### Cached writ
stb100r1__msiemens__tinydb.10644a0e.combine_file__6zdx5iab__spec__cached-writ__afbafcc50293.md
msiemens__tinydb.10644a0e.combine_file__6zdx5iab
msiemens/tinydb
swe-smith
swe_100
100
bac42b687f5f
a24e71556f0abff2
`raise_from_error` builds the kwargs dict but never raises an error class
- `raise_from_error` builds the kwargs dict but never raises an error class
perf_spec
a named unit test will fail
`raise_from_error` builds the kwargs dict but never raises an error class
`code`: `oauthlib/oauth2/rfc6749/errors.py` defines `raise_from_error(error, params=None)` whose body ends with the dictionary literal `{'description': params.get('error_description'), 'uri': params.get('error_uri'), 'state': params.get('state')}` and contains no `raise` of a matching `OAuth2Error` subclass (nor of `Cu...
The test does `self.assertRaises(CustomOAuth2Error, parse_token_response, self.json_custom_error)`; `parse_token_response` -> `validate_token_parameters` calls `raise_from_error(params.get('error'), params)`, so that call must actually raise `CustomOAuth2Error` (and, in the sibling tests, `AccessDeniedError` for `self....
tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_custom_json_error
### `raise_from_error` builds the kwargs dict but never raises an error class - **Input condition**: `code`: `oauthlib/oauth2/rfc6749/errors.py` defines `raise_from_error(error, params=None)` whose body ends with the dictionary literal `{'description': params.get('error_description'), 'uri': params.get('error_uri'), 's...
stb100r1__oauthlib__oauthlib.1fd52536.combine_file__jhev9jho__spec__raise-from-error--builds-the-kwargs-dict-bu__bac42b687f5f.md
oauthlib__oauthlib.1fd52536.combine_file__jhev9jho
oauthlib/oauthlib
swe-smith
swe_100
100
30463c88da8e
ef82194784835264
Newstyle gettext substitutes with `str.format()` while the translations use `%(name)s` placeholders `str.format(**variables)` only replaces `{name}`-style fields; `%(name)s` contains no braces, so `"<strong>Wert: %(name)s</strong>".format(name="<test>")` returns the string unchanged, yielding `"<strong>Wert: %(name)s</...
- Newstyle gettext substitutes with `str.format()` while the translations use `%(name)s` placeholders `str.format(**variables)` only replaces `{name}`-style fields; `%(name)s` contains no braces, so `"<strong>Wert: %(name)s</strong>".format(name="<test>")` returns the string unchanged, yielding `"<strong>Wert: %(na...
perf_spec
a named unit test will fail
Newstyle gettext substitutes with `str.format()` while the translations use `%(name)s` placeholders
`code`: in `src/jinja2/ext.py`, `_make_new_gettext` (and `_make_new_ngettext`/`_make_new_pgettext`/`_make_new_npgettext`) end with `return rv.format(**variables)` rather than `return rv % variables`.
the tests' translation catalogs/callables all supply printf-style strings — e.g. `test_autoescape_support` installs `lambda x: "<strong>Wert: %(name)s</strong>"` and asserts `t.render(ae=False) == "<strong>Wert: <test></strong>"`, `test_trans_stringformatting` asserts `tmpl.render(LANGUAGE="de", user_count=5) == "Benut...
`str.format(**variables)` only replaces `{name}`-style fields; `%(name)s` contains no braces, so `"<strong>Wert: %(name)s</strong>".format(name="<test>")` returns the string unchanged, yielding `"<strong>Wert: %(name)s</strong>"` instead of `"<strong>Wert: <test></strong>"`, and `"Benutzer: %(user_count)s".format(...)`...
tests/test_ext.py::TestNewstyleInternationalization::test_trans_stringformatting
### Newstyle gettext substitutes with `str.format()` while the translations use `%(name)s` placeholders - **Input condition**: `code`: in `src/jinja2/ext.py`, `_make_new_gettext` (and `_make_new_ngettext`/`_make_new_pgettext`/`_make_new_npgettext`) end with `return rv.format(**variables)` rather than `return rv % varia...
stb100r1__pallets__jinja.ada0a9a6.func_basic__pvbn2y7s__spec__newstyle-gettext-substitutes-with--str-forma__30463c88da8e.md
pallets__jinja.ada0a9a6.func_basic__pvbn2y7s
pallets/jinja
swe-smith
swe_100
100
c797b31b2862
9384cd2c4ad69969
Non-hashable multi-column selection is dropped to `None` instead of converted to a tuple With `[["B","C"]]` selection, `self._selection` is the list `["B", "C"]`, for which `is_hashable` returns `False`, so `name` is set to `None`. The returned Series has `name=None` while the expected Series has `name=("B", "C")`, so ...
- Non-hashable multi-column selection is dropped to `None` instead of converted to a tuple With `[["B","C"]]` selection, `self._selection` is the list `["B", "C"]`, for which `is_hashable` returns `False`, so `name` is set to `None`. The returned Series has `name=None` while the expected Series has `name=("B", "C")...
perf_spec
a named unit test will fail
Non-hashable multi-column selection is dropped to `None` instead of converted to a tuple
`code`: in `DataFrameGroupBy._wrap_applied_output_series` (pandas/core/groupby/generic.py), the fallback branch builds `self.obj._constructor_sliced(values, index=key_index, name=name)` with `name = self._selection if is_hashable(self._selection) else None`.
The test does `df.groupby("A")[["B", "C"]].apply(lambda x: np.array([0]))` and compares with `tm.assert_series_equal` against `Series([np.array([0])] * 2, index=Index([1, 2], name="A"), name=("B", "C"))` — i.e. the resulting Series' `name` must be the tuple `("B", "C")`, not `None`.
With `[["B","C"]]` selection, `self._selection` is the list `["B", "C"]`, for which `is_hashable` returns `False`, so `name` is set to `None`. The returned Series has `name=None` while the expected Series has `name=("B", "C")`, so `assert_series_equal` fails on the "Series name are different" check (the code should hav...
pandas/tests/groupby/test_apply.py::test_apply_array_output_multi_getitem
### Non-hashable multi-column selection is dropped to `None` instead of converted to a tuple - **Input condition**: `code`: in `DataFrameGroupBy._wrap_applied_output_series` (pandas/core/groupby/generic.py), the fallback branch builds `self.obj._constructor_sliced(values, index=key_index, name=name)` with `name = self....
stb100r1__pandas-dev__pandas-53207__spec__non-hashable-multi-column-selection-is-dropp__c797b31b2862.md
pandas-dev__pandas-53207
pandas-dev/pandas
swe-gym
swe_100
100
00f1996849d1
bc67cf9c72a9a157
Fix only widens the generic `needs_i8_conversion` predicate; `_AsOfMerge`'s own tolerance/key handling still has no ArrowExtensionArray path
- Fix only widens the generic `needs_i8_conversion` predicate; `_AsOfMerge`'s own tolerance/key handling still has no ArrowExtensionArray path
perf_spec
a named unit test will fail
Fix only widens the generic `needs_i8_conversion` predicate; `_AsOfMerge`'s own tolerance/key handling still has no ArrowExtensionArray path
`code`: the only change is in `pandas/core/dtypes/common.py::needs_i8_conversion`, making it return `True` for `ArrowDtype` whose `pyarrow_dtype` is timestamp/duration; nothing in `pandas/core/reshape/merge.py` (`_AsO
pandas/tests/reshape/merge/test_merge_asof.py::test_merge_asof_pyarrow_td_tolerance
### Fix only widens the generic `needs_i8_conversion` predicate; `_AsOfMerge`'s own tolerance/key handling still has no ArrowExtensionArray path - **Input condition**: `code`: the only change is in `pandas/core/dtypes/common.py::needs_i8_conversion`, making it return `True` for `ArrowDtype` whose `pyarrow_dtype` is tim...
stb100r1__pandas-dev__pandas-56488__spec__fix-only-widens-the-generic--needs-i8-conver__00f1996849d1.md
pandas-dev__pandas-56488
pandas-dev/pandas
swe-gym
swe_100
100
eb38b23500e4
6558dad18d65fc89
With `skipna=False`, a later non-NA value overwrites the `-1` sentinel already written for an earlier NA in the same group for group 1 (rows 0,1) row 0 is NaN so `out[0,0] = -1`, but row 1 (`min_value`) is not NA and `seen[0,0]` is still False, so the code sets `seen=True`, `group_min_or_max=min_value` and `out[0,0] = ...
- With `skipna=False`, a later non-NA value overwrites the `-1` sentinel already written for an earlier NA in the same group for group 1 (rows 0,1) row 0 is NaN so `out[0,0] = -1`, but row 1 (`min_value`) is not NA and `seen[0,0]` is still False, so the code sets `seen=True`, `group_min_or_max=min_value` and `out[0...
perf_spec
a named unit test will fail
With `skipna=False`, a later non-NA value overwrites the `-1` sentinel already written for an earlier NA in the same group
`code`: in `group_idxmin_idxmax`, the NA branch does `if not skipna or not seen[lab, j]: out[lab, j] = -1`, and the non-NA branch unconditionally does `if not seen[lab, j]: seen[lab, j] = True; group_min_or_max[lab, j] = val; out[lab, j] = i` with no check that `skipna` is False and an NA was already encountered for `(...
the test calls `getattr(gb, how)(skipna=False)` on column `b` = `[nan, min_value, nan, max_value, min_value, nan, max_value, nan, nan, nan]` grouped by `a = [1,1,2,2,3,3,4,4,5,5]`, and asserts the result equals `DataFrame({"b": np.nan}, index=pd.Index(range(1, 6), name="a", dtype="intp"))`, i.e. **every** group must be...
for group 1 (rows 0,1) row 0 is NaN so `out[0,0] = -1`, but row 1 (`min_value`) is not NA and `seen[0,0]` is still False, so the code sets `seen=True`, `group_min_or_max=min_value` and `out[0,0] = 1`, discarding the NA sentinel; likewise group 2 (rows 2,3) ends with `out = 3`. The result column becomes `[1, 3, NaN, NaN...
pandas/tests/groupby/test_reductions.py::test_idxmin_idxmax_extremes_skipna[False-float-idxmax]
### With `skipna=False`, a later non-NA value overwrites the `-1` sentinel already written for an earlier NA in the same group - **Input condition**: `code`: in `group_idxmin_idxmax`, the NA branch does `if not skipna or not seen[lab, j]: out[lab, j] = -1`, and the non-NA branch unconditionally does `if not seen[lab, j...
stb100r1__pandas-dev__pandas-57046__spec__with--skipna-false---a-later-non-na-value-ov__eb38b23500e4.md
pandas-dev__pandas-57046
pandas-dev/pandas
swe-gym
swe_100
100
abf0500b653b
a756f4a391dd678f
`main` (and `_format_ignore_errors`/`__main__` block) deleted from the module
- `main` (and `_format_ignore_errors`/`__main__` block) deleted from the module
perf_spec
a named unit test will fail
`main` (and `_format_ignore_errors`/`__main__` block) deleted from the module
`code`: the submitted `scripts/validate_docstrings.py` ends immediately after `print_validate_one_results`'s `return len(result["errors"]) + len(result["examples_errs"])`; the diff removes the entire `def main(func_name, output_format, prefix, ignore_deprecated, ignore_errors)` function, `_format_ignore_errors`, and th...
the test calls `validate_docstrings.main(func_name="docstring1", prefix=None, output_format="default", ignore_deprecated=False, ignore_errors={})` and asserts `exit_status == 3`, i.e. the module must expose a callable `main` that dispatches to `print_validate_one_results(func_name, ignore_errors)`
scripts/tests/test_validate_docstrings.py::TestMainFunction::test_exit_status_for_main
### `main` (and `_format_ignore_errors`/`__main__` block) deleted from the module - **Input condition**: `code`: the submitted `scripts/validate_docstrings.py` ends immediately after `print_validate_one_results`'s `return len(result["errors"]) + len(result["examples_errs"])`; the diff removes the entire `def main(func_...
stb100r1__pandas-dev__pandas.95280573.combine_file__jj4xjw2c__spec__main---and---format-ignore-errors-----main__abf0500b653b.md
pandas-dev__pandas.95280573.combine_file__jj4xjw2c
pandas-dev/pandas
swe-smith
swe_100
100
b43192941a74
3711b85b67d0757b
`print_validate_all_results` ignores the global `None` key of `ignore_errors` for `func_name="pandas.DataFrame.align"` / `"pandas.Index.all"`, `ignore_errors.get(func_name, set())` is empty in the first call, so `actual_failures - expected_failures == {"ER01","ER02","ER03"}` and each of the two functions increments `ex...
- `print_validate_all_results` ignores the global `None` key of `ignore_errors` for `func_name="pandas.DataFrame.align"` / `"pandas.Index.all"`, `ignore_errors.get(func_name, set())` is empty in the first call, so `actual_failures - expected_failures == {"ER01","ER02","ER03"}` and each of the two functions incremen...
perf_spec
a named unit test will fail
`print_validate_all_results` ignores the global `None` key of `ignore_errors`
`code`: in `print_validate_all_results`, the set of ignored codes per function is computed as `expected_failures = ignore_errors.get(func_name, set())`, with no union of `ignore_errors.get(None, set())`.
the test calls `validate_docstrings.print_validate_all_results(output_format="default", prefix=None, ignore_deprecated=False, ignore_errors={None: {"ER03"}})` where every function reports errors `[("ER01", ...), ("ER02", ...), ("ER03", ...)]` for the two api items, and asserts `exit_status == 2 * 2`; the second call wi...
for `func_name="pandas.DataFrame.align"` / `"pandas.Index.all"`, `ignore_errors.get(func_name, set())` is empty in the first call, so `actual_failures - expected_failures == {"ER01","ER02","ER03"}` and each of the two functions increments `exit_status` three times, yielding 6 instead of 4; the assertion `assert exit_st...
`scripts/tests/test_validate_docstrings.py::TestValidator::test_validate_all_ignore_errors`
### `print_validate_all_results` ignores the global `None` key of `ignore_errors` - **Input condition**: `code`: in `print_validate_all_results`, the set of ignored codes per function is computed as `expected_failures = ignore_errors.get(func_name, set())`, with no union of `ignore_errors.get(None, set())`. - **Code re...
stb100r1__pandas-dev__pandas.95280573.combine_file__uk8oq70n__spec__print-validate-all-results--ignores-the-glo__b43192941a74.md
pandas-dev__pandas.95280573.combine_file__uk8oq70n
pandas-dev/pandas
swe-smith
swe_100
100
bf7306a9e0db
1cca684d2b5dc106
Timezone warning is emitted from an unreachable branch and uses the wrong message text by the time the `isinstance(data, ABCIndex)` check runs, `sanitize_array` has already replaced `data` with a plain ndarray/DatetimeArray, so `data` is no longer an `ABCIndex` and no warning is raised at all; `assert_produces_warning(...
- Timezone warning is emitted from an unreachable branch and uses the wrong message text by the time the `isinstance(data, ABCIndex)` check runs, `sanitize_array` has already replaced `data` with a plain ndarray/DatetimeArray, so `data` is no longer an `ABCIndex` and no warning is raised at all; `assert_produces_wa...
perf_spec
a named unit test will fail
Timezone warning is emitted from an unreachable branch and uses the wrong message text
`code`: the constructor's only tz handling is the `if isinstance(data, ABCIndex): if isinstance(data.dtype, DatetimeTZDtype): warnings.warn("Passing a DatetimeIndex with a timezone to SparseArray will lose the timezone information. ...")` block, and it is placed *after* `data = sanitize_array(data, index=None)`.
the test does `dti = pd.date_range("2016-01-01", periods=3, tz="US/Pacific")` and requires `with tm.assert_produces_warning(UserWarning, match="loses timezone information"): result = SparseArray(dti)`, and the same for `SparseArray(pd.Series(dti))`, with `tm.assert_sp_array_equal(result, SparseArray(np.asarray(dti, dty...
by the time the `isinstance(data, ABCIndex)` check runs, `sanitize_array` has already replaced `data` with a plain ndarray/DatetimeArray, so `data` is no longer an `ABCIndex` and no warning is raised at all; `assert_produces_warning(UserWarning)` fails with "Did not see expected warning of class 'UserWarning'". Additio...
pandas/tests/arrays/sparse/test_constructors.py::TestConstructors::test_constructor_warns_when_losing_timezone
### Timezone warning is emitted from an unreachable branch and uses the wrong message text - **Input condition**: `code`: the constructor's only tz handling is the `if isinstance(data, ABCIndex): if isinstance(data.dtype, DatetimeTZDtype): warnings.warn("Passing a DatetimeIndex with a timezone to SparseArray will lose ...
stb100r1__pandas-dev__pandas.95280573.func_pm_remove_cond__1ttb4gzy__spec__timezone-warning-is-emitted-from-an-unreacha__bf7306a9e0db.md
pandas-dev__pandas.95280573.func_pm_remove_cond__1ttb4gzy
pandas-dev/pandas
swe-smith
swe_100
100
88612108e260
ca241751c9817c1f
Header-order reversal was only removed from `EndOfMessage`, not from `Request`/`Response`/`InformationalResponse` with `headers[::-1]` still applied in `Request.__init__`, the stored headers are `[(b"host", b"example.com"), (b"a", b"b")]`, so the equality assertion on the ordered list fails. The same reversal explains ...
- Header-order reversal was only removed from `EndOfMessage`, not from `Request`/`Response`/`InformationalResponse` with `headers[::-1]` still applied in `Request.__init__`, the stored headers are `[(b"host", b"example.com"), (b"a", b"b")]`, so the equality assertion on the ordered list fails. The same reversal exp...
perf_spec
a named unit test will fail
Header-order reversal was only removed from `EndOfMessage`, not from `Request`/`Response`/`InformationalResponse`
`code`: the `__init__` of the header-carrying events in `h11/_events.py` other than `EndOfMessage` (i.e. `Request`, and the `_ResponseBase`/`Response`/`InformationalResponse` chain) still call `normalize_and_validate(headers[::-1], _parsed=_parsed)` (or otherwise reverse the incoming headers list) — the submitted diff ...
the test constructs `req = Request(method="GET", target="/", headers=[("a", "b"), ("hOSt", "example.com")], http_version="1.1")` and asserts `req.headers == [(b"a", b"b"), (b"host", b"example.com")]`, i.e. headers must be preserved in the order given, only lower-cased.
with `headers[::-1]` still applied in `Request.__init__`, the stored headers are `[(b"host", b"example.com"), (b"a", b"b")]`, so the equality assertion on the ordered list fails. The same reversal explains the two connection tests: `p.send(CLIENT, Request(..., headers=[("Host","example.com"),("Content-Length","10")]))`...
h11/tests/test_events.py::test_events
### Header-order reversal was only removed from `EndOfMessage`, not from `Request`/`Response`/`InformationalResponse` - **Input condition**: `code`: the `__init__` of the header-carrying events in `h11/_events.py` other than `EndOfMessage` (i.e. `Request`, and the `_ResponseBase`/`Response`/`InformationalResponse` chai...
stb100r1__python-hyper__h11.bed0dd4a.combine_file__b01k53cm__spec__header-order-reversal-was-only-removed-from__88612108e260.md
python-hyper__h11.bed0dd4a.combine_file__b01k53cm
python-hyper/h11
swe-smith
swe_100
100
1de9160fdcf2
4b6215cb423cbb23
`CT_Tc.grid_offset` ignores the row's `w:gridBefore` skipped-grid-columns count `grid_offset` is computed purely from the preceding sibling `w:tc` elements' grid spans (starting from 0), with no term for the containing `w:tr`'s `w:trPr/w:gridBefore` value — the parallel `_Row.grid_cols_before`/`grid_cols_after` accesso...
- `CT_Tc.grid_offset` ignores the row's `w:gridBefore` skipped-grid-columns count `grid_offset` is computed purely from the preceding sibling `w:tc` elements' grid spans (starting from 0), with no term for the containing `w:tr`'s `w:trPr/w:gridBefore` value — the parallel `_Row.grid_cols_before`/`grid_cols_after` a...
perf_spec
a named unit test will fail
`CT_Tc.grid_offset` ignores the row's `w:gridBefore` skipped-grid-columns count
`code`: `src/docx/oxml/table.py` defines `CT_Tc.grid_offset` (and the supporting `CT_Row`/`CT_TrPr` classes); the only change made was to `CT_Tbl.col_count`.
The test builds `tr = element("w:tr/(w:trPr/w:gridBefore{w:val=2},w:tc/w:p,w:tc/w:p)")`, takes `tc = tr.tc_lst[0]`, and asserts `tc.grid_offset == 2` (and `== 3` for `tc_lst[1]`, `== 6` for the `gridBefore{w:val=4}` case at index 2). So `grid_offset` must equal the row's `w:gridBefore` value plus the sum of the `gridSp...
`grid_offset` is computed purely from the preceding sibling `w:tc` elements' grid spans (starting from 0), with no term for the containing `w:tr`'s `w:trPr/w:gridBefore` value — the parallel `_Row.grid_cols_before`/`grid_cols_after` accessors that read `w:gridBefore`/`w:gridAfter` are themselves missing/failing in this...
tests/oxml/test_table.py::DescribeCT_Tc::it_knows_its_grid_offset[w:tr/(w:trPr/w:gridBefore{w:val=2},w:tc/w:p,w:tc/w:p)-0-2]
### `CT_Tc.grid_offset` ignores the row's `w:gridBefore` skipped-grid-columns count - **Input condition**: `code`: `src/docx/oxml/table.py` defines `CT_Tc.grid_offset` (and the supporting `CT_Row`/`CT_TrPr` classes); the only change made was to `CT_Tbl.col_count`. - **Code requirement**: The test builds `tr = element("...
stb100r1__python-openxml__python-docx.0cf6d71f.combine_file__7e3a0bkb__spec__ct-tc-grid-offset--ignores-the-row-s--w-gri__1de9160fdcf2.md
python-openxml__python-docx.0cf6d71f.combine_file__7e3a0bkb
python-openxml/python-docx
swe-smith
swe_100
100
9457af5facf6
b2ded5577ae8ece1
Only `local_part` was de-reversed; the Clark-name path used by `qn()` still mangles the tag `qn()` does not read `local_part`; it returns the tag's Clark name built from the stored prefix/local-part (`clark_name`), which is still produced by the unmodified, defect-carrying code path. The `w:rPr` and `w:color` children ...
- Only `local_part` was de-reversed; the Clark-name path used by `qn()` still mangles the tag `qn()` does not read `local_part`; it returns the tag's Clark name built from the stored prefix/local-part (`clark_name`), which is still produced by the unmodified, defect-carrying code path. The `w:rPr` and `w:color` chi...
perf_spec
a named unit test will fail
Only `local_part` was de-reversed; the Clark-name path used by `qn()` still mangles the tag
`code`: `src/docx/oxml/ns.py` — the patch changes only the `local_part` property body (`return self._local_part[::-1]` → `return self._local_part`), leaving every other member of `NamespacePrefixedTag` (the value stored for `_pfx`/`_local_part` in `__new__`, `clark_name`, `nsuri`, `nsmap`) and the `qn()` helper exactly...
The test builds `ColorFormat(element("w:r"))`, sets `color_format.rgb = RGBColor(10, 20, 30)`, and asserts `color_format._element.xml == xml("w:r/w:rPr/w:color{w:val=0A141E}")`, i.e. every element/attribute name produced through `qn("w:rPr")`, `qn("w:color")` and `qn("w:val")` must serialize as the correctly-spelled na...
`qn()` does not read `local_part`; it returns the tag's Clark name built from the stored prefix/local-part (`clark_name`), which is still produced by the unmodified, defect-carrying code path. The `w:rPr` and `w:color` children created by `get_or_add_rPr()`/`get_or_add_color()` ther
`tests/dml/test_color.py::DescribeColorFormat::it_can_change_its_RGB_value[rgb_set_fixture0]`
### Only `local_part` was de-reversed; the Clark-name path used by `qn()` still mangles the tag - **Input condition**: `code`: `src/docx/oxml/ns.py` — the patch changes only the `local_part` property body (`return self._local_part[::-1]` → `return self._local_part`), leaving every other member of `NamespacePrefixedTag`...
stb100r1__python-openxml__python-docx.0cf6d71f.combine_file__o91i6g30__spec__only--local-part--was-de-reversed--the-clark__9457af5facf6.md
python-openxml__python-docx.0cf6d71f.combine_file__o91i6g30
python-openxml/python-docx
swe-smith
swe_100
100
775a29100438
3e711f19034d02bc
Three-argument setsockopt path was deleted: calls without optlen fall through and raise TypeError With `optlen=None` and `value=1`, the first branch does not return, and the next check `if value is not None` is true, so the call raises `TypeError("invalid value for argument 'value': 1, must be None when specifying optl...
- Three-argument setsockopt path was deleted: calls without optlen fall through and raise TypeError With `optlen=None` and `value=1`, the first branch does not return, and the next check `if value is not None` is true, so the call raises `TypeError("invalid value for argument 'value': 1, must be None when specifyin...
perf_spec
a named unit test will fail
Three-argument setsockopt path was deleted: calls without optlen fall through and raise TypeError
`code`: `_SocketType.setsockopt` where the `optlen is None` branch only raises when `value is None` and has no `return self._sock.setsockopt(level, optname, value)`, so control falls through to `if value is not None: raise TypeError(... must be None when specifying optlen)` before the single remaining `return self._soc...
The test does `(ipv6_listener,) = await open_tcp_listeners(0, host="::1")` and then requires `await open_tcp_stream("127.0.0.1", port)` to raise `OSError` matching `"(Error|all attempts to) connect(ing)* to (\(')*127\.0\.0\.1(', |:)\d+(\): Connection refused| failed)$"`. `open_tcp_listeners` reaches that state only by ...
With `optlen=None` and `value=1`, the first branch does not return, and the next check `if value is not None` is true, so the call raises `TypeError("invalid value for argument 'value': 1, must be None when specifying optlen")` instead of delegating to the stdlib socket. `open_tcp_listeners` therefore either propagates...
src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_ipv6_v6only
### Three-argument setsockopt path was deleted: calls without optlen fall through and raise TypeError - **Input condition**: `code`: `_SocketType.setsockopt` where the `optlen is None` branch only raises when `value is None` and has no `return self._sock.setsockopt(level, optname, value)`, so control falls through to `...
stb100r1__python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__3gkurbmg__spec__three-argument-setsockopt-path-was-deleted__775a29100438.md
python-trio__trio.cfbbe2c1.func_pm_ctrl_shuffle__3gkurbmg
python-trio/trio
swe-smith
swe_100
100
f743456168ea
e861d1a8ffe43071
`save()` opens str paths itself instead of delegating the path to `part.save` Because the str branch opens the path and passes the resulting file object `f`, the mock records a call like `save(<_io.BufferedWriter name='foobar.docx'>)`. `assert_called_once_with("foobar.docx")` compares that file object against the strin...
- `save()` opens str paths itself instead of delegating the path to `part.save` Because the str branch opens the path and passes the resulting file object `f`, the mock records a call like `save(<_io.BufferedWriter name='foobar.docx'>)`. `assert_called_once_with("foobar.docx")` compares that file object against the...
perf_spec
a named unit test will fail
`save()` opens str paths itself instead of delegating the path to `part.save`
`code`: `Presentation.save` branches on `isinstance(file, str)` and, for that branch, does `with open(file, 'wb') as f: self.part.save(f)`.
The test calls `prs.save("foobar.docx")` and then asserts `prs_part_.save.assert_called_once_with(file_)` — i.e. `PresentationPart.save` must receive the *string* `"foobar.docx"` verbatim, not a derived object.
Because the str branch opens the path and passes the resulting file object `f`, the mock records a call like `save(<_io.BufferedWriter name='foobar.docx'>)`. `assert_called_once_with("foobar.docx")` compares that file object against the string, they are unequal, and the assertion raises AssertionError (the run also lea...
tests/test_presentation.py::DescribePresentation::it_can_save_the_presentation_to_a_file
### `save()` opens str paths itself instead of delegating the path to `part.save` - **Input condition**: `code`: `Presentation.save` branches on `isinstance(file, str)` and, for that branch, does `with open(file, 'wb') as f: self.part.save(f)`. - **Code requirement**: The test calls `prs.save("foobar.docx")` and then a...
stb100r1__scanny__python-pptx.278b47b1.combine_file__azm9h28m__spec__save----opens-str-paths-itself-instead-of-d__f743456168ea.md
scanny__python-pptx.278b47b1.combine_file__azm9h28m
scanny/python-pptx
swe-smith
swe_100
100
e6eb2928d89c
476e2969faf65d18
Non-string branch of `Image.from_file` does not hand `from_blob` the pair `(full stream contents, None)`
- Non-string branch of `Image.from_file` does not hand `from_blob` the pair `(full stream contents, None)`
perf_spec
a named unit test will fail
Non-string branch of `Image.from_file` does not hand `from_blob` the pair `(full stream contents, None)`
`code`: `Image.from_file` splits on `isinstance(image_file, str)` and the `else` (file-like) branch is the one exercised when `image_file` is an `io.BytesIO`; only the string branch was edited by the diff, the `else` branch's `blob`/`filename` computation is left as-is.
the test calls `Image.from_file(image_file)` with `image_file = io.BytesIO(blob)` where `blob` is the whole content of
tests/parts/test_image.py::DescribeImage::it_can_construct_from_a_stream
### Non-string branch of `Image.from_file` does not hand `from_blob` the pair `(full stream contents, None)` - **Input condition**: `code`: `Image.from_file` splits on `isinstance(image_file, str)` and the `else` (file-like) branch is the one exercised when `image_file` is an `io.BytesIO`; only the string branch was ed...
stb100r1__scanny__python-pptx.278b47b1.func_basic__p60whurg__spec__non-string-branch-of--image-from-file--does__e6eb2928d89c.md
scanny__python-pptx.278b47b1.func_basic__p60whurg
scanny/python-pptx
swe-smith
swe_100
100
320a8dff69cf
7663a0889de9a929
`is_merge_origin` is decorated with `@property` twice, so reading it raises TypeError instead of returning a bool the outer `property`'s `fget` is the inner `property` object, not the function. On attribute access Python calls `fget(instance)`, and a `property` object is not callable, so `self._tc.is_merge_origin` rais...
- `is_merge_origin` is decorated with `@property` twice, so reading it raises TypeError instead of returning a bool the outer `property`'s `fget` is the inner `property` object, not the function. On attribute access Python calls `fget(instance)`, and a `property` object is not callable, so `self._tc.is_merge_origin...
perf_spec
a named unit test will fail
`is_merge_origin` is decorated with `@property` twice, so reading it raises TypeError instead of returning a bool
`code`: in `src/pptx/oxml/table.py`, `CT_TableCell.is_merge_origin` carries two stacked `@property` decorators (`@property` / `@property` / `def is_merge_origin`), and `_Cell.is_merge_origin` returns `self._tc.is_merge_origin`.
the test builds `tc = element("a:tc{hMerge=1}")`, wraps it as `cell = _Cell(tc, None)`, evaluates `is_merge_origin = cell.is_merge_origin`, and asserts `is_merge_origin is expected_value` where `expected_value` is `False` — i.e. attribute access must yield the plain bool `False`.
the outer `property`'s `fget` is the inner `property` object, not the function. On attribute access Python calls `fget(instance)`, and a `property` object is not callable, so `self._tc.is_merge_origin` raises `TypeError: 'property' object is not callable` before any bool is produced. The test errors at the `cell.is_mer...
tests/test_table.py::Describe_Cell::it_knows_whether_it_is_merge_origin_cell[origin_fixture2]
### `is_merge_origin` is decorated with `@property` twice, so reading it raises TypeError instead of returning a bool - **Input condition**: `code`: in `src/pptx/oxml/table.py`, `CT_TableCell.is_merge_origin` carries two stacked `@property` decorators (`@property` / `@property` / `def is_merge_origin`), and `_Cell.is_m...
stb100r1__scanny__python-pptx.278b47b1.func_basic__za706v80__spec__is-merge-origin--is-decorated-with---proper__320a8dff69cf.md
scanny__python-pptx.278b47b1.func_basic__za706v80
scanny/python-pptx
swe-smith
swe_100
100
45795ad26007
6872a7ffc0b1bcee
`make_diagonal` never normalizes negative `axis1`/`axis2` and sizes the output with `len(D_shape) + 2` instead of `+ 1` with `axis1=-1, axis2=-2` the terms `axis1 + 1 = 0` and `axis2 + 1 = -1` contribute nothing, so `ndim_out = len(D_shape) + 2` — 3 for the 1-D case and 4 for the 2-D case, one dimension too many (a dia...
- `make_diagonal` never normalizes negative `axis1`/`axis2` and sizes the output with `len(D_shape) + 2` instead of `+ 1` with `axis1=-1, axis2=-2` the terms `axis1 + 1 = 0` and `axis2 + 1 = -1` contribute nothing, so `ndim_out = len(D_shape) + 2` — 3 for the 1-D case and 4 for the 2-D case, one dimension too many ...
perf_spec
a named unit test will fail
`make_diagonal` never normalizes negative `axis1`/`axis2` and sizes the output with `len(D_shape) + 2` instead of `+ 1`
`code`: the body of `make_diagonal` in `autograd/numpy/numpy_wrapper.py` computes `ndim_out = _builtins.max(len(D_shape) + 2, axis1 + 1, axis2 + 1)` and then indexes `shape_out` with the raw `axis1`/`axis2` arguments, with no step that converts a negative axis to `ndim_out + axis`.
the test calls `A = np.make_diagonal(D, axis1=-1, axis2=-2)` for `D = np.random.randn(4)` and asserts `np.allclose(np.diag(A), D)`, i.e. `A` must be the `(4, 4)` matrix whose diagonal is `D`; for `D = np.random.randn(3, 4)` it asserts `all([np.allclose(np.diag(A[i]), D[i]) for i in range(3)])`, i.e. `A` must have shape...
with `axis1=-1, axis2=-2` the terms `axis1 + 1 = 0` and `axis2 + 1 = -1` contribute nothing, so `ndim_out = len(D_shape) + 2` — 3 for the 1-D case and 4 for the 2-D case, one dimension too many (a diagonal embedding adds exactly one axis). Moreover `shape_out[-1]` and `shape_out[-2]` are written using the unnormalized ...
tests/test_numpy.py::test_make_diagonal
### `make_diagonal` never normalizes negative `axis1`/`axis2` and sizes the output with `len(D_shape) + 2` instead of `+ 1` - **Input condition**: `code`: the body of `make_diagonal` in `autograd/numpy/numpy_wrapper.py` computes `ndim_out = _builtins.max(len(D_shape) + 2, axis1 + 1, axis2 + 1)` and then indexes `shape_...
stb100r2__HIPS__autograd.ac044f0d.lm_rewrite__oq92pg6q__spec__make-diagonal--never-normalizes-negative--a__45795ad26007.md
HIPS__autograd.ac044f0d.lm_rewrite__oq92pg6q
HIPS/autograd
swe-smith
swe_100
100
df879750d23a
4e94a5414f941219
Anonymous TypedDicts are collapsed to `Dict[str, Any]` instead of `Dict[str, <shrunk value type>]` The rewriter discards `required_fields`/`optional_fields` and always yields `Dict[str, Any]`, so the call returns `Union[Dict[str, Any], Dict[int, int]]`, which is not equal to `Union[Dict[str, int], Dict[int, int]]`, and...
- Anonymous TypedDicts are collapsed to `Dict[str, Any]` instead of `Dict[str, <shrunk value type>]` The rewriter discards `required_fields`/`optional_fields` and always yields `Dict[str, Any]`, so the call returns `Union[Dict[str, Any], Dict[int, int]]`, which is not equal to `Union[Dict[str, int], Dict[int, int]]...
perf_spec
a named unit test will fail
Anonymous TypedDicts are collapsed to `Dict[str, Any]` instead of `Dict[str, <shrunk value type>]`
`code`: `shrink_types` falls through to the final `return Union[rewritten_types]` (i.e. the input types are not all equal and are not all lists/anonymous TypedDicts), and the rewriter used there is `_AnonymousTypedDictToDict`, whose `make_anonymous_typed_dict(self, required_fields, optional_fields)` ignores both field ...
`shrink_types((make_typed_dict(required_fields={'a': int, 'b': int}), Dict[int, int]), max_typed_dict_size=VERY_LARGE_MAX_TYPED_DICT_SIZE)` must equal `Union[Dict[str, int], Dict[int, int]]`, i.e. the anonymous TypedDict `{'a': int, 'b': int}` must become `Dict[str, int]` (its key type `str` and the shrunk union of its...
The rewriter discards `required_fields`/`optional_fields` and always yields `Dict[str, Any]`, so the call returns `Union[Dict[str, Any], Dict[int, int]]`, which is not equal to `Union[Dict[str, int], Dict[int, int]]`, and the assertion fails. The same constant-`Any` substitution also makes the nested case (`types2`) re...
tests/test_typing.py::TestShrinkType::test_shrink_types_mixed_dicts[types1-Union]
### Anonymous TypedDicts are collapsed to `Dict[str, Any]` instead of `Dict[str, <shrunk value type>]` - **Input condition**: `code`: `shrink_types` falls through to the final `return Union[rewritten_types]` (i.e. the input types are not all equal and are not all lists/anonymous TypedDicts), and the rewriter used there...
stb100r2__Instagram__MonkeyType.70c3acf6.func_pm_remove_assign__2h68nc6b__spec__anonymous-typeddicts-are-collapsed-to--dict__df879750d23a.md
Instagram__MonkeyType.70c3acf6.func_pm_remove_assign__2h68nc6b
Instagram/MonkeyType
swe-smith
swe_100
100
ccff074bccde
6fe2580facc0b2a9
Empty-tuple handling was added only to `TypeRewriter._rewrite_container`, leaving `get_type` unable to produce `Tuple[()]` for an empty tuple the unchanged tuple path computes `elem_types = ()` and subscripts with an empty tuple (`Tuple[()]` written as `Tuple[elem_types]` with `elem_types == ()`), which on this Python ...
- Empty-tuple handling was added only to `TypeRewriter._rewrite_container`, leaving `get_type` unable to produce `Tuple[()]` for an empty tuple the unchanged tuple path computes `elem_types = ()` and subscripts with an empty tuple (`Tuple[()]` written as `Tuple[elem_types]` with `elem_types == ()`), which on this P...
perf_spec
a named unit test will fail
Empty-tuple handling was added only to `TypeRewriter._rewrite_container`, leaving `get_type` unable to produce `Tuple[()]`
`code`: the diff touches only `TypeRewriter._rewrite_container` in `monkeytype/typing.py`; the tuple branch of `get_type`/`shrink_types`-style element-type construction (which builds `Tuple[elem_types]` from `tuple(get_type(e) for e in value)`) is unchanged, as are `type_to_dict`/`type_from_dict` in `monkeytype/encodin...
the test asserts `get_type((), max_typed_dict_size=VERY_LARGE_MAX_TYPED_DICT_SIZE) == typing_Tuple[()]` and the same for `max_typed_dict_size=0` (parametrizations `((), typing_Tuple[()])` and `(tuple(), typing_Tuple[()])`).
for an empty tuple the unchanged tuple path computes `elem_types = ()` and subscripts with an empty tuple (`Tuple[()]` written as `Tuple[elem_types]` with `elem_types == ()`), which on this Python yields the bare, unparameterized `typing.Tuple` (no `__args__`) rather than the empty-tuple type whose `__args__` is `((),)...
tests/test_typing.py::TestGetType::test_builtin_types[value4-Tuple]
### Empty-tuple handling was added only to `TypeRewriter._rewrite_container`, leaving `get_type` unable to produce `Tuple[()]` - **Input condition**: `code`: the diff touches only `TypeRewriter._rewrite_container` in `monkeytype/typing.py`; the tuple branch of `get_type`/`shrink_types`-style element-type construction (...
stb100r2__Instagram__MonkeyType.70c3acf6.pr_151__spec__empty-tuple-handling-was-added-only-to--type__ccff074bccde.md
Instagram__MonkeyType.70c3acf6.pr_151
Instagram/MonkeyType
swe-smith
swe_100
100
d3ebd5e9e0e1
cbb5c27e9ba9c0fc
Removal of public module-level API that other modules still import Because the edited module no longer defines the removed public names while dependent modules/tests still import them, importing (or collecting) those dependents fails immediately with `ImportError` (cannot import name), before any of the intended TypeVa...
- Removal of public module-level API that other modules still import [raises ImportError] Because the edited module no longer defines the removed public names while dependent modules/tests still import them, importing (or collecting) those dependents fails immediately with `ImportError` (cannot import name), befor...
error_focused
a named exception class will be raised
Removal of public module-level API that other modules still import
`code`: the diff deletes or renames module-level public definitions (functions/classes such as stub-building helpers, definition classes, or logger subclasses) that are unrelated to the narrow behavior change described by the task, so other modules/tests in the same package still reference those names via `from <module...
`from module import name` (and any attribute access `module.name`) requires the named binding to exist at module top level after execution of the module body; the import machinery resolves it eagerly at import time.
Because the edited module no longer defines the removed public names while dependent modules/tests still import them, importing (or collecting) those dependents fails immediately with `ImportError` (cannot import name), before any of the intended TypeVar-rendering behavior runs.
ImportError
### Removal of public module-level API that other modules still import - **Input condition**: `code`: the diff deletes or renames module-level public definitions (functions/classes such as stub-building helpers, definition classes, or logger subclasses) that are unrelated to the narrow behavior change described by the ...
stb100r2__Instagram__MonkeyType.70c3acf6.pr_175__err__removal-of-public-module-level-api-that-othe__d3ebd5e9e0e1.md
Instagram__MonkeyType.70c3acf6.pr_175
Instagram/MonkeyType
swe-smith
swe_100
100
ba13e3a0bcbf
b118fc5c4ffd67d0
Non-Module entries are left in `load_dict`/`checkpoint` instead of being skipped when `strict_shape=False` because `"opt"` survives in both `self.load_dict` and `checkpoint`, `Checkpoint.load_objects` calls `opt2.load_state_dict(checkpoint["opt"])` with the checkpoint state from `opt1`, which has only one parameter id ...
- Non-Module entries are left in `load_dict`/`checkpoint` instead of being skipped when `strict_shape=False` because `"opt"` survives in both `self.load_dict` and `checkpoint`, `Checkpoint.load_objects` calls `opt2.load_state_dict(checkpoint["opt"])` with the checkpoint state from `opt1`, which has only one paramet...
perf_spec
a named unit test will fail
Non-Module entries are left in `load_dict`/`checkpoint` instead of being skipped when `strict_shape=False`
`code`: in `CheckpointLoader.__call__`, the `strict_shape is False` branch iterates `self.load_dict.items()` and only rewrites `checkpoint[k]` for `isinstance(obj, torch.nn.Module)`; non-Module entries (e.g. the `optim.SGD` under key `"opt"`) are neither removed from `self.load_dict` nor from `checkpoint`, so they are ...
the test builds `CheckpointLoader(load_path=path, load_dict={"net": net2, "opt": opt2}, strict=False, strict_shape=False)` where the saved `opt1` has one param group entry and `opt2` has two, and after `engine.run([0] * 8, max_epochs=1)` asserts `self.assertEqual(len(opt2.state_dict()["param_groups"][0]["params"]), 2)`...
because `"opt"` survives in both `self.load_dict` and `checkpoint`, `Checkpoint.load_objects` calls `opt2.load_state_dict(checkpoint["opt"])` with the checkpoint state from `opt1`, which has only one parameter id in `param_groups[0]["params"]`. `opt2`'s param group is replaced by the loaded one, so `len(opt2.state_dict...
tests/test_handler_checkpoint_loader.py::TestHandlerCheckpointLoader::test_strict_shape
### Non-Module entries are left in `load_dict`/`checkpoint` instead of being skipped when `strict_shape=False` - **Input condition**: `code`: in `CheckpointLoader.__call__`, the `strict_shape is False` branch iterates `self.load_dict.items()` and only rewrites `checkpoint[k]` for `isinstance(obj, torch.nn.Module)`; non...
stb100r2__Project-MONAI__MONAI-2508__spec__non-module-entries-are-left-in--load-dict__ba13e3a0bcbf.md
Project-MONAI__MONAI-2508
Project-MONAI/MONAI
swe-gym
swe_100
100
d3d6b2e9856b
19c0407a52fd2ca8
`PersistentDataset.__init__` accepts no `pickle_module`/`pickle_protocol` arguments because `__init__` has no `pickle_module`/`pickle_protocol` keyword parameters, the very first construction in the test raises `TypeError: __init__() got an unexpected keyword argument 'pickle_module'` before any assertion runs, so `tes...
- `PersistentDataset.__init__` accepts no `pickle_module`/`pickle_protocol` arguments because `__init__` has no `pickle_module`/`pickle_protocol` keyword parameters, the very first construction in the test raises `TypeError: __init__() got an unexpected keyword argument 'pickle_module'` before any assertion runs, s...
perf_spec
a named unit test will fail
`PersistentDataset.__init__` accepts no `pickle_module`/`pickle_protocol` arguments
`code`: the diff only adds a `RuntimeError` handler inside `_cachecheck`; it leaves `PersistentDataset.__init__` (and the `torch.save`/`torch.load` calls in `_cachecheck`) with their original signature, i.e. no `pickle_module` or `pickle_protocol` parameters or stored attributes.
the test constructs `PersistentDataset(data=items, transform=_InplaceXform(), cache_dir=tempdir, pickle_module=pickle, pickle_protocol=pickle.HIGHEST_PROTOCOL)` and then asserts `self.assertEqual(items, [[[]], [[0]], [[0, 1]], [[0, 1, 2]], [[0, 1, 2, 3]]])` and `self.assertEqual(list(ds1), list(ds))`.
because `__init__` has no `pickle_module`/`pickle_protocol` keyword parameters, the very first construction in the test raises `TypeError: __init__() got an unexpected keyword argument 'pickle_module'` before any assertion runs, so `test_cache` errors out regardless of the corrupted-cache handling that was added.
tests/test_persistentdataset.py::TestDataset::test_cache
### `PersistentDataset.__init__` accepts no `pickle_module`/`pickle_protocol` arguments - **Input condition**: `code`: the diff only adds a `RuntimeError` handler inside `_cachecheck`; it leaves `PersistentDataset.__init__` (and the `torch.save`/`torch.load` calls in `_cachecheck`) with their original signature, i.e. n...
stb100r2__Project-MONAI__MONAI-3412__spec__persistentdataset---init----accepts-no--pic__d3d6b2e9856b.md
Project-MONAI__MONAI-3412
Project-MONAI/MONAI
swe-gym
swe_100
100
768bc8ff4487
b96ca9a51a23b169
`get_conv1`/`ResNet` still require scalar `conv1_t_size`/`conv1_t_stride` instead of per-axis sequences With a sequence argument, `conv1_t_size // 2` in `get_conv1` raises `TypeError: unsupported operand type(s) for //: 'tuple' and 'int'` (or builds nested tuples such as `((7,7,7), 7, 7)` that `nn.Conv3d` rejects), so ...
- `get_conv1`/`ResNet` still require scalar `conv1_t_size`/`conv1_t_stride` instead of per-axis sequences With a sequence argument, `conv1_t_size // 2` in `get_conv1` raises `TypeError: unsupported operand type(s) for //: 'tuple' and 'int'` (or builds nested tuples such as `((7,7,7), 7, 7)` that `nn.Conv3d` rejects...
perf_spec
a named unit test will fail
`get_conv1`/`ResNet` still require scalar `conv1_t_size`/`conv1_t_stride` instead of per-axis sequences
`code`: `get_conv1(conv1_t_size, conv1_t_stride, conv1_s_size, conv1_s_stride)` keeps `conv1_t_size`/`conv1_t_stride` typed and used as plain `int`s (`conv1_t_size // 2`, tuple literals `(conv1_t_size, conv1_s_size, conv1_s_size)`), and `ResNet.__init__` declares `conv1_t_size: int = 7, conv1_t_stride: int = 1` plus tw...
The tests instantiate ResNet variants (directly and via the net-adapter's backbone) passing the kernel/stride for the first conv as a per-dimension sequence under the existing argument names, e.g. `conv1_t_size=(7, 7, 7)` / `conv1_t_stride=(2, 2, 2)` (and the 2-D/1-D equivalents), and then assert the output shape of `n...
With a sequence argument, `conv1_t_size // 2` in `get_conv1` raises `TypeError: unsupported operand type(s) for //: 'tuple' and 'int'` (or builds nested tuples such as `((7,7,7), 7, 7)` that `nn.Conv3d` rejects), so every parametrized construction fails before any shape assertion; the isotropy option was added under ne...
tests/test_net_adapter.py::TestNetAdapter::test_shape_0
### `get_conv1`/`ResNet` still require scalar `conv1_t_size`/`conv1_t_stride` instead of per-axis sequences - **Input condition**: `code`: `get_conv1(conv1_t_size, conv1_t_stride, conv1_s_size, conv1_s_stride)` keeps `conv1_t_size`/`conv1_t_stride` typed and used as plain `int`s (`conv1_t_size // 2`, tuple literals `(c...
stb100r2__Project-MONAI__MONAI-3946__spec__get-conv1---resnet--still-require-scalar--c__768bc8ff4487.md
Project-MONAI__MONAI-3946
Project-MONAI/MONAI
swe-gym
swe_100
100
c71516b0a8a7
69fa30b4e26fd97f
`run_ast_checks` was rewritten to use non-existent `plugins.ast`/`processor.tree` and reports positionally `self.plugins.ast` does not exist on the `Checkers` namedtuple (the tree plugins live in `.tree`), so `run_ast_checks()` raises `AttributeError` before any report happens; even if that resolved, the code reads `se...
- `run_ast_checks` was rewritten to use non-existent `plugins.ast`/`processor.tree` and reports positionally `self.plugins.ast` does not exist on the `Checkers` namedtuple (the tree plugins live in `.tree`), so `run_ast_checks()` raises `AttributeError` before any report happens; even if that resolved, the code rea...
perf_spec
a named unit test will fail
`run_ast_checks` was rewritten to use non-existent `plugins.ast`/`processor.tree` and reports positionally
`code`: `FileChecker.run_ast_checks` is the new body that iterates `for plugin in self.plugins.ast:`, constructs `plugin.obj(self.processor.tree, filename=self.filename)`, and calls `self.report(None, line_number, column, message)`.
The test builds a `FileChecker` whose `plugins` is `finder.load_plugins(...).checkers` (a `Checkers` namedtuple with fields `tree`, `logical_line`, `physical_line`), stubs `file_checker.processor.build_ast = lambda: True`, replaces `file_checker.report` with a Mock, calls `file_checker.run_ast_checks()`, and asserts `r...
`self.plugins.ast` does not exist on the `Checkers` namedtuple (the tree plugins live in `.tree`), so `run_ast_checks()` raises `AttributeError` before any report happens; even if that resolved, the code reads `self.processor.tree` instead of calling the stubbed `build_ast()`, instantiates the plugin directly (so `plug...
tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]
### `run_ast_checks` was rewritten to use non-existent `plugins.ast`/`processor.tree` and reports positionally - **Input condition**: `code`: `FileChecker.run_ast_checks` is the new body that iterates `for plugin in self.plugins.ast:`, constructs `plugin.obj(self.processor.tree, filename=self.filename)`, and calls `sel...
stb100r2__PyCQA__flake8.cf1542ce.combine_file__knaurfrv__spec__run-ast-checks--was-rewritten-to-use-non-ex__c71516b0a8a7.md
PyCQA__flake8.cf1542ce.combine_file__knaurfrv
PyCQA/flake8
swe-smith
swe_100
100
d1800fda5500
56df1220fb3838d0
`decorator` never special-cases a `(call, *, kwonly)` deco, so bare `add(ten)` is treated as passing a decorator argument `add` is a decorator-argument fab, so `add(ten)` binds the *function* `ten` as a decorator argument (`dargs=(ten,)`) instead of decorating it; `add(ten)` returns a decorator, and calling it with `(1...
- `decorator` never special-cases a `(call, *, kwonly)` deco, so bare `add(ten)` is treated as passing a decorator argument `add` is a decorator-argument fab, so `add(ten)` binds the *function* `ten` as a decorator argument (`dargs=(ten,)`) instead of decorating it; `add(ten)` returns a decorator, and calling it wi...
perf_spec
a named unit test will fail
`decorator` never special-cases a `(call, *, kwonly)` deco, so bare `add(ten)` is treated as passing a decorator argument
`code`: the only change is to `Call.__getattr__` in `funcy/decorators.py`; `decorator()` still classifies `deco` only as "single arg" vs. "takes decorator arguments", with no `has_1pos_and_kwonly` branch whose fab accepts an optional positional `_func` (`def decorator_fab(_func=None, **dkwargs): if _func is not None: r...
with `@decorator def add(call, *, n=1): return call() + n` and `def ten(a, b): return 10`, the test asserts all three forms work: `add(n=2)(ten)(1, 2) == 12`, `add()(ten)(1, 2) == 11`, and — crucially, without parentheses — `add(ten)(1, 2) == 11`.
`add` is a decorator-argument fab, so `add(ten)` binds the *function* `ten` as a decorator argument (`dargs=(ten,)`) instead of decorating it; `add(ten)` returns a decorator, and calling it with `(1, 2)
tests/test_decorators.py::test_decorator_kw_only_args
### `decorator` never special-cases a `(call, *, kwonly)` deco, so bare `add(ten)` is treated as passing a decorator argument - **Input condition**: `code`: the only change is to `Call.__getattr__` in `funcy/decorators.py`; `decorator()` still classifies `deco` only as "single arg" vs. "takes decorator arguments", with...
stb100r2__Suor__funcy.207a7810.combine_file__4ho5rovv__spec__decorator--never-special-cases-a---call__d1800fda5500.md
Suor__funcy.207a7810.combine_file__4ho5rovv
Suor/funcy
swe-smith
swe_100
100
c5cc15838c5d
0a47e54178e8e5e6
Mapping branch uses `f.get`, so missing keys yield None instead of raising KeyError / hitting defaultdict factory `dict.get(2)` returns `None` without raising, so `pytest.raises(KeyError)` fails with `Failed: DID NOT RAISE`; likewise `defaultdict.get('b')` bypasses `__missing__` and returns `None`, not `0`, so that ass...
- Mapping branch uses `f.get`, so missing keys yield None instead of raising KeyError / hitting defaultdict factory `dict.get(2)` returns `None` without raising, so `pytest.raises(KeyError)` fails with `Failed: DID NOT RAISE`; likewise `defaultdict.get('b')` bypasses `__missing__` and returns `None`, not `0`, so th...
perf_spec
a named unit test will fail
Mapping branch uses `f.get`, so missing keys yield None instead of raising KeyError / hitting defaultdict factory
`code`: in `make_func`, the `elif isinstance(f, Mapping):` branch is left returning the mapping's `.get` method (unchanged by the diff) rather than `f.__getitem__`.
the test does `with pytest.raises(KeyError): make_func({1: 'a'})(2)` and, for `d = defaultdict(int, a=42)`, `assert make_func(d)('b') == 0`.
`dict.get(2)` returns `None` without raising, so `pytest.raises(KeyError)` fails with `Failed: DID NOT RAISE`; likewise `defaultdict.get('b')` bypasses `__missing__` and returns `None`, not `0`, so that assertion would also fail. Only `__getitem__` produces both behaviours.
tests/test_funcmakers.py::test_dict
### Mapping branch uses `f.get`, so missing keys yield None instead of raising KeyError / hitting defaultdict factory - **Input condition**: `code`: in `make_func`, the `elif isinstance(f, Mapping):` branch is left returning the mapping's `.get` method (unchanged by the diff) rather than `f.__getitem__`. - **Code requi...
stb100r2__Suor__funcy.207a7810.func_basic__eai94wpv__spec__mapping-branch-uses--f-get---so-missing-keys__c5cc15838c5d.md
Suor__funcy.207a7810.func_basic__eai94wpv
Suor/funcy
swe-smith
swe_100
100
1633cbbe5d8c
387f2c4f252962cd
The stack-unwinding loop in `_check` was deleted, so `context['stack']` is never popped for block entries/keys and the indentation rule (active via `extends: default`) reports bogus problems on every document
- The stack-unwinding loop in `_check` was deleted, so `context['stack']` is never popped for block entries/keys and the indentation rule (active via `extends: default`) reports bogus problems on every document
perf_spec
a named unit test will fail
The stack-unwinding loop in `_check` was deleted, so `context['stack']` is never popped for block entries/keys and the indentation rule (active via `extends: default`) reports bogus problems on every document
`code`: the rewritten `yamllint/rules/indentation.py` `_check()` no longer contains the `while True:` unwinding block that popped `B_ENT`, `KEY`, `VAL`, `B_MAP`, `B_SEQ`, `F_SEQ`, `F_MAP` parents; the only pops left are the single `context['stack'].pop()` inside the `ValueToken` branch and one unconditional pop on `Blo...
tests/rules/test_anchors.py::AnchorsTestCase::test_disabled
### The stack-unwinding loop in `_check` was deleted, so `context['stack']` is never popped for block entries/keys and the indentation rule (active via `extends: default`) reports bogus problems on every document - **Input condition**: `code`: the rewritten `yamllint/rules/indentation.py` `_check()` no longer contains ...
stb100r2__adrienverge__yamllint.8513d9b9.lm_rewrite__l9cqhhm2__spec__the-stack-unwinding-loop-in---check--was-del__1633cbbe5d8c.md
adrienverge__yamllint.8513d9b9.lm_rewrite__l9cqhhm2
adrienverge/yamllint
swe-smith
swe_100
100
a6b3b9c4e223
7a17baf2f7b9bd6f
Problem column is the absolute buffer offset instead of the column within the last line For that buffer `line.start` is 19 (`'---\n'` = 4 chars plus `'yaml: document\n'` = 15) and `line.end` is 22 (full buffer length), so the rule yields column `22 + 1 = 23` and the assertion against `(3, 4)` fails. It only appears cor...
- Problem column is the absolute buffer offset instead of the column within the last line For that buffer `line.start` is 19 (`'---\n'` = 4 chars plus `'yaml: document\n'` = 15) and `line.end` is 22 (full buffer length), so the rule yields column `22 + 1 = 23` and the assertion against `(3, 4)` fails. It only appea...
perf_spec
a named unit test will fail
Problem column is the absolute buffer offset instead of the column within the last line
`code`: `new_line_at_end_of_file.check()` builds the `LintProblem` with `line.end + 1` as the column, where `line.end` is an index into the whole buffer, and never subtracts `line.start`.
The test calls `self.check('---\n' 'yaml: document\n' '...', conf, problem=(3, 4))`, i.e. for a 3-line buffer whose last line is `...`, the reported problem must be at line 3, **column 4** (one past the 3 characters of that line). Same requirement in `tests/test_cli.py`, which expects `3:4 [new-line-at-end-of-file]` fo...
For that buffer `line.start` is 19 (`'---\n'` = 4 chars plus `'yaml: document\n'` = 15) and `line.end` is 22 (full buffer length), so the rule yields column `22 + 1 = 23` and the assertion against `(3, 4)` fails. It only appears correct for the single-line case `self.check('word', conf, problem=(1, 5))`, where `line.st...
tests/rules/test_new_line_at_end_of_file.py::NewLineAtEndOfFileTestCase::test_enabled
### Problem column is the absolute buffer offset instead of the column within the last line - **Input condition**: `code`: `new_line_at_end_of_file.check()` builds the `LintProblem` with `line.end + 1` as the column, where `line.end` is an index into the whole buffer, and never subtracts `line.start`. - **Code requirem...
stb100r2__adrienverge__yamllint.8513d9b9.lm_rewrite__rp4ruoig__spec__problem-column-is-the-absolute-buffer-offset__a6b3b9c4e223.md
adrienverge__yamllint.8513d9b9.lm_rewrite__rp4ruoig
adrienverge/yamllint
swe-smith
swe_100
100
2cf0ce5275de
65f4f31ff0000a4e
Argument path element built with `add_class_prefix=False`, dropping the "class " prefix for class arguments the passed value is the class `int`, and `qualified_name(int, add_class_prefix=False)` returns `"int"` rather than `"class int"` (the prefix is only added when `add_class_prefix=True`). The exception is raised (s...
- Argument path element built with `add_class_prefix=False`, dropping the "class " prefix for class arguments the passed value is the class `int`, and `qualified_name(int, add_class_prefix=False)` returns `"int"` rather than `"class int"` (the prefix is only added when `add_class_prefix=True`). The exception is rai...
perf_spec
a named unit test will fail
Argument path element built with `add_class_prefix=False`, dropping the "class " prefix for class arguments
`code`: in `check_argument_types` (src/typeguard/_functions.py), the failure path builds the path element as `qualname = qualified_name(value, add_class_prefix=False)` and then `exc.append_path_element(f'argument "{argname}" ({qualname})')`.
the test calls `Foo().method(int)` and asserts the raised `TypeCheckError` matches `rf'argument "subclass" \(class int\) is not a subclass of the self type \(...\)'` — i.e. the argument's path element must read `argument "subclass" (class int)`.
the passed value is the class `int`, and `qualified_name(int, add_class_prefix=False)` returns `"int"` rather than `"class int"` (the prefix is only added when `add_class_prefix=True`). The exception is raised (so the test no longer errors on "DID NOT RAISE"), but its message is `argument "subclass" (int) is not a subc...
tests/test_typechecked.py::TestSelf::test_self_type_invalid
### Argument path element built with `add_class_prefix=False`, dropping the "class " prefix for class arguments - **Input condition**: `code`: in `check_argument_types` (src/typeguard/_functions.py), the failure path builds the path element as `qualname = qualified_name(value, add_class_prefix=False)` and then `exc.app...
stb100r2__agronholm__typeguard.b6a7e438.func_basic__1vy7d8i5__spec__argument-path-element-built-with--add-class__2cf0ce5275de.md
agronholm__typeguard.b6a7e438.func_basic__1vy7d8i5
agronholm/typeguard
swe-smith
swe_100
100
e1ab06d28721
f74d5550d7936a29
"Too few arguments" error message does not use the wording the test matches With 3 mandatory positional params and `expected_param_count == 2`, the code emits `"has too many mandatory positional arguments (expected 2, but has 3 mandatory)"`. The test's regex requires the literal substring `"in its declaration; expected...
- "Too few arguments" error message does not use the wording the test matches With 3 mandatory positional params and `expected_param_count == 2`, the code emits `"has too many mandatory positional arguments (expected 2, but has 3 mandatory)"`. The test's regex requires the literal substring `"in its declaration; ex...
perf_spec
a named unit test will fail
"Too few arguments" error message does not use the wording the test matches
`code`: `check_callable` raises `TypeCheckError(f"has too many mandatory positional arguments (expected {expected_param_count}, but has {mandatory_positional_count} mandatory)")`.
for `def some_callable(x: int, y: str, z: float) -> int`, `check_type(some_callable, Callable[[int, str], int])` must raise a `TypeCheckError` matching `r"has too many mandatory positional arguments in its declaration; expected 2 but 3 mandatory positional argument\(s\) declared"`.
With 3 mandatory positional params and `expected_param_count == 2`, the code emits `"has too many mandatory positional arguments (expected 2, but has 3 mandatory)"`. The test's regex requires the literal substring `"in its declaration; expected 2 but 3 mandatory positional argument(s) declared"`, which is abs
tests/test_checkers.py::TestCallable::test_too_few_arguments
### "Too few arguments" error message does not use the wording the test matches - **Input condition**: `code`: `check_callable` raises `TypeCheckError(f"has too few positional arguments (expected {expected_param_count}, got {actual_positional_count})")` when the callable declares fewer positional params than the `Calla...
stb100r2__agronholm__typeguard.b6a7e438.func_pm_remove_cond__oomrm2nz__spec__too-few-arguments--error-message-does-not-u__e1ab06d28721.md
agronholm__typeguard.b6a7e438.func_pm_remove_cond__oomrm2nz
agronholm/typeguard
swe-smith
swe_100
100
c6b78ded76f1
1bf49396924ab5f9
The " processed" suffix is only removed from AlignedIndentFilter, not from the filter actually used by `reindent=True` with `reindent=True` (and no `indent_aligned`), `AlignedIndentFilter` is never instantiated, so the edited `process` is not on the executed path; the untouched site still appends `" processed"`, so the...
- The " processed" suffix is only removed from AlignedIndentFilter, not from the filter actually used by `reindent=True` with `reindent=True` (and no `indent_aligned`), `AlignedIndentFilter` is never instantiated, so the edited `process` is not on the executed path; the untouched site still appends `" processed"`, ...
perf_spec
a named unit test will fail
The " processed" suffix is only removed from AlignedIndentFilter, not from the filter actually used by `reindent=True`
`code`: the only change is in `sqlparse/filters/aligned_indent.py::AlignedIndentFilter.process`; the statement-processing path taken by `sqlparse.format(sql, reindent=True)` (i.e. `ReindentFilter.process` in `sqlparse/filters/reindent.py`, or the shared stmtprocess/`FilterStack.run` step that stringifies statements) st...
the test calls `sqlparse.format('case when foo = 1 then 2 when foo = 3 then 4 else 5 end', reindent=True)` and asserts it equals exactly `'case\n when foo = 1 then 2\n when foo = 3 then 4\n else 5\nend'` — with no trailing text after `end`.
with `reindent=True` (and no `indent_aligned`), `AlignedIndentFilter` is never instantiated, so the edited `process` is not on the executed path; the untouched site still appends `" processed"`, so the returned string is `'...\nend processed'` and the equality assertion fails. The same untouched site explains why unrel...
tests/test_format.py::TestFormatReindent::test_case
### The " processed" suffix is only removed from AlignedIndentFilter, not from the filter actually used by `reindent=True` - **Input condition**: `code`: the only change is in `sqlparse/filters/aligned_indent.py::AlignedIndentFilter.process`; the statement-processing path taken by `sqlparse.format(sql, reindent=True)` ...
stb100r2__andialbrecht__sqlparse.e57923b3.combine_module__ytdlfcl6__spec__the---processed--suffix-is-only-removed-from__c6b78ded76f1.md
andialbrecht__sqlparse.e57923b3.combine_module__ytdlfcl6
andialbrecht/sqlparse
swe-smith
swe_100
100
ae407dd62a7a
dab2f387c06e3e27
`view` wrapper has no branch for a handler returning `None`, so the template is never rendered Both `test` and `test2` return `None`, so `isinstance(None, (dict, DictMixin))` is False and the wrapper falls through to `return result`, returning `None`. `assertEqual(touni('hihi'), None)` fails on the first assertion (and...
- `view` wrapper has no branch for a handler returning `None`, so the template is never rendered Both `test` and `test2` return `None`, so `isinstance(None, (dict, DictMixin))` is False and the wrapper falls through to `return result`, returning `None`. `assertEqual(touni('hihi'), None)` fails on the first assertio...
perf_spec
a named unit test will fail
`view` wrapper has no branch for a handler returning `None`, so the template is never rendered
`code`: the `wrapper` inside `view()` only renders when `isinstance(result, (dict, DictMixin))` is true and otherwise executes `return result`; there is no `elif result is None:` branch rendering `template(tpl_name, **defaults)`.
the test defines `@view('stpl_no_vars')\ndef test(): pass` and asserts `self.assertEqual(touni('hihi'), test())`, and `@view('aaa {{x}}', x='bbb')\ndef test2(): pass` with `self.assertEqual(touni('aaa bbb'), test2())` — i.e. a wrapped function whose body returns `None` must still render the template using only the deco...
Both `test` and `test2` return `None`, so `isinstance(None, (dict, DictMixin))` is False and the wrapper falls through to `return result`, returning `None`. `assertEqual(touni('hihi'), None)` fails on the first assertion (and `assertEqual(touni('aaa bbb'), None)` would fail likewise), since no call to `template('stpl_n...
test/test_stpl.py::TestSimpleTemplate::test_view_decorator_issue_407
### `view` wrapper has no branch for a handler returning `None`, so the template is never rendered - **Input condition**: `code`: the `wrapper` inside `view()` only renders when `isinstance(result, (dict, DictMixin))` is true and otherwise executes `return result`; there is no `elif result is None:` branch rendering `t...
stb100r2__bottlepy__bottle.a8dfef30.lm_rewrite__2dlm381n__spec__view--wrapper-has-no-branch-for-a-handler-r__ae407dd62a7a.md
bottlepy__bottle.a8dfef30.lm_rewrite__2dlm381n
bottlepy/bottle
swe-smith
swe_100
100
5d37f8c261b0
3cc167a0f3f3df8e
Continuation-line branch uses `name`/`value` before they are ever bound `'Bad header'` contains no colon and does not start with space/tab, so the code silently appends `('', 'Bad header')` to `headerlist` and parsing continues to completion, yielding a normal part for `file1`. No `MultipartError` is raised, so `assert...
- Continuation-line branch uses `name`/`value` before they are ever bound `'Bad header'` contains no colon and does not start with space/tab, so the code silently appends `('', 'Bad header')` to `headerlist` and parsing continues to completion, yielding a normal part for `file1`. No `MultipartError` is raised, so `...
perf_spec
a named unit test will fail
Continuation-line branch uses `name`/`value` before they are ever bound
`code`: in `_MultipartPart.write_header`, the non-continuation branch checks for `':' in line` and, in the `else` case commented `# Invalid header line without colon`, does `self.headerlist.append(('', line.strip()))` — it never raises `MultipartError`.
the test writes a part containing the header line `'Bad header\r\n'` (no colon) before the blank line, then calls `self.assertMPError()`, which requires that parsing this payload raise `bottle.MultipartError`.
`'Bad header'` contains no colon and does not start with space/tab, so the code silently appends `('', 'Bad header')` to `headerlist` and parsing continues to completion, yielding a normal part for `file1`. No `MultipartError` is raised, so `assertMPError`'s expected-exception check fails.
test/test_multipart.py::TestMultipartParser::test_multiline_header
### Continuation-line branch uses `name`/`value` before they are ever bound - **Input condition**: `code`: in `_MultipartPart.write_header`, the branch `if line[0] in ' \t' and self.headerlist:` no longer does `name, value = self.headerlist.pop()`; it immediately executes `self.headerlist.append((name, value + ' ' + li...
stb100r2__bottlepy__bottle.a8dfef30.lm_rewrite__nj4ufhd6__spec__continuation-line-branch-uses--name---value__5d37f8c261b0.md
bottlepy__bottle.a8dfef30.lm_rewrite__nj4ufhd6
bottlepy/bottle
swe-smith
swe_100
100
End of preview. Expand in Data Studio

SWE code-quality rubrics — 227 distinct criteria (target 100)

Falsifiable criteria about why a code change fails its tests, mined from agent attempts on real repositories. Each rubric makes one checkable prediction — a named unit test will fail, or a named exception will be raised — so it can be scored against an actual run instead of judged on taste.

This repo is one of three independent libraries collected to different sizes, for studying how a rubric database behaves with scale:

repo distinct criteria
swe-rubrics-10 15
swe-rubrics-100 227
swe-rubrics-1000 1006

They are not nested — each stage shuffled the task pool with its own seed, so the small library is not a subset of the large one.

Quick start (retrieval)

from datasets import load_dataset
from sentence_transformers import SentenceTransformer
import numpy as np

ds = load_dataset("EdwardoSunny/swe-rubrics-100", split="train")
m  = SentenceTransformer("all-MiniLM-L6-v2")

# embed the field that exists for exactly this purpose
index = m.encode(ds["retrieval_text"], normalize_embeddings=True)

def top_k(issue_text, k=8):
    q = m.encode([issue_text], normalize_embeddings=True)[0]
    for i in np.argsort(-(index @ q))[:k]:
        yield ds[int(i)]

# and paste the pre-formatted block straight into a prompt
context = "\n".join(r["prompt_block"] for r in top_k(my_issue))

Two fields exist so you never have to reinvent them:

  • retrieval_text — embed or index this. Title + prediction only; the "input condition" / "code requirement" scaffolding is for judging whether a criterion applies and only dilutes the retrieval signal.
  • prompt_block — paste this. Already formatted for a model's context.

Contents

  • 227 distinct criteria over 70 source repositories
  • families: {'perf_spec': 221, 'error_focused': 6}
  • mined from: {'swe-smith': 199, 'swe-gym': 28}

"Distinct" is post-deduplication: criteria were merged across tasks by an LLM adjudicator (with TF-IDF/embedding recall), so this is a count of surviving criteria rather than of curator calls.

Schema

field meaning
rubric_id stable id assigned at curation
criterion_sha256 hash of the prediction clause; survives rewording
retrieval_text EMBED THIS. title + prediction, nothing else
prompt_block PASTE THIS. pre-formatted for a model's context
family perf_spec
predicate what the rubric asserts, in words
title one-line statement of the defect
input_condition when the criterion applies
code_requirement the ground truth it is checked against
prediction the falsifiable claim
target_failing_test test predicted red (perf_spec)
target_exception_class exception predicted (error_focused)
source_instance_id instance it was mined from
source_repo upstream repo of that instance
source_dataset swe-gym
library swe_10
library_target the K this library was collected to
text the full rubric markdown
source_file original filename

The criterion is stored split into its three clauses because they do different jobs: input_condition scopes when it applies, code_requirement is the ground truth it is checked against, and prediction is the falsifiable claim. Scoring a rubric means checking the prediction; the other two make that check well-defined.

Provenance and the leakage guarantee

Mined only from SWE-Gym and SWE-smith. SWE-bench was never mined — it is the held-out evaluation target.

Every row carries source_instance_id and source_repo, so the guarantee is checkable from the data rather than taken on trust: no row's source_repo appears in any of SWE-bench's 18 evaluation repos. Audited at export with 0 hits and 0 untraceable rows.

Held out: astropy/astropy, django/django, marshmallow-code/marshmallow, matplotlib/matplotlib, mwaskom/seaborn, pallets/flask, psf/requests, pvlib/pvlib-python, pydata/xarray, pydicom/pydicom, pylint-dev/astroid, pylint-dev/pylint, pytest-dev/pytest, pyvista/pyvista, scikit-learn/scikit-learn, sphinx-doc/sphinx, sqlfluff/sqlfluff, sympy/sympy

Families

  • perf_spec — the code runs and is wrong; predicts a failing unit test. This dominates, because SWE work is mostly "runs and gives the wrong answer" rather than "crashes".
  • error_focused — the change makes the module unimportable or otherwise raises; predicts an exception class.
  • error_grader — the grader rejects the output.

Limitations

  • Mined with a small tool-loop agent, so the failure modes reflect what that agent gets wrong — not the whole space of code defects.
  • error_focused is a small minority. Crashes are genuinely rare in this domain; the family is thin by nature, not by neglect.
  • No precision/recall is published here. Distinctness and provenance are measured; predictive quality is not, and should not be assumed.
Downloads last month
31