PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: auth0/auth0.js (js)

Issue:
9.1.2: Error with redirectUri origin
Since the latest version 9.1.2 I get an error:
"The redirectUri's origin (http://localhost) should match the window's origin (http://localhost:3010)."

I'm pretty sure its because of this commit: https://github.com/auth0/auth0.js/commit/ceed49706f9af24eaf49ad21b778cad0d0ca3b49

Since the port is omitted, it won't use the correct port.

When I go back to previous version 9.1.0, it works great.

Pull request:
Use origin.port when available
fix #640

Patch:
diff --git a/src/helper/object.js b/src/helper/object.js
index 4151f68..f82fb7b 100644
--- a/src/helper/object.js
+++ b/src/helper/object.js
@@ -125,7 +125,11 @@ function getOriginFromUrl(url) {
   var doc = windowHelper.getDocument();
   var anchor = doc.createElement('a');
   anchor.href = url;
-  return anchor.protocol + '//' + anchor.hostname;
+  var origin = anchor.protocol + '//' + anchor.hostname;
+  if (anchor.port) {
+    origin += ':' + anchor.port;
+  }
+  return origin;
 }
 
 module.exports = {


Test patch:
diff --git a/test/helper/object.test.js b/test/helper/object.test.js
index aa6d316..440ba87 100644
--- a/test/helper/object.test.js
+++ b/test/helper/object.test.js
@@ -540,5 +540,24 @@ describe('helpers', function() {
       expect(anchor.href).to.be(url);
       windowHelper.getDocument.restore();
     });
+    it('should use add the `port` when available', function() {
+      var anchor = {
+        protocol: 'https:',
+        hostname: 'localhost',
+        port: 3000
+      };
+      stub(windowHelper, 'getDocument', function() {
+        return {
+          createElement: function createElement(e) {
+            expect(e).to.be('a');
+            return anchor;
+          }
+        };
+      });
+      var url = 'https://localhost:3000/example';
+      expect(objectHelper.getOriginFromUrl(url)).to.be('https://localhost:3000');
+      expect(anchor.href).to.be(url);
+      windowHelper.getDocument.restore();
+    });
   });
 });
Repository: MiSawa/xq (rust)

Issue:
Get placeholder error on del/1 function
```sh
❯ jq -n '{x:[1]} | del(.x[0],.x)'
{}

❯ xq -n '{x:[1]} | del(.x[0],.x)'
Error: IndexOnNonIndexable("placeholder")
```

Pull request:
Fix placeholder error
Fix #71 

Patch:
diff --git a/src/compile/compiler.rs b/src/compile/compiler.rs
index 329c905..4fc0556 100644
--- a/src/compile/compiler.rs
+++ b/src/compile/compiler.rs
@@ -252,7 +252,9 @@ impl Scope {
     }
 
     fn require_slot(&self) -> bool {
-        self.next_variable_slot_id > 0 || self.next_closure_slot_id > 0 || self.next_label_slot_id > 0
+        self.next_variable_slot_id > 0
+            || self.next_closure_slot_id > 0
+            || self.next_label_slot_id > 0
     }
 
     fn has_slot_leaked_scope(&self) -> bool {
diff --git a/src/intrinsic/path.rs b/src/intrinsic/path.rs
index 6125889..82292fa 100644
--- a/src/intrinsic/path.rs
+++ b/src/intrinsic/path.rs
@@ -33,7 +33,24 @@ pub(crate) fn del_paths(context: Value, paths: Value) -> Result<Value> {
                     v => return Err(QueryExecutionError::PathNotArray(v.clone())),
                 }
             }
-            paths.sort_by_key(|p| p.len());
+            fn depth(path: &[Value]) -> usize {
+                // Indexing or slicing preceded by a slicing doesn't increment the depth of the
+                // values that it going to delete.
+                // To calculate the depth, we can count non-slicing indexings, and increment
+                // if the last component was a slicing.
+                let non_slice_len = path
+                    .iter()
+                    .filter(|i| !matches!(i, Value::Object(_)))
+                    .count();
+                let last_slice = path
+                    .last()
+                    .filter(|i| matches!(i, Value::Object(_)))
+                    .map(|_| 1)
+                    .unwrap_or(0);
+                non_slice_len + last_slice
+            }
+            // We delete from deeper ones so we can raise errors.
+            paths.sort_by_key(|p| std::cmp::Reverse(depth(p)));
             let mut value = context.clone();
             for path in paths {
                 value =


Test patch:
diff --git a/tests/hand_written/mod.rs b/tests/hand_written/mod.rs
index fbcceb6..ca69b31 100644
--- a/tests/hand_written/mod.rs
+++ b/tests/hand_written/mod.rs
@@ -533,3 +533,56 @@ test!(
     -6
     "#
 );
+
+test!(
+    delete1,
+    r#"
+    [1,2,3] | (del(.[1:2][0]), del(.[1:2][1], .[1]))
+    "#,
+    r#"
+    null
+    "#,
+    r#"
+    [1,3]
+    [1,3]
+    "#
+);
+
+test!(
+    delete2,
+    r#"
+    {x:[1]} | del(.x[0],.x)
+    "#,
+    r#"
+    null
+    "#,
+    r#"
+    {}
+    "#
+);
+
+test!(
+    delete3,
+    r#"
+    try ({x:[1]} | del(.x.y, .x[0], .x)) catch "err"
+    "#,
+    r#"
+    null
+    "#,
+    r#"
+    "err"
+    "#
+);
+
+test!(
+    delete4,
+    r#"
+    try ({x:[1]} | del(.x[0], .x.y, .x)) catch "err"
+    "#,
+    r#"
+    null
+    "#,
+    r#"
+    "err"
+    "#
+);