PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: Automattic/juice (js)

Issue:
'removeStyleTags' does not remove empty style tag
Check example of this issue here: https://runkit.com/nekocode/juice-empty-tag


Pull request:
fix #359
This PR fixes issue #359 

Patch:
diff --git a/lib/inline.js b/lib/inline.js
index 2899c04..c6e80f7 100644
--- a/lib/inline.js
+++ b/lib/inline.js
@@ -341,6 +341,9 @@ function getStylesData($, options) {
     styleElement = this;
     styleDataList = styleElement.childNodes;
     if (styleDataList.length !== 1) {
+      if (options.removeStyleTags) {
+        $(styleElement).remove();
+      }
       return;
     }
     styleData = styleDataList[0].data;


Test patch:
diff --git a/test/cases/juice-content/empty-style-tag.css b/test/cases/juice-content/empty-style-tag.css
new file mode 100644
index 0000000..e69de29
diff --git a/test/cases/juice-content/empty-style-tag.html b/test/cases/juice-content/empty-style-tag.html
new file mode 100644
index 0000000..0656ae1
--- /dev/null
+++ b/test/cases/juice-content/empty-style-tag.html
@@ -0,0 +1,6 @@
+<html>
+  <head>
+    <style></style>
+  </head>
+  <body></body>
+</html>
diff --git a/test/cases/juice-content/empty-style-tag.json b/test/cases/juice-content/empty-style-tag.json
new file mode 100644
index 0000000..2c37ae8
--- /dev/null
+++ b/test/cases/juice-content/empty-style-tag.json
@@ -0,0 +1,3 @@
+{
+  "removeStyleTags": true
+}
\ No newline at end of file
diff --git a/test/cases/juice-content/empty-style-tag.out b/test/cases/juice-content/empty-style-tag.out
new file mode 100644
index 0000000..14f27db
--- /dev/null
+++ b/test/cases/juice-content/empty-style-tag.out
@@ -0,0 +1,6 @@
+<html>
+  <head>
+    
+  </head>
+  <body></body>
+</html>
Repository: alloy-framework/alloy (ts)

Issue:
readonly attribute ignored for indexer InterfaceMember
```ts
   <ts.InterfaceMember
          readonly
          indexer="key: string"
          type="unknwown"
        />
```

produce 
```ts
  [key: string]: unknown;
```

Pull request:
Readonly indexers
Fixes #139 

Patch:
diff --git a/.chronus/changes/readonly-indexers-2025-4-1-11-23-58.md b/.chronus/changes/readonly-indexers-2025-4-1-11-23-58.md
new file mode 100644
index 0000000..3750578
--- /dev/null
+++ b/.chronus/changes/readonly-indexers-2025-4-1-11-23-58.md
@@ -0,0 +1,7 @@
+---
+changeKind: fix
+packages:
+  - "@alloy-js/typescript"
+---
+
+Include readonly for indexers
\ No newline at end of file
diff --git a/packages/typescript/src/components/Interface.tsx b/packages/typescript/src/components/Interface.tsx
index b1ae0f6..3261c08 100644
--- a/packages/typescript/src/components/Interface.tsx
+++ b/packages/typescript/src/components/Interface.tsx
@@ -106,7 +106,7 @@ export function InterfaceMember(props: InterfaceMemberProps) {
   if (props.indexer) {
     return (
       <>
-        [{props.indexer}]: {type}
+        {readonly}[{props.indexer}]: {type}
       </>
     );
   } else {


Test patch:
diff --git a/packages/typescript/test/interface.test.tsx b/packages/typescript/test/interface.test.tsx
index 75fa527..22ec7c6 100644
--- a/packages/typescript/test/interface.test.tsx
+++ b/packages/typescript/test/interface.test.tsx
@@ -95,7 +95,7 @@ it("can create readonly members", () => {
           name="circular"
           type={<Reference refkey={refkey("Foo")} />}
         />
-        <ts.InterfaceMember indexer="str: string" type="number" />
+        <ts.InterfaceMember readonly indexer="str: string" type="number" />
       </StatementList>
     </ts.InterfaceDeclaration>,
   );
@@ -104,7 +104,7 @@ it("can create readonly members", () => {
     interface Foo {
       readonly member: string;
       circular: Foo;
-      [str: string]: number;
+      readonly [str: string]: number;
     }
   `);
 });
Repository: jlongster/prettier (js)

Issue:
Changes ExpressionStatement into Directive
Input:

```js
("use strict")
```

Output:

```js
"use strict";
```

... which has changed the meaning of the code.

Expected:

```js
("use strict");
```

Found by reading [shift-codegen-js' source code](https://github.com/shapesecurity/shift-codegen-js/blob/8a9c8c1a72dd43044379bcd64003937caaa1678d/src/formatted-codegen.js#L1143-L1148)

https://jlongster.github.io/prettier/#%7B%22content%22%3A%22(%5C%22use%20strict%5C%22)%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3Afalse%2C%22bracketSpacing%22%3Atrue%2C%22doc%22%3Afalse%7D%7D


Pull request:
Fix use strict as expression statement
Should fix #536.

Patch:
diff --git a/src/fast-path.js b/src/fast-path.js
index 53ef717c2..d4dbca3a3 100644
--- a/src/fast-path.js
+++ b/src/fast-path.js
@@ -497,6 +497,11 @@ FPp.needsParens = function(assumeExpressionContext) {
         return name === "object" && parent.object === node;
       }
 
+    case "StringLiteral":
+      if (parent.type === "ExpressionStatement") {
+        return true;
+      }
+
     default:
       if (
         parent.type === "NewExpression" &&


Test patch:
diff --git a/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap b/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000..54a281bd1
--- /dev/null
+++ b/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,18 @@
+exports[`test no_regression.js 1`] = `
+"// Ensure no regression.
+\"use strict\";
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Ensure no regression.
+\"use strict\";
+
+"
+`;
+
+exports[`test use_strict.js 1`] = `
+"// Parentheses around expression statement should be preserved in this case.
+(\"use strict\");
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Parentheses around expression statement should be preserved in this case.
+(\"use strict\");
+"
+`;
diff --git a/tests/expression_statement/jsfmt.spec.js b/tests/expression_statement/jsfmt.spec.js
new file mode 100755
index 000000000..67caec390
--- /dev/null
+++ b/tests/expression_statement/jsfmt.spec.js
@@ -0,0 +1,2 @@
+// TODO: Re-enable Flow when the following fix is merged facebook/flow#3234.
+run_spec(__dirname, {parser: 'babylon'});
diff --git a/tests/expression_statement/no_regression.js b/tests/expression_statement/no_regression.js
new file mode 100644
index 000000000..8a5e0f44d
--- /dev/null
+++ b/tests/expression_statement/no_regression.js
@@ -0,0 +1,2 @@
+// Ensure no regression.
+"use strict";
diff --git a/tests/expression_statement/use_strict.js b/tests/expression_statement/use_strict.js
new file mode 100755
index 000000000..31bce8687
--- /dev/null
+++ b/tests/expression_statement/use_strict.js
@@ -0,0 +1,2 @@
+// Parentheses around expression statement should be preserved in this case.
+("use strict");
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 58
Good morning! Here's your coding interview problem for today.

This problem was asked by Amazon.

An sorted array of integers was rotated an unknown number of times.

Given such an array, find the index of the element in the array in faster than linear time. If the element doesn't exist in the array, return null.

For example, given the array [13, 18, 25, 2, 8, 10] and the element 8, return 4 (the index of 8 in the array).

You can assume all the integers in the array are unique.

Pull request:
Day58
Resolves #127 .

Patch:
diff --git a/README.md b/README.md
index 5787fc2..54fbb31 100644
--- a/README.md
+++ b/README.md
@@ -69,3 +69,4 @@ problems from
 * [Day 55](https://github.com/vaskoz/dailycodingproblem-go/issues/121)
 * [Day 56](https://github.com/vaskoz/dailycodingproblem-go/issues/123)
 * [Day 57](https://github.com/vaskoz/dailycodingproblem-go/issues/124)
+* [Day 58](https://github.com/vaskoz/dailycodingproblem-go/issues/127)
diff --git a/day58/problem.go b/day58/problem.go
new file mode 100644
index 0000000..a8ff039
--- /dev/null
+++ b/day58/problem.go
@@ -0,0 +1,31 @@
+package day58
+
+// IndexSortedRotated returns the index of a target in a sorted slice.
+// Runs in O(log N) time and O(1) space since the input slice is sorted.
+// Returns the index or -1 if it doesn't exist.
+func IndexSortedRotated(sorted []int, target int) int {
+	var low, mid, high int = 0, len(sorted) / 2, len(sorted)
+	for low < high {
+		if curr := sorted[mid]; curr == target {
+			return mid
+		} else if inRange(sorted[mid:high], target) {
+			low = mid
+			mid = (low + high) / 2
+		} else {
+			high = mid
+			mid = (low + high) / 2
+		}
+	}
+	return -1
+}
+
+func inRange(sorted []int, target int) bool {
+	if sorted[0] < sorted[len(sorted)-1] &&
+		target >= sorted[0] && target <= sorted[len(sorted)-1] {
+		return true
+	} else if sorted[0] > sorted[len(sorted)-1] &&
+		(target <= sorted[len(sorted)-1] || target >= sorted[0]) {
+		return true
+	}
+	return false
+}


Test patch:
diff --git a/day58/problem_test.go b/day58/problem_test.go
new file mode 100644
index 0000000..371bf5f
--- /dev/null
+++ b/day58/problem_test.go
@@ -0,0 +1,34 @@
+package day58
+
+import "testing"
+
+var testcases = []struct {
+	sorted   []int
+	target   int
+	expected int
+}{
+	{[]int{13, 18, 25, 2, 8, 10}, 8, 4},
+	{[]int{13, 18, 25, 27, 2, 8, 10}, 8, 5},
+	{[]int{13, 18, 25, 27, 2, 8, 10}, 18, 1},
+	{[]int{13, 18, 25, 27, 2, 8, 10}, 14, -1},
+	{[]int{13, 18, 25, 27, 30, 36, 54, 100, 2}, 2, 8},
+	{[]int{13, 18, 25, 27, 30, 36, 54, 100, 2}, 1, -1},
+	{[]int{13, 18, 25, 27, 30, 36, 54, 100, 2}, 13, 0},
+}
+
+func TestIndexSortedRotated(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if index := IndexSortedRotated(tc.sorted, tc.target); index != tc.expected {
+			t.Errorf("Expected %v got %v", tc.expected, index)
+		}
+	}
+}
+
+func BenchmarkIndexSortedRotated(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			IndexSortedRotated(tc.sorted, tc.target)
+		}
+	}
+}