PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: jlongster/prettier (js)

Issue:
Semicolon being stripped out of export statement
In versions 0.0.8 and 0.0.7 (at least), the following export statement gets its semicolon stripped:

```
export default connect(mapStateToProps)(MyComponent);
```
becomes
```
export default connect(mapStateToProps)(MyComponent)
```

More info and a test case here: https://github.com/jlongster/prettier/pull/101#issuecomment-273381178

Pull request:
Fix missing semi when default exporting CallExpression
Fixes #288

Patch:
diff --git a/src/printer.js b/src/printer.js
index 66e58d462..78ed5c081 100644
--- a/src/printer.js
+++ b/src/printer.js
@@ -1843,7 +1843,8 @@ function printExportDeclaration(path, options, print) {
 
     if (
       decl.type === "ExportDefaultDeclaration" &&
-        decl.declaration.type == "Identifier"
+        (decl.declaration.type == "Identifier" ||
+          decl.declaration.type === "CallExpression")
     ) {
       parts.push(";");
     }


Test patch:
diff --git a/tests/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/arrows/__snapshots__/jsfmt.spec.js.snap
index 424b07289..8ae8dc655 100644
--- a/tests/arrows/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/arrows/__snapshots__/jsfmt.spec.js.snap
@@ -39,7 +39,7 @@ new (() => {});
 typeof (() => {
 });
 export default (() => {
-})()
+})();
 (() => {
 })()\`\`;
 (() => {
diff --git a/tests/es6modules/__snapshots__/jsfmt.spec.js.snap b/tests/es6modules/__snapshots__/jsfmt.spec.js.snap
index 3d36a0533..df441d6b2 100644
--- a/tests/es6modules/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/es6modules/__snapshots__/jsfmt.spec.js.snap
@@ -1347,6 +1347,13 @@ import {
 "
 `;
 
+exports[`test export_default_call_expression.js 1`] = `
+"export default connect(mapStateToProps)(MyComponent);
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+export default connect(mapStateToProps)(MyComponent);
+"
+`;
+
 exports[`test test_imports_are_frozen.js 1`] = `
 "/* @flow */
 
diff --git a/tests/es6modules/export_default_call_expression.js b/tests/es6modules/export_default_call_expression.js
new file mode 100644
index 000000000..c3fae600c
--- /dev/null
+++ b/tests/es6modules/export_default_call_expression.js
@@ -0,0 +1,1 @@
+export default connect(mapStateToProps)(MyComponent);
diff --git a/tests/function/__snapshots__/jsfmt.spec.js.snap b/tests/function/__snapshots__/jsfmt.spec.js.snap
index 8ad3ba76d..2cd319933 100644
--- a/tests/function/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/function/__snapshots__/jsfmt.spec.js.snap
@@ -376,7 +376,7 @@ new (function() {});
 typeof (function() {
 });
 export default (function() {
-})()
+})();
 (function() {
 })()\`\`;
 (function() {
Repository: reubeno/brush (rust)

Issue:
Bash arithmetic expressions are applied recursively
```console
$ brush --version
brush 0.2.14 (git:dd1d39c)

$ brush -c 'one=1 two=2 exp=one+two; echo $((exp))'
0

$ bash -c 'one=1 two=2 exp=one+two; echo $((exp))'
3
```

Pull request:
fix(arithmetic): recursively evaluate var references
In an arithmetic expression, we need to recursively parse and evaluate the body of any bare variable references.

Resolves #345.

Patch:
diff --git a/brush-core/src/arithmetic.rs b/brush-core/src/arithmetic.rs
index ae92d7c..c13257a 100644
--- a/brush-core/src/arithmetic.rs
+++ b/brush-core/src/arithmetic.rs
@@ -157,8 +157,10 @@ fn deref_lvalue(shell: &mut Shell, lvalue: &ast::ArithmeticTarget) -> Result<i64
         }
     };
 
-    let value: i64 = value_str.parse().unwrap_or(0);
-    Ok(value)
+    let parsed_value = brush_parser::arithmetic::parse(value_str.as_ref())
+        .map_err(|_err| EvalError::ParseError(value_str.to_string()))?;
+
+    parsed_value.eval(shell)
 }
 
 #[allow(clippy::unnecessary_wraps)]


Test patch:
diff --git a/brush-shell/tests/cases/arithmetic.yaml b/brush-shell/tests/cases/arithmetic.yaml
index 68b3fd0..096a46e 100644
--- a/brush-shell/tests/cases/arithmetic.yaml
+++ b/brush-shell/tests/cases/arithmetic.yaml
@@ -77,10 +77,27 @@ cases:
   - name: "Variable references"
     stdin: |
       x=10
-
       echo "x => $((x))"
       echo "x + 1 => $((x+1))"
 
+      y=
+      echo "y => $((y))"
+      echo "y + 1 => $((y+1))"
+
+      z=notnumber
+      echo "z => $((z))"
+      echo "z + 1 => $((z+1))"
+
+  - name: "Complex variable references"
+    stdin: |
+      x=10
+      y=20
+      z=x+y
+      a=z+z
+
+      echo "z => $((z))"
+      echo "a => $((a))"
+
   - name: "Nested expressions"
     stdin: |
       echo "1: $(($(echo -n 1; echo 2) + 37))"
@@ -119,6 +136,12 @@ cases:
       echo "--x == $((--x))"
       echo "x is now $x"
 
+  - name: "Assignment with references"
+    stdin: |
+      x=10+3
+      echo "y = x => $((y = x))"
+      echo "y is now $y"
+
   - name: "Assignments in logical boolean expressions"
     known_failure: false
     stdin: |