PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: goby-lang/goby (go)

Issue:
Including an Array causes an internal error
The following code causes an internal error and subsequent panic:

```ruby
» class TestClass
¤   include []
» end
interface conversion: vm.Object is *vm.RClass, not *vm.Error
#» UndefinedMethodError: Undefined Method '[]' for TestClass
» exit
interface conversion: vm.Object is nil, not *vm.Error
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0xa4b5b4]

goroutine 1 [running]:
github.com/goby-lang/goby/vm.(*VM).GetREPLResult(0xc420092820, 0xc4201fa540, 0x3)
  /path/to/go/src/github.com/goby-lang/goby/vm/repl.go:73 +0x44
github.com/goby-lang/goby/igb.StartIgb(0xbd6b78, 0x7)
  /path/to/go/src/github.com/goby-lang/goby/igb/repl.go:227 +0xd18
main.main()
  /path/to/go/src/github.com/goby-lang/goby/goby.go:29 +0xbaa
```

Pull request:
Fix #640
This closes #640

Patch:
diff --git a/vm/class.go b/vm/class.go
index 60c7e5a..4218da4 100644
--- a/vm/class.go
+++ b/vm/class.go
@@ -543,6 +543,10 @@ var builtinModuleCommonClassMethods = []*BuiltinMethodObject{
 		// @return [Null]
 		Name: "include",
 		Fn: func(receiver Object, sourceLine int, t *Thread, args []Object, blockFrame *normalCallFrame) Object {
+			if len(args) != 1 {
+				return t.vm.InitErrorObject(errors.ArgumentError, sourceLine, errors.WrongNumberOfArgument, 1, len(args))
+			}
+
 			var class *RClass
 			module, ok := args[0].(*RClass)
 


Test patch:
diff --git a/vm/class_test.go b/vm/class_test.go
index b1b2ad9..797e9f6 100644
--- a/vm/class_test.go
+++ b/vm/class_test.go
@@ -554,40 +554,6 @@ func TestGeneralAssignmentByOperation(t *testing.T) {
 	}
 }
 
-func TestForbiddenInclusionWithClass(t *testing.T) {
-	input := `class Foo
-end
-
-class Bar
-  include Foo
-end
-	`
-	expected := `TypeError: Expect argument to be Module. got: Class`
-
-	v := initTestVM()
-	evaluated := v.testEval(t, input, getFilename())
-	checkErrorMsg(t, i, evaluated, expected)
-	v.checkCFP(t, 0, 2)
-	v.checkSP(t, 0, 1)
-}
-
-func TestForbiddenExtensionWithClass(t *testing.T) {
-	input := `class Foo
-end
-
-class Bar
-  extend Foo
-end
-	`
-	expected := `TypeError: Expect argument to be Module. got: Class`
-
-	v := initTestVM()
-	evaluated := v.testEval(t, input, getFilename())
-	checkErrorMsg(t, i, evaluated, expected)
-	v.checkCFP(t, 0, 2)
-	v.checkSP(t, 0, 1)
-}
-
 // Method tests
 
 func TestMethodsMethod(t *testing.T) {
@@ -1904,3 +1870,29 @@ func TestClassInspectCallsToString(t *testing.T) {
 	vm.checkCFP(t, i, 0)
 	vm.checkSP(t, i, 1)
 }
+
+func TestModuleInclusionFail(t *testing.T) {
+	testsFail := []errorTestCase{
+		{`
+class Foo
+  include []
+end
+`, "ArgumentError: Expect 1 argument(s). got: 0", 2},
+		{`
+class Foo
+  include
+end`, "ArgumentError: Expect 1 argument(s). got: 0", 2},
+		{`
+class Foo
+  include "123"
+end`, "TypeError: Expect argument to be Module. got: String", 2},
+	}
+
+	for i, tt := range testsFail {
+		v := initTestVM()
+		evaluated := v.testEval(t, tt.input, getFilename())
+		checkErrorMsg(t, i, evaluated, tt.expected)
+		v.checkCFP(t, i, tt.expectedCFP)
+		v.checkSP(t, i, 1)
+	}
+}
Repository: jsonata-js/jsonata (js)

Issue:
Object transform operator allows arrays in its update expression
The object transform operator has the following syntax:

```
root ~> | location | update [, delete] |
```

where `update` is an object that gets merged into the root object. All of the examples I've seen use a JSON object for the `update` part. But it also seems to work with an array, e.g. 

```
{} ~> |$|["one", "two", "three"]|
```

evaluates to:

```
{
  "0": "one",
  "1": "two",
  "2": "three"
}
```

Shouldn't this be an error? There is a [type check](https://github.com/jsonata-js/jsonata/blob/master/src/jsonata.js#L2557) in the code but it doesn't catch this case because JavaScript objects and arrays both have type "object".

Pull request:
check for object should not include arrays
The 'update' part of the transform syntax should only allow JSON objects to be specified.  However, arrays were being accepted because a JS array is an object.  An extra check was added.

resolves #245 

Patch:
diff --git a/src/jsonata.js b/src/jsonata.js
index e4ec528..6eaffb5 100644
--- a/src/jsonata.js
+++ b/src/jsonata.js
@@ -2599,7 +2599,7 @@ var jsonata = (function() {
                     // update must be an object
                     var updateType = typeof update;
                     if(updateType !== 'undefined') {
-                        if(updateType !== 'object' || update === null) {
+                        if(updateType !== 'object' || update === null || Array.isArray(update)) {
                             // throw type error
                             throw {
                                 code: "T2011",


Test patch:
diff --git a/test/test-suite/groups/transforms/case012.json b/test/test-suite/groups/transforms/case012.json
new file mode 100644
index 0000000..7ca5e5c
--- /dev/null
+++ b/test/test-suite/groups/transforms/case012.json
@@ -0,0 +1,6 @@
+{
+    "expr": "{} ~> |$|['one', 'two', 'three']|",
+    "dataset": "dataset5",
+    "bindings": {},
+    "code": "T2011"
+}
Repository: goccy/go-yaml (go)

Issue:
Incorrect colon indicator scanning
**Describe the bug**

The scanner emits a colon indicator token when a map value of type string starts with a colon and appears at the document's second-to-last index (e.g., `a: :a`). Although this is a rare case, it causes the panic described in #479. This ongoing parsing operation with these tokens leads to a panic.

**To Reproduce**
 
```go
tokens := lexer.Tokenize("a: :a")
for _, t := range tokens {
  fmt.Printf("%q %v %v\n", t.Value, t.Indicator, t.CharacterType)
}
//"a" NotIndicator Miscellaneous
//":" BlockStructure Indicator
//":" BlockStructure Indicator
//"a" NotIndicator Miscellaneous
```

**Expected behavior**

We expected to get three tokens: key + colon + value.
Instead, we received: key + colon + colon + value.

**Version Variables**
 - Go version: 1.23.2
 - go-yaml's Version: master branch



Pull request:
Fix incorrect colon indicator scanning
fixes #484

`isNextEOS` should return `true` when the next `idx` is out of `src`

- [x] Describe the purpose for which you created this PR.  
- [ ] Create test code that corresponds to the modification

Patch:
diff --git a/scanner/context.go b/scanner/context.go
index 5f92a6e..b5ffabb 100644
--- a/scanner/context.go
+++ b/scanner/context.go
@@ -126,7 +126,7 @@ func (c *Context) isEOS() bool {
 }
 
 func (c *Context) isNextEOS() bool {
-	return len(c.src)-1 <= c.idx+1
+	return len(c.src) <= c.idx+1
 }
 
 func (c *Context) next() bool {


Test patch:
diff --git a/parser/parser_test.go b/parser/parser_test.go
index 2c64ce5..2ec0e7e 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -86,6 +86,7 @@ func TestParser(t *testing.T) {
 		"a: \r\n  b: 1\r\n",
 		"a_ok: \r  bc: 2\r",
 		"a_mk: \n  bd: 3\n",
+		"a: :a",
 	}
 	for _, src := range sources {
 		if _, err := parser.Parse(lexer.Tokenize(src), 0); err != nil {
Repository: capricorn86/happy-dom (ts)

Issue:
`document.links` is undefined
**Is your feature request related to a problem? Please describe.**
I'm using this API: https://developer.mozilla.org/en-US/docs/Web/API/Document/links
but it doesn't exist in happy-dom.

**Describe the solution you'd like**
Add `document.links`


Pull request:
#896@minor: Add document.links.
close #896 

Patch:
diff --git a/packages/happy-dom/src/nodes/document/Document.ts b/packages/happy-dom/src/nodes/document/Document.ts
index 20840dc6..38a28276 100644
--- a/packages/happy-dom/src/nodes/document/Document.ts
+++ b/packages/happy-dom/src/nodes/document/Document.ts
@@ -258,6 +258,13 @@ export default class Document extends Node implements IDocument {
 		}
 	}
 
+	/**
+	 * Returns a collection of all area elements and a elements in a document with a value for the href attribute.
+	 */
+	public get links(): IHTMLCollection<IHTMLElement> {
+		return <IHTMLCollection<IHTMLElement>>this.querySelectorAll('a[href],area[href]');
+	}
+
 	/**
 	 * Last element child.
 	 *
diff --git a/packages/happy-dom/src/nodes/document/IDocument.ts b/packages/happy-dom/src/nodes/document/IDocument.ts
index 8dc3475e..73cf79aa 100644
--- a/packages/happy-dom/src/nodes/document/IDocument.ts
+++ b/packages/happy-dom/src/nodes/document/IDocument.ts
@@ -45,6 +45,7 @@ export default interface IDocument extends IParentNode {
 	readonly documentURI: string;
 	readonly visibilityState: VisibilityStateEnum;
 	readonly hidden: boolean;
+	readonly links: IHTMLCollection<IHTMLElement>;
 	cookie: string;
 	title: string;
 


Test patch:
diff --git a/packages/happy-dom/test/nodes/document/Document.test.ts b/packages/happy-dom/test/nodes/document/Document.test.ts
index eaaa3a1d..cba8c4d3 100644
--- a/packages/happy-dom/test/nodes/document/Document.test.ts
+++ b/packages/happy-dom/test/nodes/document/Document.test.ts
@@ -77,6 +77,28 @@ describe('Document', () => {
 		});
 	});
 
+	describe('get links()', () => {
+		it('Returns a elements.', () => {
+			const link1 = document.createElement('a');
+			const link2 = document.createElement('a');
+			link1.setAttribute('href', '');
+
+			document.body.appendChild(link1);
+			document.body.appendChild(link2);
+
+			let links = document.links;
+
+			expect(links.length).toBe(1);
+			expect(links[0]).toBe(link1);
+
+			link2.setAttribute('href', '');
+			links = document.links;
+			expect(links.length).toBe(2);
+			expect(links[0]).toBe(link1);
+			expect(links[1]).toBe(link2);
+		});
+	});
+
 	describe('get scripts()', () => {
 		it('Returns script elements.', () => {
 			const div = document.createElement('div');
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 200
Good morning! Here's your coding interview problem for today.

This problem was asked by Microsoft.

Let `X` be a set of `n` intervals on the real line. We say that a set of points `P` "stabs" `X` if every interval in `X` contains at least one point in `P`. Compute the smallest set of points that stabs `X`.

For example, given the intervals `[(1, 4), (4, 5), (7, 9), (9, 12)]`, you should return `[4, 9]`.

Pull request:
Day200
Resolves #411.

Patch:
diff --git a/README.md b/README.md
index ff4f882..d334027 100644
--- a/README.md
+++ b/README.md
@@ -208,3 +208,4 @@ problems from
 * [Day 196](https://github.com/vaskoz/dailycodingproblem-go/issues/404)
 * [Day 197](https://github.com/vaskoz/dailycodingproblem-go/issues/405)
 * [Day 199](https://github.com/vaskoz/dailycodingproblem-go/issues/409)
+* [Day 200](https://github.com/vaskoz/dailycodingproblem-go/issues/411)
diff --git a/day200/problem.go b/day200/problem.go
new file mode 100644
index 0000000..8176b20
--- /dev/null
+++ b/day200/problem.go
@@ -0,0 +1,36 @@
+package day200
+
+import "sort"
+
+// Point is an integer representing a point on a line.
+type Point int
+
+// Interval on a line from start to end inclusive at both ends.
+type Interval struct {
+	Start, End Point
+}
+
+// StabIntervalPoints computes the smallest set of points that stabs X.
+// Runs in O(N log N), but modifies the input slice by sorting.
+func StabIntervalPoints(X []Interval) []Point {
+	if len(X) == 0 {
+		return nil
+	}
+	sort.Slice(X, func(i, j int) bool {
+		if X[i].End < X[j].End {
+			return true
+		} else if X[i].End == X[j].End {
+			return X[i].Start < X[j].Start
+		}
+		return false
+	})
+	P := []Point{X[0].End}
+	last := P[0]
+	for _, interval := range X {
+		if interval.Start > last {
+			last = interval.End
+			P = append(P, last)
+		}
+	}
+	return P
+}


Test patch:
diff --git a/day200/problem_test.go b/day200/problem_test.go
new file mode 100644
index 0000000..ae3dcd6
--- /dev/null
+++ b/day200/problem_test.go
@@ -0,0 +1,36 @@
+package day200
+
+import (
+	"reflect"
+	"testing"
+)
+
+var testcases = []struct {
+	X []Interval
+	P []Point
+}{
+	{[]Interval{{1, 4}, {4, 5}, {7, 9}, {9, 12}}, []Point{4, 9}},
+	{[]Interval{}, nil},
+	{nil, nil},
+	{[]Interval{{9, 12}, {7, 9}, {4, 5}, {1, 4}}, []Point{4, 9}},
+	{[]Interval{{9, 12}, {7, 9}, {4, 5}, {1, 4}, {3, 5}}, []Point{4, 9}},
+}
+
+func TestStabIntervalPoints(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		input := append([]Interval{}, tc.X...)
+		if result := StabIntervalPoints(input); !reflect.DeepEqual(result, tc.P) {
+			t.Errorf("Expected %v, got %v", tc.P, result)
+		}
+	}
+}
+
+func BenchmarkStabIntervalPoints(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			input := append([]Interval{}, tc.X...)
+			StabIntervalPoints(input)
+		}
+	}
+}
Repository: DevExpress/devextreme-vue (ts)

Issue:
DxDropDownBox throw error if value prop not set
### Issue Type
'bug report'

### Description
DxDropDownBox started throw error if value prop not set or set null
Error in mounted hook: "TypeError: Cannot read property 'length' of undefined"


### Environment Details
- devextreme version: 18.2.3
- devextreme-vue version: 18.2.3
- vue version: 2.5.17

DxList  Error in mounted hook: "TypeError: Cannot read property 'length' of undefined"
Issue Type
'bug report'

Description
DxListBox started throw error if you delete all items from list
Error in mounted hook: "TypeError: Cannot read property 'length' of undefined"

Environment Details
devextreme version: 18.2.3
devextreme-vue version: 18.2.3
vue version: 2.5.17

Pull request:
Add array check for previous value
Fix #200, fix #199 

Patch:
diff --git a/src/core/helpers.ts b/src/core/helpers.ts
index e75def2..5f2851f 100644
--- a/src/core/helpers.ts
+++ b/src/core/helpers.ts
@@ -19,7 +19,7 @@ export function isEqual(value1, value2) {
         return true;
     }
 
-    if (Array.isArray(value1)) {
+    if (Array.isArray(value1) && Array.isArray(value2)) {
         return value1.length === 0 && value2.length === 0;
     }
 


Test patch:
diff --git a/src/core/helpers.test.ts b/src/core/helpers.test.ts
index 8e50c4c..965d00b 100644
--- a/src/core/helpers.test.ts
+++ b/src/core/helpers.test.ts
@@ -28,4 +28,17 @@ describe("isEqual", () => {
         const testArray2 = [];
         expect(isEqual(testArray1, testArray2)).toBe(true);
     });
+
+    it("Empty Array and null", () => {
+        const testArray1 = [];
+        const testArray2 = null;
+        expect(isEqual(testArray1, testArray2)).toBe(false);
+        expect(isEqual(testArray2, testArray1)).toBe(false);
+    });
+
+    it("Date", () => {
+        const testDate1 = new Date(2018, 9, 9);
+        const testDate2 = new Date(2018, 9, 9);
+        expect(isEqual(testDate1, testDate2)).toBe(true);
+    });
 });