Datasets:
base_commit stringlengths 40 40 | created_at stringdate 2014-11-10 05:17:52 2025-10-31 18:00:44 | image_name stringlengths 41 98 | instance_id stringlengths 11 68 | interface stringlengths 33 16.8k ⌀ | language stringclasses 20 values | license stringclasses 16 values | patch stringlengths 198 252k | pr_description stringlengths 0 37.8k | problem_statement stringlengths 0 235k | repo stringlengths 5 63 | test_patch stringlengths 149 150k | FAIL_TO_PASS listlengths 1 118k | PASS_TO_PASS listlengths 0 327k | install_config dict | meta dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e5228946a898d799f2b230ff96f943be99fa7842 | 2025-05-22 16:46:59 | docker.io/swerebenchv2/behat-gherkin:343-e522894 | behat__gherkin-343 | No new interfaces are introduced. | php | MIT | diff --git a/src/Parser.php b/src/Parser.php
index f3361f2..befdc6b 100644
--- a/src/Parser.php
+++ b/src/Parser.php
@@ -224,7 +224,9 @@ class Parser
continue;
}
- if (!$background && $node instanceof BackgroundNode) {
+ $isBackgroundAllowed = ($background === null && $scenarios === []);
+
+ if ($isBackgroundAllowed && $node instanceof BackgroundNode) {
$background = $node;
continue;
}
@@ -235,7 +237,7 @@ class Parser
}
throw new UnexpectedParserNodeException(
- match ($background === null && $scenarios === []) {
+ match ($isBackgroundAllowed) {
true => 'Background, Scenario or Outline',
false => 'Scenario or Outline',
},
| change: Throw ParserException if Background comes after first Scenario
Gherkin requires that any Feature `Background:` must come before the first Scenario / Scenario Outline in a file (to match the execution order of these steps).
We were previously allowing the background to appear anywhere at the top (Feature) level of the file. This will now throw a ParserException.
Although this could theoretically cause existing features to break, I do not consider it to be a BC break - we are now just being stricter that the input matches the expected schema.
Fixes #328 | Background should not be allowed after the first Scenario
We currently parse the Background and Scenario out of a file like this:
```
Feature: Whatever
Scenario: Something
Then I should fail
Background:
Given I am in the wrong sequence
```
However, cucumber/gherkin will report this as a parse error, because it does not allow Background nodes after the first Scenario.
There is not yet any testdata for this case, either here or upstream.
See #323 | Behat/Gherkin | diff --git a/tests/Cucumber/extra_testdata/bad/background_after_scenario.feature b/tests/Cucumber/extra_testdata/bad/background_after_scenario.feature
new file mode 100644
index 0000000..c57e1a3
--- /dev/null
+++ b/tests/Cucumber/extra_testdata/bad/background_after_scenario.feature
@@ -0,0 +1,7 @@
+Feature: Feature background cannot come after first scenario
+
+ Scenario:
+ Then I should fail
+
+ Background:
+ Given I am in the wrong sequence
diff --git a/tests/Cucumber/extra_testdata/bad/background_after_scenario.feature.errors.ndjson b/tests/Cucumber/extra_testdata/bad/background_after_scenario.feature.errors.ndjson
new file mode 100644
index 0000000..7c0ee49
--- /dev/null
+++ b/tests/Cucumber/extra_testdata/bad/background_after_scenario.feature.errors.ndjson
@@ -0,0 +1,1 @@
+{"parseError":{"message":"(6:5): expected: #EOF, #TableRow, #DocStringSeparator, #StepLine, #TagLine, #ExamplesLine, #ScenarioLine, #RuleLine, #Comment, #Empty, got 'Background:'","source":{"location":{"column":5,"line":6},"uri":"../bad/background_after_scenario.feature"}}}
| [
"Compatibility > Bad features do not parse with data set \"background_after_scenario.feature\""
] | [
"Array Keywords > Translation with data set \"with_special_chars_0\"",
"Array Keywords > Translation with data set \"with_special_chars_1\"",
"Array Keywords > Translation with data set \"with_special_chars_2\"",
"Array Loader > Supports",
"Array Loader > Load empty",
"Array Loader > Load features",
"Ar... | {
"base_image_name": "php_8.3.16",
"docker_specs": null,
"install": [
"export COMPOSER_HOME=/tmp/composer",
"composer install --no-interaction --prefer-dist --ansi"
],
"log_parser": "parse_log_phpunit",
"test_cmd": "./vendor/bin/phpunit --testdox --display-incomplete --display-skipped"
} | {
"llm_metadata": {
"code": "A",
"confidence": 0.97,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "easy",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [
"minor_bug"
],
"reasoning": "The issue requests that the parser reject a Background node placed after the first Scenario, matching Gherkin's rules. The provided test adds a feature file with a misplaced Background and asserts a specific parse error, which directly validates the requested behavior. There are no signs of missing specs, external dependencies, naming expectations, or hidden knowledge; the test aligns with the described requirement. Therefore the task is clearly specified and solvable (A).",
"test_alignment_issues": []
},
"num_modified_files": 1,
"num_modified_lines": 4,
"pr_author": "acoulton",
"pr_labels": [],
"pr_url": null
} |
1a9a55f2f579abf1105a15c13d8741c92156f369 | 2021-05-02 19:12:10 | docker.io/swerebenchv2/phpbench-phpbench:823-1a9a55f | phpbench__phpbench-823 | Method: XmlEncoder::encode(SuiteCollection $collection): Document
Location: lib/Serializer/XmlEncoder.php
Inputs: A SuiteCollection object which may contain scalar, array, binary, collection **and** serializable object parameters.
Outputs: Returns a PhpBench\Dom\Document representing the XML serialization of the suite. May throw RuntimeException with message “Cannot serialize” when a parameter value cannot be serialized (e.g., a closure or other unserializable type).
Description: Serialises a benchmark suite to XML. Added support for serialisable objects (stored as base64‑encoded `serialized` parameters) and now explicitly rejects unserializable values by throwing a RuntimeException.
Method: XmlDecoder::decode(Document $dom): SuiteCollection
Location: lib/Serializer/XmlDecoder.php
Inputs: A PhpBench\Dom\Document containing a previously encoded suite XML.
Outputs: Returns a SuiteCollection reconstructed from the XML. Supports deserialising parameters whose `type` attribute is `serialized` by base64‑decoding and `unserialize`‑ing the value.
Description: Decodes an XML document back into a SuiteCollection, now handling parameters that were encoded as serialized objects.
| php | MIT | diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd2fb302..f52de011 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ dev-master
Improvements:
- Support for binary data in param providers #532
+- Support serializable objects in param providers #823
Bug fix:
diff --git a/lib/Serializer/XmlDecoder.php b/lib/Serializer/XmlDecoder.php
index ed3ba0da..aabae6e3 100644
--- a/lib/Serializer/XmlDecoder.php
+++ b/lib/Serializer/XmlDecoder.php
@@ -13,6 +13,7 @@
namespace PhpBench\Serializer;
use function base64_decode;
+use DOMElement;
use PhpBench\Assertion\AssertionResult;
use PhpBench\Dom\Document;
use PhpBench\Dom\Element;
@@ -110,6 +111,7 @@ class XmlDecoder
$resultClasses = [];
foreach ($suiteEl->query('//result') as $resultEl) {
+ assert($resultEl instanceof DOMElement);
$class = $resultEl->getAttribute('class');
if (!class_exists($class)) {
@@ -125,6 +127,7 @@ class XmlDecoder
$suite->setEnvInformations($informations);
foreach ($suiteEl->query('./benchmark') as $benchmarkEl) {
+ assert($benchmarkEl instanceof Element);
$benchmark = $suite->createBenchmark(
$benchmarkEl->getAttribute('class')
);
@@ -218,6 +221,12 @@ class XmlDecoder
continue;
}
+ if ($parameterEl->getAttribute('type') === XmlEncoder::PARAM_TYPE_SERIALIZED) {
+ $parameters[$name] = unserialize(base64_decode($parameterEl->nodeValue));
+
+ continue;
+ }
+
if ($parameterEl->getAttribute('xsi:nil') === 'true') {
$parameters[$name] = null;
diff --git a/lib/Serializer/XmlEncoder.php b/lib/Serializer/XmlEncoder.php
index 726c5c29..e8a80e10 100644
--- a/lib/Serializer/XmlEncoder.php
+++ b/lib/Serializer/XmlEncoder.php
@@ -14,6 +14,7 @@ namespace PhpBench\Serializer;
use function base64_encode;
use DOMElement;
+use Exception;
use PhpBench\Dom\Document;
use PhpBench\Dom\Element;
use PhpBench\Model\Benchmark;
@@ -24,6 +25,7 @@ use PhpBench\Model\SuiteCollection;
use PhpBench\Model\Variant;
use PhpBench\PhpBench;
use PhpBench\Util\TimeUnit;
+use RuntimeException;
/**
* Encodes the Suite object graph into an XML document.
@@ -32,6 +34,7 @@ class XmlEncoder
{
public const PARAM_TYPE_BINARY = 'binary';
public const PARAM_TYPE_COLLECTION = 'collection';
+ const PARAM_TYPE_SERIALIZED = 'serialized';
/**
* Encode a Suite object into a XML document.
@@ -232,10 +235,17 @@ class XmlEncoder
return $parameterEl;
}
- throw new \InvalidArgumentException(sprintf(
- 'Parameters must be either scalars or arrays, got: %s',
- is_object($value) ? get_class($value) : gettype($value)
- ));
+ try {
+ $serialized = @serialize($value);
+ } catch (Exception $e) {
+ throw new RuntimeException(sprintf(
+ 'Cannot serialize object of type "%s" for parameter "%s"', gettype($value), $name
+ ));
+ }
+ $parameterEl->setAttribute('type', self::PARAM_TYPE_SERIALIZED);
+ $parameterEl->appendChild(
+ $parameterEl->ownerDocument->createCDATASection(base64_encode($serialized))
+ );
}
private function appendExecutor(Element $subjectEl, ResolvedExecutor $executor = null): void
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 99430d07..4c3cfa5e 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -7,12 +7,7 @@ parameters:
-
message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#"
- count: 22
- path: lib/Serializer/XmlDecoder.php
-
- -
- message: "#^Parameter \\#2 \\$benchmarkEl of method PhpBench\\\\Serializer\\\\XmlDecoder\\:\\:processBenchmark\\(\\) expects PhpBench\\\\Dom\\\\Element, DOMNode given\\.$#"
- count: 1
+ count: 20
path: lib/Serializer/XmlDecoder.php
-
| Serialize objects
Fixes #615 | Unable to use DateTime value in provider
If I use a `DateTime` instance in a provider, phpbench errors with:
>In Reflector.php line 109:
>Overloaded object of type DateTime is not compatible with RecursiveArrayIterator
```
public function provideTypes()
{
yield 'first' => ['time' => new DateTime()];
}
``` | phpbench/phpbench | diff --git a/tests/Unit/Serializer/XmlDecoderTest.php b/tests/Unit/Serializer/XmlDecoderTest.php
index a8abd9d2..c0fbd458 100644
--- a/tests/Unit/Serializer/XmlDecoderTest.php
+++ b/tests/Unit/Serializer/XmlDecoderTest.php
@@ -188,6 +188,21 @@ EOT
);
}
+ public function doTestDate(SuiteCollection $collection): void
+ {
+ $dom = $this->encode($collection);
+
+ $decoder = new XmlDecoder();
+ $collection = $decoder->decode($dom);
+
+ $decodedDom = $this->encode($collection);
+
+ $this->assertEquals(
+ $dom->dump(),
+ $decodedDom->dump()
+ );
+ }
+
private function encode(SuiteCollection $collection)
{
$xmlEncoder = new XmlEncoder();
diff --git a/tests/Unit/Serializer/XmlEncoderTest.php b/tests/Unit/Serializer/XmlEncoderTest.php
index bd7c53ef..3a2a25b4 100644
--- a/tests/Unit/Serializer/XmlEncoderTest.php
+++ b/tests/Unit/Serializer/XmlEncoderTest.php
@@ -12,6 +12,7 @@
namespace PhpBench\Tests\Unit\Serializer;
+use PhpBench\Dom\Document;
use PhpBench\Environment\Information;
use PhpBench\Model\Benchmark;
use PhpBench\Model\Iteration;
@@ -22,6 +23,7 @@ use PhpBench\Model\Variant;
use PhpBench\PhpBench;
use PhpBench\Serializer\XmlEncoder;
use PhpBench\Tests\Util\Approval;
+use RuntimeException;
class XmlEncoderTest extends XmlTestCase
{
@@ -47,16 +49,46 @@ class XmlEncoderTest extends XmlTestCase
$params = $approval->getConfig(0);
$collection = $this->getSuiteCollection($params);
- $xmlEncoder = new XmlEncoder();
- $dom = $xmlEncoder->encode($collection);
- $approval->approve(str_replace(PhpBench::version(), 'PHPBENCH_VERSION', $dom->dump()));
+ $dom = $this->encode($collection);
+ $approval->approve($this->dumpNormalized($dom));
}
public function doTestBinary(SuiteCollection $collection): void
{
$approval = Approval::create(__DIR__ . '/examples/binary1.example', 0);
+ $dom = $this->encode($collection);
+ $approval->approve($this->dumpNormalized($dom));
+ }
+
+ public function doTestDate(SuiteCollection $collection): void
+ {
+ $approval = Approval::create(__DIR__ . '/examples/date1.example', 0);
+ $dom = $this->encode($collection);
+ $approval->approve($this->dumpNormalized($dom));
+ }
+
+ public function testUnserizableParameter(): void
+ {
+ $this->expectException(RuntimeException::class);
+ $this->expectExceptionMessage('Cannot serialize');
+ $collection = $this->getSuiteCollection([
+ 'params' => [
+ 'invalid' => function (): void {
+ }
+ ],
+ ]);
+ $this->encode($collection);
+ }
+
+ private function dumpNormalized(Document $dom)
+ {
+ return str_replace(PhpBench::version(), 'PHPBENCH_VERSION', $dom->dump());
+ }
+
+ private function encode(SuiteCollection $collection): Document
+ {
$xmlEncoder = new XmlEncoder();
- $dom = $xmlEncoder->encode($collection);
- $approval->approve(str_replace(PhpBench::version(), 'PHPBENCH_VERSION', $dom->dump()));
+
+ return $xmlEncoder->encode($collection);
}
}
diff --git a/tests/Unit/Serializer/XmlTestCase.php b/tests/Unit/Serializer/XmlTestCase.php
index c464b968..eb3ef3e9 100644
--- a/tests/Unit/Serializer/XmlTestCase.php
+++ b/tests/Unit/Serializer/XmlTestCase.php
@@ -12,6 +12,7 @@
namespace PhpBench\Tests\Unit\Serializer;
+use DateTime;
use PhpBench\Assertion\AssertionResult;
use PhpBench\Assertion\VariantAssertionResults;
use PhpBench\Environment\Information;
@@ -155,5 +156,16 @@ abstract class XmlTestCase extends TestCase
$this->doTestBinary($collection);
}
+ public function testDate(): void
+ {
+ $collection = $this->getSuiteCollection([
+ 'params' => [
+ 'foo' => new DateTime('2021-01-01 00:00:00+00:00'),
+ ]
+ ]);
+ $this->doTestDate($collection);
+ }
+
abstract public function doTestBinary(SuiteCollection $collection): void;
+ abstract public function doTestDate(SuiteCollection $collection): void;
}
diff --git a/tests/Unit/Serializer/examples/date1.example b/tests/Unit/Serializer/examples/date1.example
new file mode 100644
index 00000000..39bb7bf9
--- /dev/null
+++ b/tests/Unit/Serializer/examples/date1.example
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<phpbench xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="PHPBENCH_VERSION">
+ <suite tag="test" context="test" date="2015-01-01T00:00:00+00:00" config-path="/path/to/config.json" uuid="1234">
+ <env>
+ <info1>
+ <value name="foo" type="string">fooo & bar</value>
+ </info1>
+ </env>
+ <benchmark class="Bench1">
+ <subject name="subjectName">
+ <executor name="foo"/>
+ <variant sleep="5" output-time-unit="milliseconds" output-time-precision="7" output-mode="throughput" revs="100" warmup="50" retry-threshold="10">
+ <parameter-set name="some params">
+ <parameter name="foo" type="serialized"><![CDATA[Tzo4OiJEYXRlVGltZSI6Mzp7czo0OiJkYXRlIjtzOjI2OiIyMDIxLTAxLTAxIDAwOjAwOjAwLjAwMDAwMCI7czoxMzoidGltZXpvbmVfdHlwZSI7aToxO3M6ODoidGltZXpvbmUiO3M6NjoiKzAwOjAwIjt9]]></parameter>
+ </parameter-set>
+ <iteration time-net="10" time-revs="1" time-avg="10" mem-peak="100" mem-real="110" mem-final="109" comp-z-value="0" comp-deviation="0"/>
+ <stats max="0.1" mean="0.1" min="0.1" mode="0.1" rstdev="0" stdev="0" sum="0.1" variance="0"/>
+ </variant>
+ </subject>
+ </benchmark>
+ <result key="time" class="PhpBench\Model\Result\TimeResult"/>
+ <result key="mem" class="PhpBench\Model\Result\MemoryResult"/>
+ <result key="comp" class="PhpBench\Model\Result\ComputedResult"/>
+ </suite>
+</phpbench>
| [
"Xml Decoder > Date",
"Xml Encoder > Unserizable parameter",
"Xml Encoder > Date"
] | [
"Commands > Command with data set #0",
"Commands > Command with data set #1",
"Commands > Command with data set #2",
"Commands > Command with data set #3",
"Commands > Command with data set #4",
"Commands > Command with data set #5",
"Commands > Command with data set #6",
"Commands > Command with data... | {
"base_image_name": "php_8.3.16",
"docker_specs": null,
"install": [
"export COMPOSER_HOME=/tmp/composer",
"composer install --no-interaction --prefer-dist"
],
"log_parser": "parse_log_phpunit",
"test_cmd": "vendor/bin/phpunit --testdox --colors=never"
} | {
"llm_metadata": {
"code": "A",
"confidence": 0.96,
"detected_issues": {
"B1": false,
"B2": false,
"B3": false,
"B4": false,
"B5": false,
"B6": false
},
"difficulty": "medium",
"external_urls": [],
"intent_completeness": "complete",
"pr_categories": [
"core_feat"
],
"reasoning": "The issue reports a failure when a DateTime instance is used in a param provider, requiring support for serializable objects in the XML serializer. The added tests check that such objects can be encoded, decoded, and round‑tripped without error, and also verify that non‑serializable values raise a clear exception. The tests directly target the intended behavior and do not introduce unrelated expectations, so the problem is well‑specified and solvable. No signals of B‑category problems are present.",
"test_alignment_issues": []
},
"num_modified_files": 4,
"num_modified_lines": 25,
"pr_author": "dantleech",
"pr_labels": [],
"pr_url": null
} |
4f3770ea781f4bf8055240a0e951a3fa2205c734 | 2025-01-22 08:08:22 | docker.io/swerebenchv2/twigphp-twig:4548-4f3770e | twigphp__twig-4548 | No new interfaces are introduced. | php | BSD-3-Clause | "diff --git a/CHANGELOG b/CHANGELOG\nindex 2fafecb6..5d1d5562 100644\n--- a/CHANGELOG\n+++ b/CHANGEL(...TRUNCATED) | Ignore static properties when using the dot operator
Fix #4547 | "Accessing Undefined Variable with Getter and Static Property with same name\nIn Twig, when using a (...TRUNCATED) | twigphp/Twig | "diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php\nindex 2a88c6af..f4889cd7 100644(...TRUNCATED) | ["Chain > Load in a [1.36 ms]","Chain > Load in b [0.11 ms]","Chain > Load in both [0.14 ms]","Chain(...TRUNCATED) | ["Chain > Get timestamp in a [0.09 ms]","Chain > Get timestamp in b [0.08 ms]","Chain > Get timestam(...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export COMPOSER_HOME=/tmp/composer",(...TRUNCATED) | {"llm_metadata":{"code":"A","confidence":0.97,"detected_issues":{"B1":false,"B2":false,"B3":false,"B(...TRUNCATED) |
746d25a7d11713a6e6806e936f34835ed5cf4866 | 2023-03-02 08:28:21 | docker.io/swerebenchv2/open-telemetry-opentelemetry-php:933-746d25a | open-telemetry__opentelemetry-php-933 | "Method: Container.__construct(self, string $dir = '/proc/self')\nLocation: src/SDK/Resource/Detecto(...TRUNCATED) | php | Apache-2.0 | "diff --git a/src/SDK/Common/Configuration/KnownValues.php b/src/SDK/Common/Configuration/KnownValue(...TRUNCATED) | "adding container detector\nDetect container id from cgroup or mountinfo, based on how otel-js does (...TRUNCATED) | "Resource Detection for container properties\n**Is your feature request related to a problem?**\r\nD(...TRUNCATED) | open-telemetry/opentelemetry-php | "diff --git a/tests/Unit/SDK/Resource/Detectors/ContainerTest.php b/tests/Unit/SDK/Resource/Detector(...TRUNCATED) | ["Baggage > Current empty [4.06 ms]","Baggage > Current [0.11 ms]","Baggage > Get current baggage de(...TRUNCATED) | ["Baggage > Get current baggage sets correct context [0.10 ms]","Baggage > Baggage from context defa(...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export COMPOSER_HOME=/tmp/composer",(...TRUNCATED) | {"llm_metadata":{"code":"A","confidence":0.92,"detected_issues":{"B1":false,"B2":false,"B3":false,"B(...TRUNCATED) |
efeab760998cf8ddb44c0e4c87f9bdd385bff64f | 2022-01-05 09:47:14 | docker.io/swerebenchv2/friendsofphp-php-cs-fixer:6224-efeab76 | friendsofphp__php-cs-fixer-6224 | "ArgumentAnalysis::__construct(string $name, int $nameIndex, string $default, TypeAnalysis $typeAnal(...TRUNCATED) | php | MIT | "diff --git a/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php b/src/F(...TRUNCATED) | ArgumentsAnalyzer - support PHP8.1 readonly
closes #6221 | "nullable_type_declaration_for_default_null_value fails for nullable readonly parameter in promoted (...TRUNCATED) | FriendsOfPHP/PHP-CS-Fixer | "diff --git a/tests/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixerTest.php b(...TRUNCATED) | ["Abstract Fixer > Defaults [0.30 ms]","Abstract Fixer > Configure unconfigurable [0.24 ms]","Abstra(...TRUNCATED) | ["Abstract Fixer > Get configuration definition unconfigurable [0.04 ms]","Abstract Fixer > Get whit(...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export HOME=/tmp","composer install (...TRUNCATED) | {"llm_metadata":{"code":"A","confidence":0.98,"detected_issues":{"B1":false,"B2":false,"B3":false,"B(...TRUNCATED) |
d9996a1046fb74d2c6310a8f5a92189c99004161 | 2023-11-09 13:55:01 | docker.io/swerebenchv2/php-cs-fixer-php-cs-fixer:7429-d9996a1 | php-cs-fixer__php-cs-fixer-7429 | No new interfaces are introduced. | php | MIT | "diff --git a/src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.php b/src/Fixer/Phpdoc/PhpdocVarWithoutName(...TRUNCATED) | fix: Remove all variable names in `@var` callable signature
Fixes #5402. | "PhpCsFixer\\Fixer\\Phpdoc\\PhpdocVarWithoutNameFixer removes only the first variable name\n## Bug r(...TRUNCATED) | PHP-CS-Fixer/PHP-CS-Fixer | "diff --git a/tests/Fixer/Phpdoc/PhpdocVarWithoutNameFixerTest.php b/tests/Fixer/Phpdoc/PhpdocVarWit(...TRUNCATED) | ["Phpdoc Var Without Name Fixer > Fix var with data set \"@var with callable syntax\"","Phpdoc Var W(...TRUNCATED) | ["Abstract Fixer > Defaults","Abstract Fixer > Configure unconfigurable","Abstract Fixer > Get confi(...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export HOME=/tmp","composer install (...TRUNCATED) | {"llm_metadata":{"code":"B2","confidence":0.88,"detected_issues":{"B1":false,"B2":true,"B3":false,"B(...TRUNCATED) |
4d5472ca2c6fb1794c57a47217e2751183acd901 | 2022-06-27 15:21:34 | docker.io/swerebenchv2/friendsofphp-php-cs-fixer:6447-4d5472c | friendsofphp__php-cs-fixer-6447 | "Method: NoUselessConcatOperatorFixer.configure(array $options) Location: src/Fixer/Operator/NoUsele(...TRUNCATED) | php | MIT | "diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php\nindex 34381e093..4d932edac 100644\n--(...TRUNCATED) | feature: NoUselessConcatOperatorFixer - Introduction
Closes #4491. | "Redundant concatenation fixer\nIs there a fixer for removing redundant string concatenation, as in (...TRUNCATED) | FriendsOfPHP/PHP-CS-Fixer | "diff --git a/tests/AutoReview/FixerFactoryTest.php b/tests/AutoReview/FixerFactoryTest.php\nindex 3(...TRUNCATED) | ["Abstract Fixer > Defaults [0.27 ms]","Abstract Fixer > Configure unconfigurable [0.24 ms]","Abstra(...TRUNCATED) | ["Abstract Fixer > Get configuration definition unconfigurable [0.03 ms]","Abstract Fixer > Set whit(...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export HOME=/tmp","composer install (...TRUNCATED) | {"llm_metadata":{"code":"A","confidence":0.97,"detected_issues":{"B1":false,"B2":false,"B3":false,"B(...TRUNCATED) |
3157174717f8157d1491645252ef7c38e7c357c8 | 2024-11-18 20:01:36 | docker.io/swerebenchv2/php-pie:103-3157174 | php__pie-103 | "Method: UnixBuild::__invoke(DownloadedPackage $downloadedPackage, TargetPlatform $targetPlatform, a(...TRUNCATED) | php | BSD-3-Clause | "diff --git a/src/Building/ExtensionBinaryNotFound.php b/src/Building/ExtensionBinaryNotFound.php\nn(...TRUNCATED) | Ensure built .so file matches the expected filename
Fixes #92 | "`pie build` crashes if the SO file does not exist after the build\nRunning on #83:\r\n\r\nDespite t(...TRUNCATED) | php/pie | "diff --git a/test/integration/Building/UnixBuildTest.php b/test/integration/Building/UnixBuildTest.(...TRUNCATED) | [
"Unix Build > Unix build will throw exception when expected binary name mismatches"
] | ["Architecture > Parse architecture with data set \"x64\"","Architecture > Parse architecture with d(...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export COMPOSER_HOME=\"/tmp/composer(...TRUNCATED) | {"llm_metadata":{"code":"A","confidence":0.99,"detected_issues":{"B1":false,"B2":false,"B3":false,"B(...TRUNCATED) |
a0368a99cf192f70779a6e9bec777c8898b6c1b8 | 2022-04-03 15:09:28 | docker.io/swerebenchv2/tighten-tlint:286-a0368a9 | tighten__tlint-286 | No new interfaces are introduced. | php | MIT | "diff --git a/src/Linters/NoRequestAll.php b/src/Linters/NoRequestAll.php\nindex 96c2a73..1fe487e 10(...TRUNCATED) | Fix no `$request-all()` check
This PR aims to fix #285.
| "NoRequestAll incorrectly identifies $request->user()\nI have recently created a new Laravel 9.6.0 p(...TRUNCATED) | tighten/tlint | "diff --git a/tests/Linting/Linters/NoRequestAllTest.php b/tests/Linting/Linters/NoRequestAllTest.ph(...TRUNCATED) | ["Config > Tighten preset can get linters [1.16 ms]","Config > Laravel preset can get linters [0.07 (...TRUNCATED) | ["Config > Tighten preset can get formatters [0.02 ms]","Config > Laravel preset can get formatters (...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export COMPOSER_HOME=\"/tmp/composer(...TRUNCATED) | {"llm_metadata":{"code":"A","confidence":0.99,"detected_issues":{"B1":false,"B2":false,"B3":false,"B(...TRUNCATED) |
5ab3464b8755293815e57c0de0829feaf7242aae | 2021-02-12 14:40:11 | docker.io/swerebenchv2/laravel-framework:36240-5ab3464 | laravel__framework-36240 | No new interfaces are introduced. | php | MIT | "diff --git a/src/Illuminate/Support/Facades/File.php b/src/Illuminate/Support/Facades/File.php\nind(...TRUNCATED) | Fix attribute nesting on anonymous components
Fixes #36236 | "Laravel 8 component @props not setting prop value\n- Laravel Version: 8.20.1\r\n- PHP Version: 8.0.(...TRUNCATED) | laravel/framework | "diff --git a/tests/Integration/View/BladeTest.php b/tests/Integration/View/BladeTest.php\nindex 864(...TRUNCATED) | ["Encrypter > Encryption [2.55 ms]","Encrypter > Encryption using base 64 encoded key [0.05 ms]","En(...TRUNCATED) | ["Encrypter > Raw string encryption [0.05 ms]","Encrypter > Do no allow longer key [0.21 ms]","Encry(...TRUNCATED) | {"base_image_name":"php_8.3.16","docker_specs":null,"install":["export COMPOSER_HOME=/tmp/composer",(...TRUNCATED) | {"llm_metadata":{"code":"A","confidence":0.96,"detected_issues":{"B1":false,"B2":false,"B3":false,"B(...TRUNCATED) |
SWE-rebench-V2
Dataset Summary
SWE-rebench-V2 is a curated dataset of software-engineering tasks derived from real GitHub issues and pull requests. The dataset contains 32,079 samples covering Python, Go, TypeScript, JavaScript, Rust, Java, PHP, Kotlin, Julia, Elixir, Scala, Swift, Dart, C, C++, C#, R, Clojure, OCaml, and Lua.
For log parser functions, base Dockerfiles, and the prompts used, please see https://github.com/SWE-rebench/SWE-rebench-V2
The detailed technical report is available at “SWE-rebench V2: Language-Agnostic SWE Task Collection at Scale”.
Quick Start
from datasets import load_dataset
ds = load_dataset("nebius/SWE-rebench-V2", split="train")
print(len(ds)) # 32079
Dataset Structure
| Field | Type | Description |
|---|---|---|
instance_id |
string |
Unique identifier for the instance |
repo |
string |
GitHub repository in owner/repo format |
base_commit |
string |
Git commit SHA of the base before the fix |
patch |
string |
The gold patch that resolves the issue |
test_patch |
string |
Diff adding or modifying tests that verify the fix |
problem_statement |
string |
Issue description the patch addresses |
pr_description |
string |
Full pull request description |
created_at |
int64 |
Unix timestamp (milliseconds) of the issue/PR creation |
image_name |
string |
Docker image name used for the evaluation environment |
language |
string |
Primary programming language of the repository |
interface |
string |
Description of the code interface changed by the patch |
license |
string |
SPDX license identifier of the repository |
FAIL_TO_PASS |
list[string] |
Test IDs that fail before the patch and pass after |
PASS_TO_PASS |
list[string] |
Test IDs that pass both before and after the patch |
install_config |
struct |
Configuration needed to reproduce the test environment |
meta |
struct |
Metadata and LLM-generated quality annotations |
License
The dataset is licensed under the Creative Commons Attribution 4.0 license. However, please respect the license of each specific repository on which a particular instance is based. To facilitate this, the license of each repository at the time of the commit is provided for every instance.
Citation
@misc{badertdinov2026swerebenchv2languageagnosticswe,
title={SWE-rebench V2: Language-Agnostic SWE Task Collection at Scale},
author={Ibragim Badertdinov and Maksim Nekrashevich and Anton Shevtsov and Alexander Golubev},
year={2026},
eprint={2602.23866},
archivePrefix={arXiv},
primaryClass={cs.SE},
url={https://arxiv.org/abs/2602.23866},
}
- Downloads last month
- 28