PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: canjs/can-zone (js)

Issue:
can-zone adds cycle to errors 
```js
error = {
    message: ...
    errors: [ error ]
    ...
}
```

This cycle will cause problems downstream if any tool tries to serialize the error,  see https://github.com/stealjs/steal/issues/1509 for more details.

Pull request:
Prevent can-zone from creating circular errors
Closes #193

Patch:
diff --git a/appveyor.yml b/appveyor.yml
index 31b7ae6..4aff770 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,7 +2,8 @@
 environment:
   matrix:
   # node.js
-  - nodejs_version: "7"
+  - nodejs_version: "8"
+  - nodejs_version: "10"
 
 # Install scripts. (runs after repo cloning)
 install:
diff --git a/lib/zone.js b/lib/zone.js
index ccf2cd7..54d1857 100644
--- a/lib/zone.js
+++ b/lib/zone.js
@@ -269,7 +269,7 @@ Zone.prototype.end = function(){
 	var dfd = this.deferred;
 	if(this.errors.length) {
 		var error = this.errors[0];
-		error.errors = this.errors;
+		Object.defineProperty(error, "errors", { value: this.errors });
 		dfd.reject(error);
 	} else {
 		dfd.resolve(this.data);


Test patch:
diff --git a/test/test.js b/test/test.js
index e185243..1f3df8d 100644
--- a/test/test.js
+++ b/test/test.js
@@ -258,6 +258,26 @@ describe("new Zone", function(){
 			}, 10);
 		});
 	});
+
+	it("catched errors should be serializable", function(done) {
+		new Zone()
+			.run(function() {
+				throw new Error("uh-oh something went wrong");
+			})
+			.then(
+				function() {
+					assert.fail("zone should not resolve");
+				},
+				function(error) {
+					try {
+						JSON.stringify(error);
+					} catch (err) {
+						assert.fail(err.message);
+					}
+				}
+			)
+			.then(done, done);
+	});
 });
 
 describe("Reusing zones", function(){
Repository: JsonMapper/JsonMapper (php)

Issue:
The TypedProperties middleware incorrectly marks private array $friends as nullable.
**Describe the bug**
The TypedProperties middleware incorrectly marks private array $friends as nullable.


**To Reproduce**
While running the following code through the types properties middleware the `friends` property is marked as nullable. When trying to access the property from a new instance an error is thrown: `Typed property JsonMapper\Tests\Implementation\Php74\Popo::$friends must not be accessed before initialization` indicating this isn't allowed null.
```
<?php

declare(strict_types=1);

namespace JsonMapper\Tests\Implementation\Php74;

class Popo
{
    public string $name;

    public array $friends;
}
```

**Expected behavior**
The `friends` property (which is an array of mixed) should not be nullable as there is no explicit null mark (?).

Pull request:
Fix nullable property when type declaration is array
Would fix #63 

Patch:
diff --git a/src/Middleware/TypedProperties.php b/src/Middleware/TypedProperties.php
index 0c8da3a..d63b734 100644
--- a/src/Middleware/TypedProperties.php
+++ b/src/Middleware/TypedProperties.php
@@ -46,13 +46,14 @@ class TypedProperties extends AbstractMiddleware
                 continue;
             }
 
-            $propertyType = $type->getName() !== 'array' ? $type->getName() : 'mixed';
+            $isArray = $type->getName() === 'array';
+            $propertyType = $isArray ? 'mixed' : $type->getName();
             $property = PropertyBuilder::new()
                 ->setName($reflectionProperty->getName())
                 ->setType($propertyType)
-                ->setIsNullable($type->allowsNull() || $propertyType === 'mixed')
+                ->setIsNullable($type->allowsNull() || ((!$isArray) && $propertyType === 'mixed'))
                 ->setVisibility(Visibility::fromReflectionProperty($reflectionProperty))
-                ->setIsArray($type->getName() === 'array')
+                ->setIsArray($isArray)
                 ->build();
             $intermediatePropertyMap->addProperty($property);
         }


Test patch:
diff --git a/tests/Unit/Middleware/TypedPropertiesTest.php b/tests/Unit/Middleware/TypedPropertiesTest.php
index c182116..ad88af7 100644
--- a/tests/Unit/Middleware/TypedPropertiesTest.php
+++ b/tests/Unit/Middleware/TypedPropertiesTest.php
@@ -44,7 +44,7 @@ class TypedPropertiesTest extends TestCase
         self::assertThatProperty($propertyMap->getProperty('friends'))
             ->hasType('mixed')
             ->hasVisibility(Visibility::PUBLIC())
-            ->isNullable()
+            ->isNotNullable()
             ->isArray();
     }
Repository: postcss/postcss-import (js)

Issue:
postcss-import doesn't set plugin property to its dependency messages
According to the postcss API document, [`plugin` is required property in Result#messages](http://api.postcss.org/Result.html#messages), but [`postcss-import` doesn't set it when it pushes dependency information to the messages](https://github.com/postcss/postcss-import/blob/f98dd1a5a6a987c8cf197db46644765a4d43d73a/index.js#L198-L205).

Pull request:
Set plugin property to dependency messages which is required according to the API doc
This PR fixes #379. The lack of `plugin` property leads to a message mishandling by other plugins and may cause an issue described as the second problem in https://github.com/nodaguti/postcss-calc-warning.

Patch:
diff --git a/index.js b/index.js
index 561c743..d32cf96 100755
--- a/index.js
+++ b/index.js
@@ -199,6 +199,7 @@ function resolveImportId(result, stmt, options, state) {
       resolved.forEach(file => {
         result.messages.push({
           type: "dependency",
+          plugin: "postcss-import",
           file: file,
           parent: sourceFile,
         })


Test patch:
diff --git a/test/import-events.js b/test/import-events.js
index bdcc2c2..d5486cf 100644
--- a/test/import-events.js
+++ b/test/import-events.js
@@ -22,11 +22,13 @@ test("should add dependency message for each import", t => {
       const expected = [
         {
           type: "dependency",
+          plugin: "postcss-import",
           file: resolve("test/fixtures/imports/media-import-level-2.css"),
           parent: resolve("test/fixtures/media-import.css"),
         },
         {
           type: "dependency",
+          plugin: "postcss-import",
           file: resolve("test/fixtures/imports/media-import-level-3.css"),
           parent: resolve("test/fixtures/imports/media-import-level-2.css"),
         },
Repository: ysugimoto/falco (go)

Issue:
[Feature] add .prefer_ipv6 field in backend
### Kind of proposals

You can turn on multiple checkboxes.

- [] Parser
- [x] Linter
- [] Simulator
- [] Testing

### Describe the feature

Now Fastly supports IPv6 to origin as `.prefer_ipv6` property in backend declaretion.
We need to support this field in linter in order to suppress UndefinedBackendPropery error.

### Give us your considerations

Support new field of `.prefer_ipv6`

Pull request:
implement prefer_ipv6 field in backend declaration
Fixes #459 

This PR supports `.prefer_ipv6` field in backend declaration.
This feature comes from Fastly's ipv6 to origin support and if the user enables this feature, this field will be present.
It seems to be enabled in custom VCL so we need to support in linter.

Patch:
diff --git a/README.md b/README.md
index e2895e8..7fe2b39 100644
--- a/README.md
+++ b/README.md
@@ -41,11 +41,7 @@ Download binary from [releases page](https://github.com/ysugimoto/falco/releases
 $ brew install falco
 ```
 
-You can compile this project by yourself with:
-
-```shell
-go install github.com/ysugimoto/falco/cmd/falco@latest
-```
+You can compile this project by yourself with `go install github.com/ysugimoto/falco/cmd/falco@latest`.
 
 ## Usage
 
@@ -150,6 +146,10 @@ To integrate `falco` into your GitHub Actions pipeline, e.g. for linting:
 
 See [ain/falco-github-action](https://github.com/ain/falco-github-action) for documentation.
 
+## Transforming
+
+`falco` plans to transpile Fastly VCL to the other programming language that works on the Compute@Edge, keep you posted when there is any progress.
+
 ## Contribution
 
 - Fork this repository
diff --git a/linter/helper.go b/linter/helper.go
index fe89eb2..3fa32a9 100644
--- a/linter/helper.go
+++ b/linter/helper.go
@@ -33,6 +33,7 @@ var BackendPropertyTypes = map[string]types.Type{
 	"host_header":              types.StringType,
 	"always_use_host_header":   types.BoolType,
 	"bypass_local_route_table": types.BoolType,
+	"prefer_ipv6":              types.BoolType,
 }
 
 var BackendProbePropertyTypes = map[string]types.Type{


Test patch:
diff --git a/linter/declaration_linter_test.go b/linter/declaration_linter_test.go
index 33ef7e8..1f4fb06 100644
--- a/linter/declaration_linter_test.go
+++ b/linter/declaration_linter_test.go
@@ -57,6 +57,7 @@ backend foo {
   .ssl_check_cert = always;
   .min_tls_version = "1.2";
   .max_tls_version = "1.2";
+  .prefer_ipv6 = true;
   .probe = {
     .dummy = false;
     .initial = 5;