PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: keikoproj/instance-manager (go)

Issue:
Cluster DNS calculation assumes that service cidr range is /16
**Is this a BUG REPORT or FEATURE REQUEST?**:
BUG REPORT 
**What happened**:
Pods running on AL2 nodes started having DNS issues when running the latest version of instance manager. Upon investigation, 
this appears to be because the EKS Cluster CIDR block is a /12 range - which causes this string replacement to fail https://github.com/keikoproj/instance-manager/blob/master/controllers/providers/aws/eks.go#L222. 

**What you expected to happen**:
Pods should have working cluster DNS.
**How to reproduce it (as minimally and precisely as possible)**:
Have an EKS cluster with a ServiceCidr range that is not a /16 and run AL2 nodes.
**Anything else we need to know?**:

**Environment**:

- Kubernetes version:

```bash
kubectl version -o yaml
```

**Other debugging information (if applicable)**:

- InstanceGroup status:

```bash
kubectl describe instancegroup <ig-name>
```

- controller logs:

```bash
kubectl logs <instance-manager pod>
```


Pull request:
fix: calculate cluster dns correctly for non /16 blocks
Closes #318 
Signed-off-by: Jonah Back <jonah@jonahback.com>

Patch:
diff --git a/controllers/providers/aws/eks.go b/controllers/providers/aws/eks.go
index 8f3922d..3bf2d36 100644
--- a/controllers/providers/aws/eks.go
+++ b/controllers/providers/aws/eks.go
@@ -218,6 +218,10 @@ func (w *AwsWorker) GetDNSClusterIP(cluster *eks.Cluster) string {
 		return ""
 	}
 	serviceCidr := aws.StringValue(cluster.KubernetesNetworkConfig.ServiceIpv4Cidr)
-	// addresses assigned from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks
-	return strings.ReplaceAll(serviceCidr, "0/16", "10")
+	// addresses are by default assigned from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks.
+	// custom ranges could be blocks that are not /16 size.
+	ip := strings.Split(serviceCidr, "/")[0] // remove block size
+	blocks := strings.Split(ip, ".")
+	blocks[3] = "10" // replace last byte in IP address with "10" as is the convention
+	return strings.Join(blocks, ".")
 }


Test patch:
diff --git a/controllers/providers/aws/eks_test.go b/controllers/providers/aws/eks_test.go
new file mode 100644
index 0000000..6e2c8fe
--- /dev/null
+++ b/controllers/providers/aws/eks_test.go
@@ -0,0 +1,19 @@
+package aws
+
+import (
+	"github.com/aws/aws-sdk-go/service/eks"
+	"github.com/onsi/gomega"
+	"testing"
+)
+
+func TestClusterDns(t *testing.T) {
+	var (
+		g       = gomega.NewGomegaWithT(t)
+	)
+
+	awsWorker := AwsWorker{}
+	cidr := "172.16.0.0/12"
+	ip := awsWorker.GetDNSClusterIP(&eks.Cluster{KubernetesNetworkConfig: &eks.KubernetesNetworkConfigResponse{ServiceIpv4Cidr: &cidr}})
+	g.Expect(ip).To(gomega.Equal("172.16.0.10"))
+
+}
\ No newline at end of file
Repository: swc-project/swc (rust)

Issue:
minifier: self-referential var declaration makes inlining invalid
### Describe the bug

When var declaration has itself as a rhs expression, minifier inlines rhs expression without handling possible ReferenceError.

### Input code

```typescript
const k = (() => {
    var x = x;
    return x;
})();
```


### Config

_No response_

### Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.4.13&code=H4sIAAAAAAAAA0vOzysuUchWsFXQ0NBUsLVTqOZSAIKyxCKFCqBghTWYW5RaUlqUB%2BLVampoWnMBAHUc1Rk2AAAA&config=H4sIAAAAAAAAA32UO3LjMAyG%2B5zCozrFjostcoDtcgYOLYIyvSShIUDHmozvvtDDj40hdRI%2B%2FAAJgPh%2B2%2B2aE7XNx%2B5bPuWnt4Wg3P%2FFQkNmexFLA22y1JbQc%2FN%2BoycakbeRYDJdZ9KwLR3wpKL9r%2F1%2BUTQRkeCmWGwp5OCH55wtpr4A0ZNNrBKyJshM%2F%2BsXVvBrBFzqs%2F2AGMHmDWIsmZAZOiha4BZjtD2BOduiRBlPaksg1FKMsDI40xfsVZ5d4IBZcr5SB9aZFh0oKBRoOZxBk0kukWWS6yn3mbCDQ%2B26qc8%2F1HC2sVpWcsJlaomcVol6xEBsfM1aCWe4UoMZLsX9qQzeFOBa8qvuhCGv9OQvgFQgWqJsE2hxJw8v87Sm9pvKkL2MLA8Kl%2FnWbpmhk6KaELxS2bEyUDho3SzgagtjZVvtOAteKR8FBwa8l1lRQtNX4PaoJeWhB%2FQKkP5ar03VDMz9Fa7w8UFs4D9yS9YHbPFIlo%2FrlIZ0wLiRIAEf0W04SCsY13GRLXHp13nNDmQ0wKkulSbwugTkATCaOO3Ll9mQ5yERTRfx8FgTi8P1voeTzd3jvc%2Br%2BG1xaBK6OsFlyY%2F9nVfz7%2BbhdNvC94M3gT5vyjns9R%2F7ntJqMQYAAA%3D%3D

### SWC Info output

_No response_

### Expected behavior

```javascript
let k = void 0;
```

### Actual behavior

```javascript
let k = x;
```

The result occurs ReferenceError due to a dangling usage of `x`.

### Version

1.4.13

### Additional context

_No response_

Pull request:
fix(es/minifier): Abort seq inline on recursive usage
**Related issue:**

 - Closes #8841

Patch:
diff --git a/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs b/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs
index 2a90e3c432..b1422fcc87 100644
--- a/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs
+++ b/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs
@@ -2308,7 +2308,7 @@ impl Optimizer<'_> {
                         can_take_init = true;
                     }
 
-                    if usage.inline_prevented {
+                    if usage.inline_prevented || usage.used_recursively {
                         return Ok(false);
                     }
 


Test patch:
diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8841/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8841/input.js
new file mode 100644
index 0000000000..c34cb561be
--- /dev/null
+++ b/crates/swc_ecma_minifier/tests/fixture/issues/8841/input.js
@@ -0,0 +1,4 @@
+export const k = (() => {
+    var x = x;
+    return x;
+})();
diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8841/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8841/output.js
new file mode 100644
index 0000000000..45a235405a
--- /dev/null
+++ b/crates/swc_ecma_minifier/tests/fixture/issues/8841/output.js
@@ -0,0 +1,2 @@
+var x;
+export const k = x;
Repository: CycloneDX/cyclonedx-core-java (java)

Issue:
LicensesChoice returns only one license
Version `8.0.0` does not return multiple licenses. 
In Version `7.3.2` there were multiple versions. 

Example `jakarta.servlet-api` defines two licenses in the [pom.xml](https://repo1.maven.org/maven2/jakarta/servlet/jakarta.servlet-api/6.0.0/jakarta.servlet-api-6.0.0.pom).

When I use the `cyclonedx-maven-plugin` to generate a bom.json the output is correct.
```
      "licenses" : [
        {
          "license" : {
            "id" : "EPL-2.0"
          }
        },
        {
          "license" : {
            "id" : "GPL-2.0-with-classpath-exception"
          }
        }
      ]
```
But the `LicenseChoice` does not have anymore both licenses.

Is this a bug? Or why was this changed? 

Pull request:
Fix multiple licenses deserialization
Fixes #334 

Patch:
diff --git a/src/main/java/org/cyclonedx/util/deserializer/LicenseDeserializer.java b/src/main/java/org/cyclonedx/util/deserializer/LicenseDeserializer.java
index d4dd3b0b1..5cdddeb66 100644
--- a/src/main/java/org/cyclonedx/util/deserializer/LicenseDeserializer.java
+++ b/src/main/java/org/cyclonedx/util/deserializer/LicenseDeserializer.java
@@ -37,19 +37,18 @@ public class LicenseDeserializer extends JsonDeserializer<LicenseChoice>
     JsonNode rootNode = p.getCodec().readTree(p);
     if (!rootNode.isEmpty()) {
       ArrayNode nodes = (rootNode.isArray() ? (ArrayNode) rootNode : new ArrayNode(null).add(rootNode));
+      LicenseChoice licenseChoice = new LicenseChoice();
 
       for (JsonNode node : nodes) {
-        LicenseChoice licenseChoice = new LicenseChoice();
-
         if (node.has("license")) {
           processLicenseNode(p, node.get("license"), licenseChoice);
-          return licenseChoice;
         }
         else if (node.has("expression")) {
           licenseChoice.setExpression(node.get("expression").asText());
           return licenseChoice;
         }
       }
+      return licenseChoice;
     }
     return null;
   }


Test patch:
diff --git a/src/test/java/org/cyclonedx/parsers/JsonParserTest.java b/src/test/java/org/cyclonedx/parsers/JsonParserTest.java
index 3c09525f8..4091e4d8c 100644
--- a/src/test/java/org/cyclonedx/parsers/JsonParserTest.java
+++ b/src/test/java/org/cyclonedx/parsers/JsonParserTest.java
@@ -163,6 +163,9 @@ public class JsonParserTest
         assertCompositions(bom, Version.VERSION_15);
         assertVulnerabilities(bom, Version.VERSION_15);
 
+        //Assert Metadata License Choice
+        assertEquals(2, bom.getMetadata().getLicenseChoice().getLicenses().size());
+
         // Dependencies
         assertEquals(2, bom.getDependencies().size());
         Dependency d1 = bom.getDependencies().get(0);
diff --git a/src/test/resources/bom-1.5.json b/src/test/resources/bom-1.5.json
index e65f064f0..f91b59113 100644
--- a/src/test/resources/bom-1.5.json
+++ b/src/test/resources/bom-1.5.json
@@ -118,6 +118,11 @@
         "license": {
           "id": "Apache-2.0"
         }
+      },
+      {
+        "license": {
+          "id": "MIT"
+        }
       }
     ]
   },
Repository: ResearchObject/ro-crate-py (python)

Issue:
BUG: If Root Data Entity has an arcp:// ID the arcp:// part gets stripped off it
Here's some code to reproduce the error:

```python
from rocrate.rocrate import ROCrate
import json
import os
test_crate = {
  "@context": [
    "https://w3id.org/ro/crate/1.1/context",
    {
      "@vocab": "http://schema.org/"
    }
  ],
  "@graph": [
    {
      "@id": "ro-crate-metadata.json",
      "@type": "CreativeWork",
      "conformsTo": [
        {
          "@id": "https://w3id.org/ro/crate/1.2"
        }
      ],
      "about": {
        "@id": "arcp://name,corpus-of-oz-early-english"
      }
     
      
    },
    {"@id": "arcp://name,corpus-of-oz-early-english", "@type": "Dataset"}
  ]}
os.makedirs("test_crate", exist_ok=True)
f = open("test_crate/ro-crate-metadata.json","w")
f.write(json.dumps(test_crate, indent=2))
f.close()
crate = ROCrate("test_crate")
print("ID of root dataset", crate.root_dataset.id) # name,corpus-of-oz-early-english 

print("ID of original", test_crate["@graph"][1]["@id"]) # arcp://name,corpus-of-oz-early-english
print("same?", crate.root_dataset.id == test_crate["@graph"][1]["@id"])

```

Pull request:
Fix is_url
Fixes #167.

The `is_url` utility failed to recognize URLs that don't have a path part, e.g. `http://example.com`.

Patch:
diff --git a/rocrate/utils.py b/rocrate/utils.py
index 18aa6f2..434fb41 100644
--- a/rocrate/utils.py
+++ b/rocrate/utils.py
@@ -33,7 +33,7 @@ def is_url(string):
     parts = urlsplit(string)
     if os.name == "nt" and len(parts.scheme) == 1:
         return False
-    return all((parts.scheme, parts.path))
+    return bool(parts.scheme)
 
 
 def iso_now():


Test patch:
diff --git a/test/test_utils.py b/test/test_utils.py
index 7b0607b..20a8504 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -18,7 +18,7 @@
 
 import pytest
 
-from rocrate.utils import subclasses, get_norm_value
+from rocrate.utils import subclasses, get_norm_value, is_url
 
 
 class Pet:
@@ -53,3 +53,12 @@ def test_get_norm_value():
     assert get_norm_value({"@id": "#xyz"}, "name") == []
     with pytest.raises(ValueError):
         get_norm_value({"@id": "#xyz", "name": [["foo"]]}, "name")
+
+
+def test_is_url():
+    assert is_url("http://example.com/index.html")
+    assert is_url("http://example.com/")
+    assert is_url("http://example.com")
+    assert not is_url("/etc/")
+    assert not is_url("/etc")
+    assert not is_url("/")