repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_javascript.py | test_get_entities_from_file_js_function_expression | assert | string_literal | 20 | import re
import warnings
import pytest
from swesmith.bug_gen.adapters.javascript import get_entities_from_file_js
def entities(test_file_js):
entities = []
get_entities_from_file_js(entities, test_file_js)
return entities
def test_get_entities_from_file_js_function_expression(tmp_path):
func_expr_f... | "myFunc" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php | assert | numeric_literal | 9 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php(test_file_php):
entities = []
get_entities_from_file_php(entities, test_file_php)
assert len(entities) == | 5 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php_max | assert | numeric_literal | 13 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php_max(test_file_php):
"""Should cap the number of returned entities when *max_entities* is set."""
entities: list = []
get_entities_from_file_php(entities, test_file_php, 3)
# Only three ent... | 3 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php_no_entities | assert | numeric_literal | 13 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php_no_entities(tmp_path):
"""A PHP file with no top-level functions, methods or classes yields no entities."""
no_entities_file = tmp_path / "no_entities.php"
no_entities_file.write_text("<?php\n/... | 0 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_php_entity_one_line_function | assert | numeric_literal | 14 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_php_entity_one_line_function(tmp_path):
"""Correctly pick up a function that lives entirely on one line."""
one_line_file = tmp_path / "one_line.php"
one_line_file.write_text("<?php\nfunction one_line_function() { return... | 1 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php_unreadable | assert | collection | 12 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php_unreadable():
"""Asserting that unreadable / non-existent files are handled gracefully."""
entities: list = []
# The adapter swallows exceptions internally and simply returns the (still
# e... | [] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php | assert | variable | 18 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php(test_file_php):
entities = []
get_entities_from_file_php(entities, test_file_php)
assert len(entities) == 5
names = [e.name for e in entities]
for name in [
"ControllerDispatche... | names | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php | assert | variable | 59 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php(test_file_php):
entities = []
get_entities_from_file_php(entities, test_file_php)
assert len(entities) == 5
names = [e.name for e in entities]
for name in [
"ControllerDispatche... | stubs | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php | assert | variable | 28 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php(test_file_php):
entities = []
get_entities_from_file_php(entities, test_file_php)
assert len(entities) == 5
names = [e.name for e in entities]
for name in [
"ControllerDispatche... | start_end | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php | assert | variable | 47 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php(test_file_php):
entities = []
get_entities_from_file_php(entities, test_file_php)
assert len(entities) == 5
names = [e.name for e in entities]
for name in [
"ControllerDispatche... | signatures | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_php_entity_one_line_function | assert | string_literal | 16 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_php_entity_one_line_function(tmp_path):
"""Correctly pick up a function that lives entirely on one line."""
one_line_file = tmp_path / "one_line.php"
one_line_file.write_text("<?php\nfunction one_line_function() { return... | "one_line_function" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_php_entity_multi_line_signature | assert | string_literal | 18 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_php_entity_multi_line_signature(tmp_path):
"""Multi-line function signatures should be preserved in *signature*."""
multi_line_file = tmp_path / "multi_line.php"
multi_line_file.write_text(
"<?php\nfunction multi... | "multi_line_function" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_php_entity_one_line_function | assert | string_literal | 17 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_php_entity_one_line_function(tmp_path):
"""Correctly pick up a function that lives entirely on one line."""
one_line_file = tmp_path / "one_line.php"
one_line_file.write_text("<?php\nfunction one_line_function() { return... | "function one_line_function()" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_php_entity_multi_line_signature | assert | string_literal | 19 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_php_entity_multi_line_signature(tmp_path):
"""Multi-line function signatures should be preserved in *signature*."""
multi_line_file = tmp_path / "multi_line.php"
multi_line_file.write_text(
"<?php\nfunction multi... | "function multi_line_function(\n $param1,\n $param2\n)" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_php_entity_one_line_function | assert | string_literal | 18 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_php_entity_one_line_function(tmp_path):
"""Correctly pick up a function that lives entirely on one line."""
one_line_file = tmp_path / "one_line.php"
one_line_file.write_text("<?php\nfunction one_line_function() { return... | "function one_line_function() {\n\t// TODO: Implement this function\n}" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_php.py | test_get_entities_from_file_php_max | assert | collection | 14 | from swesmith.bug_gen.adapters.php import (
get_entities_from_file_php,
)
def test_get_entities_from_file_php_max(test_file_php):
"""Should cap the number of returned entities when *max_entities* is set."""
entities: list = []
get_entities_from_file_php(entities, test_file_php, 3)
# Only three ent... | [ "ControllerDispatcher", "ControllerDispatcher::__construct", "ControllerDispatcher::dispatch", ] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_get_entities_from_file_py_count | assert | numeric_literal | 19 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def entities(test_file_py):
entities = []
get_entities_from_file_py(entities, test_file_py)
return sorted(entities, key=lamb... | 13 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_signature_no_args | assert | string_literal | 16 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def test_signature_no_args():
code = "def bar(): pass"
node = parse_func(code)
assert _build_entity(node, code, "test.py").... | "def bar()" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_signature_varargs | assert | string_literal | 16 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def test_signature_varargs():
code = "def qux(*args, **kwargs): pass"
node = parse_func(code)
assert _build_entity(node, co... | "def qux()" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_get_entities_from_file_py_names | assert | variable | 35 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def entities(test_file_py):
entities = []
get_entities_from_file_py(entities, test_file_py)
return sorted(entities, key=lamb... | expected_name | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_get_entities_from_file_py_stubs | assert | variable | 35 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def entities(test_file_py):
entities = []
get_entities_from_file_py(entities, test_file_py)
return sorted(entities, key=lamb... | expected_stub | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_signature_simple | assert | string_literal | 16 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def test_signature_simple():
code = "def foo(a, b): pass"
node = parse_func(code)
assert _build_entity(node, code, "test.py... | "def foo(a, b)" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_signature_with_defaults | assert | string_literal | 16 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def test_signature_with_defaults():
code = "def baz(a, b=2): pass"
node = parse_func(code)
assert _build_entity(node, code,... | "def baz(a, b)" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_get_entities_from_file_py_signatures | assert | variable | 35 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def entities(test_file_py):
entities = []
get_entities_from_file_py(entities, test_file_py)
return sorted(entities, key=lamb... | expected_signature | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_get_entities_from_file_py_line_ranges | assert | collection | 35 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def entities(test_file_py):
entities = []
get_entities_from_file_py(entities, test_file_py)
return sorted(entities, key=lamb... | (expected_start, expected_end) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_python.py | test_signature_annotations | assert | string_literal | 16 | import ast
import pytest
from swesmith.bug_gen.adapters.python import (
get_entities_from_file_py,
_build_entity,
)
def parse_func(code):
return ast.parse(code).body[0]
def test_signature_annotations():
code = "def annotated(a: int, b: str) -> None: pass"
node = parse_func(code)
assert | "def annotated(a: int, b: str)" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_get_entities_from_file_rb_max | assert | numeric_literal | 18 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_get_entities_from_fil... | 3 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_get_entities_from_file_rb_no_functions | assert | numeric_literal | 20 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_get_entities_from_fil... | 0 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_one_line_method | assert | numeric_literal | 20 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_one_line_... | 1 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_get_entities_from_file_ruby_complexity_other_expressions | assert | numeric_literal | 33 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
@pytest.mark.parametrize(
... | 2 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | ruby_test_file_entities | assert | numeric_literal | 13 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
@pytest.fixture
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == | 12 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_names | assert | variable | 31 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_names(rub... | names | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_get_entities_from_file_rb_unreadable | pytest.raises | variable | 16 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_get_entities_from_fil... | IOError) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_file_positions | assert | variable | 31 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_file_posi... | start_end | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_get_entities_from_file_ruby_complexity | assert | variable | 31 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_get_entities_from_fil... | expected_scores | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_one_line_method | assert | string_literal | 21 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_one_line_... | "one_line_method" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_signatures | assert | variable | 17 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_signature... | FUNCTION_SIGNATURES | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_one_line_method | assert | string_literal | 22 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_one_line_... | "def one_line_method" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_multi_line_signature | assert | string_literal | 30 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_multi_lin... | "multi_line_signature" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_get_entities_from_file_rb_max | assert | collection | 19 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_get_entities_from_fil... | ["make_default", "initialize", "parse_query"] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_multi_line_signature | assert | string_literal | 31 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_multi_lin... | "def multi_line_signature(\n multiple,\n lines\n)" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_ruby.py | test_ruby_entity_stubs | assert | collection | 17 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.ruby import (
get_entities_from_file_rb,
)
def ruby_test_file_entities(test_file_ruby):
entities = []
get_entities_from_file_rb(entities, test_file_ruby)
assert len(entities) == 12
return entities
def test_ruby_entity_stubs(rub... | [ f"{fs}\n\t# TODO: Implement this function\nend" for fs in FUNCTION_SIGNATURES ] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_max | assert | numeric_literal | 18 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_max(test_file_rust):
entities = []
... | 3 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_no_functions | assert | numeric_literal | 20 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_no_functions(tmp_path):
no_functions... | 0 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_count | assert | numeric_literal | 16 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_count(entities):
assert len(entitie... | 19 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_unreadable | pytest.raises | variable | 16 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_unreadable():
with pytest.raises( | IOError) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_names | assert | variable | 38 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_names(entities):
names = [e.name for... | expected_names | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_stubs | assert | variable | 38 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_stubs(entities):
stubs = [e.stub for... | expected_stubs | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_line_ranges | assert | variable | 38 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_line_ranges(entities):
start_end = [... | expected_ranges | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/adapters/test_rust.py | test_get_entities_from_file_rs_signatures | assert | variable | 38 | import pytest
import re
import warnings
from swesmith.bug_gen.adapters.rust import (
get_entities_from_file_rs,
)
def entities(test_file_rust):
entities = []
get_entities_from_file_rs(entities, test_file_rust)
return entities
def test_get_entities_from_file_rs_signatures(entities):
signatures = [... | expected_signatures | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/llm/test_utils_llm.py | test_extract_code_block_no_block | assert | string_literal | 6 | from swesmith.bug_gen.llm.utils import extract_code_block
def test_extract_code_block_no_block():
text = "No code block here."
assert extract_code_block(text) == | "" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/llm/test_utils_llm.py | test_extract_code_block_multiple_blocks | assert | string_literal | 11 | from swesmith.bug_gen.llm.utils import extract_code_block
def test_extract_code_block_multiple_blocks():
text = """
```python\nfirst = True\n```
Some text
```python\nsecond = False\n```
"""
# Should extract only the first block
assert extract_code_block(text) == | "first = True" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/llm/test_utils_llm.py | test_extract_code_block_basic | assert | string_literal | 9 | from swesmith.bug_gen.llm.utils import extract_code_block
def test_extract_code_block_basic():
text = """
Here is some code:
```python\nprint('hello')\n```
"""
assert extract_code_block(text) == | "print('hello')" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/llm/test_utils_llm.py | test_extract_code_block_strip_whitespace | assert | string_literal | 8 | from swesmith.bug_gen.llm.utils import extract_code_block
def test_extract_code_block_strip_whitespace():
text = """
```\n a = 1\n b = 2 \n\n```
"""
assert extract_code_block(text) == | "a = 1\n b = 2" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/llm/test_utils_llm.py | test_extract_code_block_no_language | assert | string_literal | 9 | from swesmith.bug_gen.llm.utils import extract_code_block
def test_extract_code_block_no_language():
text = """
Example:
```\nfoo = 1\nbar = 2\n```
"""
assert extract_code_block(text) == | "foo = 1\nbar = 2" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_control_flow.py | test_control_if_else_invert | assert | numeric_literal | 13 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.control_flow import (
ControlIfElseInvertModifier,
ControlShuffleLinesModifier,
)
def test_control_if_else_invert(test_file_go_caddy_usagepool):
entities = []
get_entities_from_file_go(entitie... | 3 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_control_flow.py | test_control_if_else_invert | assert | variable | 50 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.control_flow import (
ControlIfElseInvertModifier,
ControlShuffleLinesModifier,
)
def test_control_if_else_invert(test_file_go_caddy_usagepool):
entities = []
get_entities_from_file_go(entitie... | expected | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_operations.py | test_operation_change | assert | numeric_literal | 22 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.operations import (
OperationChangeModifier,
OperationFlipOperatorModifier,
OperationSwapOperandsModifier,
OperationBreakChainsModifier,
OperationChangeConstantsModifier,
)
import random
d... | 17 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_operations.py | test_operation_change | assert | none_literal | 31 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.operations import (
OperationChangeModifier,
OperationFlipOperatorModifier,
OperationSwapOperandsModifier,
OperationBreakChainsModifier,
OperationChangeConstantsModifier,
)
import random
d... | None | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_operations.py | test_operation_change | assert | complex_expr | 36 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.operations import (
OperationChangeModifier,
OperationFlipOperatorModifier,
OperationSwapOperandsModifier,
OperationBreakChainsModifier,
OperationChangeConstantsModifier,
)
import random
d... | test_entity.src_code | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_remove.py | test_remove_loop | assert | numeric_literal | 19 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.remove import (
RemoveLoopModifier,
RemoveConditionalModifier,
RemoveAssignModifier,
)
import random
def test_remove_loop(test_file_go_caddy_listeners):
entities = []
get_entities_from_fil... | 4 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_remove.py | test_remove_conditional | assert | numeric_literal | 19 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.remove import (
RemoveLoopModifier,
RemoveConditionalModifier,
RemoveAssignModifier,
)
import random
def test_remove_conditional(test_file_go_caddy_listeners):
entities = []
get_entities_f... | 16 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_remove.py | test_remove_assign | assert | numeric_literal | 19 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.remove import (
RemoveLoopModifier,
RemoveConditionalModifier,
RemoveAssignModifier,
)
import random
def test_remove_assign(test_file_go_caddy_listeners):
entities = []
get_entities_from_f... | 14 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/golang/test_go_remove.py | test_remove_loop | assert | variable | 24 | from swesmith.bug_gen.adapters.golang import get_entities_from_file_go
from swesmith.bug_gen.procedural.golang.remove import (
RemoveLoopModifier,
RemoveConditionalModifier,
RemoveAssignModifier,
)
import random
def test_remove_loop(test_file_go_caddy_listeners):
entities = []
get_entities_from_fil... | expected | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/python/test_py_control_flow.py | test_control_if_else_invert | assert | func_call | 47 | import libcst
import pytest
from swesmith.bug_gen.procedural.python.control_flow import (
ControlIfElseInvertModifier,
ControlShuffleLinesModifier,
)
@pytest.mark.parametrize(
"src,expected",
[
# Simple if-else inversion
(
"""
def foo(x):
if x > 0:
return 1
e... | expected.strip() | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/procedural/python/test_py_remove.py | test_remove_loop | assert | func_call | 45 | import libcst
import pytest
from swesmith.bug_gen.procedural.python.remove import (
RemoveLoopModifier,
RemoveConditionalModifier,
RemoveAssignModifier,
RemoveWrapperModifier,
)
@pytest.mark.parametrize(
"src,expected",
[
# Remove for loop
(
"""
def foo():
for i ... | expected.strip() | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/test_utils.py | test_get_combos | self.assertEqual | numeric_literal | 33 | import ast
import os
import shutil
import tempfile
import unittest
from unittest.mock import Mock
from pathlib import Path
from swesmith.bug_gen.adapters.python import _build_entity
from swesmith.bug_gen import utils
class TestUtils(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
... | 2) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/test_utils.py | test_apply_patches | self.assertIsInstance | variable | 67 | import ast
import os
import shutil
import tempfile
import unittest
from unittest.mock import Mock
from pathlib import Path
from swesmith.bug_gen.adapters.python import _build_entity
from swesmith.bug_gen import utils
class TestUtils(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
... | str) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/test_utils.py | test_apply_code_change | self.assertIn | variable | 44 | import ast
import os
import shutil
import tempfile
import unittest
from unittest.mock import Mock
from pathlib import Path
from swesmith.bug_gen.adapters.python import _build_entity
from swesmith.bug_gen import utils
class TestUtils(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
... | content) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/test_utils.py | test_get_bug_directory | self.assertEqual | variable | 36 | import ast
import os
import shutil
import tempfile
import unittest
from unittest.mock import Mock
from pathlib import Path
from swesmith.bug_gen.adapters.python import _build_entity
from swesmith.bug_gen import utils
class TestUtils(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
... | bug_dir) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/test_utils.py | test_get_entity_from_node | self.assertIn | complex_expr | 37 | import ast
import os
import shutil
import tempfile
import unittest
from unittest.mock import Mock
from pathlib import Path
from swesmith.bug_gen.adapters.python import _build_entity
from swesmith.bug_gen import utils
class TestUtils(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
... | entity.src_code) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/bug_gen/test_utils.py | test_get_combos | self.assertTrue | func_call | 34 | import ast
import os
import shutil
import tempfile
import unittest
from unittest.mock import Mock
from pathlib import Path
from swesmith.bug_gen.adapters.python import _build_entity
from swesmith.bug_gen import utils
class TestUtils(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
... | all(len(c) >= 2 for c in combos)) | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_eval.py | test_eval_artifacts_exist_and_valid | assert | numeric_literal | 30 | import json
import pytest
from swesmith.harness.eval import main as run_evaluation
@pytest.mark.parametrize(
"instance_id",
[
"pandas-dev__pandas.95280573.pr_53652",
"pydantic__pydantic.acb0f10f.pr_8316",
],
)
def test_eval_artifacts_exist_and_valid(logs_run_evaluation, instance_id):
i... | 0 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_eval.py | test_eval_artifacts_exist_and_valid | assert | variable | 24 | import json
import pytest
from swesmith.harness.eval import main as run_evaluation
@pytest.mark.parametrize(
"instance_id",
[
"pandas-dev__pandas.95280573.pr_53652",
"pydantic__pydantic.acb0f10f.pr_8316",
],
)
def test_eval_artifacts_exist_and_valid(logs_run_evaluation, instance_id):
i... | report | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_eval.py | test_eval_artifacts_exist_and_valid | assert | variable | 31 | import json
import pytest
from swesmith.harness.eval import main as run_evaluation
@pytest.mark.parametrize(
"instance_id",
[
"pandas-dev__pandas.95280573.pr_53652",
"pydantic__pydantic.acb0f10f.pr_8316",
],
)
def test_eval_artifacts_exist_and_valid(logs_run_evaluation, instance_id):
i... | content | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_eval.py | test_eval_summary_report | assert | variable | 12 | import json
import pytest
from swesmith.harness.eval import main as run_evaluation
def test_eval_summary_report(logs_run_evaluation):
summary_path = logs_run_evaluation / "report.json"
assert summary_path.exists(), "Missing summary report.json"
with open(summary_path) as f:
summary = json.load(f)
... | summary | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_eval_pattern_matching.py | test_exact_match | assert | bool_literal | 9 | import pytest
from swesmith.harness.eval import matches_instance_filter
class TestInstanceFilterMatching:
def test_exact_match(self):
"""Test exact matching of instance IDs."""
assert matches_instance_filter("exact_match", ["exact_match"]) is | True | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_eval_pattern_matching.py | test_exact_match | assert | bool_literal | 10 | import pytest
from swesmith.harness.eval import matches_instance_filter
class TestInstanceFilterMatching:
def test_exact_match(self):
"""Test exact matching of instance IDs."""
assert matches_instance_filter("exact_match", ["exact_match"]) is True
assert matches_instance_filter("exact_mat... | False | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_grading.py | test_get_eval_tests_report_basic | assert | collection | 32 | import json
from swebench.harness.constants import (
KEY_INSTANCE_ID,
KEY_MODEL,
KEY_PREDICTION,
TestStatus,
)
from swesmith.harness import grading
def test_get_eval_tests_report_basic():
# Use the imported TestStatus
gold_results = {
"FAIL_TO_PASS": ["test1", "test2"],
"PASS_T... | [] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_grading.py | test_read_test_output | assert | variable | 50 | import json
from swebench.harness.constants import (
KEY_INSTANCE_ID,
KEY_MODEL,
KEY_PREDICTION,
TestStatus,
)
from swesmith.harness import grading
def test_read_test_output(logs_run_evaluation):
instance_id = "pandas-dev__pandas.95280573.pr_53652"
test_output_path = logs_run_evaluation / inst... | expected | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_grading.py | test_get_eval_tests_report_basic | assert | collection | 29 | import json
from swebench.harness.constants import (
KEY_INSTANCE_ID,
KEY_MODEL,
KEY_PREDICTION,
TestStatus,
)
from swesmith.harness import grading
def test_get_eval_tests_report_basic():
# Use the imported TestStatus
gold_results = {
"FAIL_TO_PASS": ["test1", "test2"],
"PASS_T... | ["test1"] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/harness/test_grading.py | test_get_eval_tests_report_basic | assert | collection | 30 | import json
from swebench.harness.constants import (
KEY_INSTANCE_ID,
KEY_MODEL,
KEY_PREDICTION,
TestStatus,
)
from swesmith.harness import grading
def test_get_eval_tests_report_basic():
# Use the imported TestStatus
gold_results = {
"FAIL_TO_PASS": ["test1", "test2"],
"PASS_T... | ["test2"] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_registry_keys_and_lookup | assert | numeric_literal | 26 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | 0 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_registry_values | assert | numeric_literal | 57 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | 2 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_create_mirror | assert | numeric_literal | 52 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | 3 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_get_test_cmd_basic | assert | collection | 32 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | [] | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_registry_keys_and_lookup | assert | none_literal | 30 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | None | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_repo_profile_clone | assert | bool_literal | 45 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | True | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_extract_entities_simple | assert | variable | 43 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | names | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_repo_profile_clone | assert | bool_literal | 78 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | False | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_registry_get_from_inst | assert | string_literal | 48 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | "test" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_registry_keys_and_lookup | assert | string_literal | 32 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | "mewwts" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_base.py | test_registry_keys_and_lookup | assert | string_literal | 33 | import subprocess
import pytest
import os
import shutil
from dataclasses import dataclass
from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID
from swesmith.bug_gen.mirror.generate import INSTANCE_REF
from swesmith.constants import KEY_PATCH
from swesmith.constants import ORG_NAME_GH
from swesmith.prof... | "addict" | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_profiles_golang.py | test_go_profile_log_parser_multiple_tests | assert | numeric_literal | 31 | import pytest
import subprocess
from swesmith.profiles.golang import GoProfile, Gin3c12d2a8
from unittest.mock import patch, mock_open
def make_dummy_go_profile():
class DummyGoProfile(GoProfile):
owner = "dummy"
repo = "dummyrepo"
commit = "deadbeefcafebabe"
@property
def... | 6 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_profiles_golang.py | test_go_profile_build_image_file_operations | assert | numeric_literal | 29 | import pytest
import subprocess
from swesmith.profiles.golang import GoProfile, Gin3c12d2a8
from unittest.mock import patch, mock_open
def make_dummy_go_profile():
class DummyGoProfile(GoProfile):
owner = "dummy"
repo = "dummyrepo"
commit = "deadbeefcafebabe"
@property
def... | 2 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_profiles_golang.py | test_go_profile_build_image_file_operations | assert | numeric_literal | 31 | import pytest
import subprocess
from swesmith.profiles.golang import GoProfile, Gin3c12d2a8
from unittest.mock import patch, mock_open
def make_dummy_go_profile():
class DummyGoProfile(GoProfile):
owner = "dummy"
repo = "dummyrepo"
commit = "deadbeefcafebabe"
@property
def... | 0 | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_profiles_golang.py | test_go_profile_log_parser_no_matches | assert | collection | 29 | import pytest
import subprocess
from swesmith.profiles.golang import GoProfile, Gin3c12d2a8
from unittest.mock import patch, mock_open
def make_dummy_go_profile():
class DummyGoProfile(GoProfile):
owner = "dummy"
repo = "dummyrepo"
commit = "deadbeefcafebabe"
@property
def... | {} | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_profiles_golang.py | test_go_profile_build_image_checks_exit_code | assert | bool_literal | 30 | import pytest
import subprocess
from swesmith.profiles.golang import GoProfile, Gin3c12d2a8
from unittest.mock import patch, mock_open
def make_dummy_go_profile():
class DummyGoProfile(GoProfile):
owner = "dummy"
repo = "dummyrepo"
commit = "deadbeefcafebabe"
@property
def... | True | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_profiles_golang.py | test_go_profile_build_image_subprocess_parameters | assert | none_literal | 30 | import pytest
import subprocess
from swesmith.profiles.golang import GoProfile, Gin3c12d2a8
from unittest.mock import patch, mock_open
def make_dummy_go_profile():
class DummyGoProfile(GoProfile):
owner = "dummy"
repo = "dummyrepo"
commit = "deadbeefcafebabe"
@property
def... | None | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
SWE-bench/SWE-smith | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | train | train | tests/profiles/test_profiles_golang.py | test_go_profile_log_parser_edge_cases | assert | variable | 33 | import pytest
import subprocess
from swesmith.profiles.golang import GoProfile, Gin3c12d2a8
from unittest.mock import patch, mock_open
def make_dummy_go_profile():
class DummyGoProfile(GoProfile):
owner = "dummy"
repo = "dummyrepo"
commit = "deadbeefcafebabe"
@property
def... | result | e6946b6d1bb78731de689270df6bd042fb425427 | 50 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.