PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: swc-project/swc (rust)

Issue:
transpiler: es3 needs brackets for __proto__ ?
i'm surprised that

```
function test(a, b){a.__proto__=b}
```
is transpiled to
```
function test(a,b){a["__proto__"]=b}
```
using
```
{
	"sourceMaps": false,
	"jsc": {
		"loose": true,
		"parser": {
			"syntax": "ecmascript"
		},
		"target": "es3",
		"minify": {
			"compress": true,
			"mangle": true
		}
	},
	"minify": true
}
```


Pull request:
fix(es/utils): Fix `is_valid_ident`
swc_ecma_utils:
 - Fix `is_valid_ident`. (Closes #2118)

Patch:
diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs
index 20ba3d512f..9b90c2bf69 100644
--- a/crates/swc_ecma_utils/src/lib.rs
+++ b/crates/swc_ecma_utils/src/lib.rs
@@ -1861,8 +1861,8 @@ pub fn is_valid_ident(s: &JsWord) -> bool {
     if s.len() == 0 {
         return false;
     }
-    let first = s.chars().next().unwrap();
-    UnicodeXID::is_xid_start(first) && s.chars().skip(1).all(UnicodeXID::is_xid_continue)
+
+    Ident::verify_symbol(&s).is_ok()
 }
 
 pub fn drop_span<T>(mut t: T) -> T


Test patch:
diff --git a/crates/swc/tests/fixture/iissue-2118/input/.swcrc b/crates/swc/tests/fixture/iissue-2118/input/.swcrc
new file mode 100644
index 0000000000..28be1dfd6d
--- /dev/null
+++ b/crates/swc/tests/fixture/iissue-2118/input/.swcrc
@@ -0,0 +1,15 @@
+{
+    "sourceMaps": false,
+    "jsc": {
+        "loose": true,
+        "parser": {
+            "syntax": "ecmascript"
+        },
+        "target": "es3",
+        "minify": {
+            "compress": true,
+            "mangle": true
+        }
+    },
+    "minify": true
+}
\ No newline at end of file
diff --git a/crates/swc/tests/fixture/iissue-2118/input/index.js b/crates/swc/tests/fixture/iissue-2118/input/index.js
new file mode 100644
index 0000000000..b3010c47b4
--- /dev/null
+++ b/crates/swc/tests/fixture/iissue-2118/input/index.js
@@ -0,0 +1,3 @@
+function test(a, b) {
+    a.__proto__ = b
+}
diff --git a/crates/swc/tests/fixture/iissue-2118/output/index.js b/crates/swc/tests/fixture/iissue-2118/output/index.js
new file mode 100644
index 0000000000..f83c952183
--- /dev/null
+++ b/crates/swc/tests/fixture/iissue-2118/output/index.js
@@ -0,0 +1,1 @@
+function test(a,b){a.__proto__=b}
diff --git a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-determanated-instance-methods/output.mjs b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-determanated-instance-methods/output.mjs
index d69116ed87..ac5ab1ae48 100644
--- a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-determanated-instance-methods/output.mjs
+++ b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-determanated-instance-methods/output.mjs
@@ -16,7 +16,7 @@ a.values();
 ''.includes();
 /./gi.flags;
 ''.indexOf();
-a["__defineGetter__"]('foo', function() {
+a.__defineGetter__('foo', function() {
     return 42;
 });
 a.trim;
Repository: AlecStrong/sql-psi (kotlin)

Issue:
Allow functions containing keywords instead of commas
Dialect: [HSQLDB](http://hsqldb.org/doc/guide/builtinfunctions-chapt.html), [MySQL](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_substring), [PostgreSQL](https://www.postgresql.org/docs/9.1/functions-string.html)

Some functions allow replacing the commas in an argument list with keywords. 

Failing SQL:

```sql
SELECT substring('Thomas' from 2 for 3)
```

Pull request:
Closes https://github.com/AlecStrong/sql-psi/issues/189

Patch:
diff --git a/.gitignore b/.gitignore
index c3284bf2..f6c34d3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ out/
 lib/
 build/
 .DS_Store
+local.properties
diff --git a/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf b/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf
index f062d25f..73386e84 100644
--- a/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf
+++ b/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf
@@ -255,7 +255,7 @@ binary_and_expr ::= expr AND expr {
 binary_or_expr ::= expr OR expr {
   implements = "com.alecstrong.sql.psi.core.psi.SqlBinaryExpr"
 }
-function_expr ::= function_name '(' [ [ DISTINCT ] expr ( ',' expr ) * | '*' ] ')'
+function_expr ::= function_name '(' [ [ DISTINCT ] expr ( ( ',' | FROM | FOR ) expr ) * | '*' ] ')'
 paren_expr ::= '(' expr ')' {
   pin = 1
 }


Test patch:
diff --git a/test-fixtures/src/main/resources/fixtures/function-from-for/Test.s b/test-fixtures/src/main/resources/fixtures/function-from-for/Test.s
new file mode 100644
index 00000000..a5d42c04
--- /dev/null
+++ b/test-fixtures/src/main/resources/fixtures/function-from-for/Test.s
@@ -0,0 +1,1 @@
+SELECT substring(DISTINCT 'Thomas' , 2);
\ No newline at end of file
diff --git a/test-fixtures/src/main/resources/fixtures/function-name-for/Test.s b/test-fixtures/src/main/resources/fixtures/function-name-for/Test.s
new file mode 100644
index 00000000..8ba7ecb0
--- /dev/null
+++ b/test-fixtures/src/main/resources/fixtures/function-name-for/Test.s
@@ -0,0 +1,1 @@
+SELECT substring('Thomas' FROM 2 FOR 3);
\ No newline at end of file