PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: brenolf/polyjuice (js)

Issue:
Add `requireCapitalizedConstructorsNew` rule
http://jscs.info/rule/requireCapitalizedConstructorsNew

Pull request:
Resolves #51

Patch:
diff --git a/lib/dictionaries/jscs/requireCapitalizedConstructorsNew.js b/lib/dictionaries/jscs/requireCapitalizedConstructorsNew.js
new file mode 100644
index 0000000..45fe17b
--- /dev/null
+++ b/lib/dictionaries/jscs/requireCapitalizedConstructorsNew.js
@@ -0,0 +1,27 @@
+/**
+* @fileoverview Translation for `requireCapitalizedConstructorsNew` (JSCS) to ESLint
+* @author Breno Lima de Freitas <https://breno.io>
+* @copyright 2016 Breno Lima de Freitas. All rights reserved.
+* See LICENSE file in root directory for full license.
+*/
+
+'use strict'
+
+//------------------------------------------------------------------------------
+// Rule Translation Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+  name: 'new-cap',
+  truthy: function(__current__, value) {
+    if (value !== true) {
+      return [2, {
+        capIsNewExceptions: value.allExcept
+      }]
+    }
+
+    return [2, {
+      capIsNewExceptions: []
+    }]
+  }
+};


Test patch:
diff --git a/test/dictionaries/jscs/requireCapitalizedConstructorsNew.test.js b/test/dictionaries/jscs/requireCapitalizedConstructorsNew.test.js
new file mode 100644
index 0000000..343ce45
--- /dev/null
+++ b/test/dictionaries/jscs/requireCapitalizedConstructorsNew.test.js
@@ -0,0 +1,32 @@
+/**
+ * @fileoverview Tests for `requireCapitalizedConstructorsNew` (JSCS) translation
+ * @author Breno Lima de Freitas <https://breno.io>
+ * @copyright 2016 Breno Lima de Freitas. All rights reserved.
+ * See LICENSE file in root directory for full license.
+ */
+
+'use strict'
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+var lib = require('../../../lib/dictionaries/jscs/requireCapitalizedConstructorsNew.js')
+
+var getFn = caller(lib)
+
+describe('jscs#requireCapitalizedConstructorsNew', function() {
+  it('converts the rule correctly', function() {
+    var fn = getFn()
+
+    expect(fn(true)).to.eql([2, {
+      capIsNewExceptions: []
+    }])
+
+    expect(fn({
+      allExcept: ['A', 'B', 'C']
+    })).to.eql([2, {
+      capIsNewExceptions: ['A', 'B', 'C']
+    }])
+  })
+})
Repository: inovex/scrumlr.io (ts)

Issue:
Change CMD+A hotkey
CMD+A is usually used to select the whole text, but it's now mapped to change the setting of show all authors. We should change that and update the hotkey PDF
Change CMD+1/2/3 hotkey
CMD+1/2/3 is used to switch between different tabs in most browsers and we should change the hotkey

Pull request:
Update Hotkey keys
- select note input is now mapped to "shift + < index >"
- show authors is now mapped to "shift + a"

this should close #2242  and also close #2243

Patch:
diff --git a/src/constants/hotkeys.ts b/src/constants/hotkeys.ts
index 06c031c9..398cbed9 100644
--- a/src/constants/hotkeys.ts
+++ b/src/constants/hotkeys.ts
@@ -6,9 +6,9 @@ export const hotkeyMap = {
   SHOW_TIMER_MENU: "t",
   SHOW_VOTING_MENU: "v",
   SHOW_SETTINGS: "s",
-  TOGGLE_SHOW_AUTHORS: "cmd+a, ctrl+a",
+  TOGGLE_SHOW_AUTHORS: "option+a, alt+a",
   TOGGLE_SHOW_OTHER_USERS_NOTES: "cmd+u, ctrl+u",
   TOGGLE_COLUMN_VISIBILITY: "cmd+j, ctrl+j",
-  SELECT_NOTE_INPUT_FIRST_KEY: ["cmd", "ctrl"],
+  SELECT_NOTE_INPUT_FIRST_KEY: ["option", "alt"],
   SET_TIMER_FIRST_KEY: ["ctrl+t"],
 };
diff --git a/src/routes/Hotkeys/Hotkeys.tsx b/src/routes/Hotkeys/Hotkeys.tsx
index b98b6be6..aaf68ff9 100644
--- a/src/routes/Hotkeys/Hotkeys.tsx
+++ b/src/routes/Hotkeys/Hotkeys.tsx
@@ -1,3 +1,3 @@
 import {Navigate} from "react-router-dom";
 
-export const Hotkeys = () => <Navigate to={`${process.env.PUBLIC_URL}/hotkeys.pdf`} />;
+export const Hotkeys = () => <Navigate to={`${process.env.PUBLIC_URL}/hotkeys.pddf`} />;


Test patch:
diff --git a/src/components/Column/__tests__/__snapshots__/Column.test.tsx.snap b/src/components/Column/__tests__/__snapshots__/Column.test.tsx.snap
index f61b3020..93706e84 100644
--- a/src/components/Column/__tests__/__snapshots__/Column.test.tsx.snap
+++ b/src/components/Column/__tests__/__snapshots__/Column.test.tsx.snap
@@ -15,7 +15,7 @@ exports[`Column should have correct style show column with correct style 1`] = `
       >
         <input
           class="note-input__input"
-          data-tip="CMD/CTRL + 1"
+          data-tip="OPTION/ALT + 1"
           maxlength="1024"
           placeholder="Add your note..."
           type="text"
Repository: pinojs/pino (js)

Issue:
BUG: formatting breaks when 1st parameter is an object
### Scenario

create a logger. emit an entry with first parameter as a data object

```javascript
> const log = require('pino')();
undefined
> log.info({}, "foo %s", "bar");
```

### Expect
well formatted log entry
```
{"pid":25540,"hostname":"My-PC","name":"foo","level":30,"time":1480447139327,"msg":"foo bar"}
```

### Found
An Error is thrown
```
TypeError: s.indexOf is not a function
    at countInterp (C:\ws\nodejs\cwt-oapi-util\node_modules\cwt-logger\node_modules\pino\pino.js:378:13)
    at EventEmitter.LOG (C:\ws\nodejs\cwt-oapi-util\node_modules\cwt-logger\node_modules\pino\pino.js:409:11)
    at repl:1:7
    at sigintHandlersWrap (vm.js:22:35)
    at sigintHandlersWrap (vm.js:96:12)
    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
    at REPLServer.defaultEval (repl.js:313:29)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.<anonymous> (repl.js:513:10)
```


### More info:
version `3.0.2`
does not reproduce with version `2.15.0` (regression)

Pull request:
Fix #139
Fixes https://github.com/pinojs/pino/issues/139.

@osher please checks if it solves your issues.

Patch:
diff --git a/pino.js b/pino.js
index f4181b7..b6aedc8 100644
--- a/pino.js
+++ b/pino.js
@@ -406,8 +406,8 @@ function genLog (z) {
     }
     p = n.length = arguments.length - l
     if (p > 1) {
-      l = countInterp(a, '%j')
-      if (l && typeof a === 'string') {
+      l = typeof a === 'string' ? countInterp(a, '%j') : 0
+      if (l) {
         n.length = l + countInterp(a, '%d') + countInterp(a, '%s') + 1
         o = `${util.format.apply(null, n)}`
       } else {


Test patch:
diff --git a/test/basic.test.js b/test/basic.test.js
index 3502971..b1cea58 100644
--- a/test/basic.test.js
+++ b/test/basic.test.js
@@ -292,6 +292,42 @@ test('correctly escape msg strings', function (t) {
   instance.fatal('this contains "')
 })
 
+// https://github.com/pinojs/pino/issues/139
+test('object and format string', function (t) {
+  var instance = pino(sink(function (chunk, enc, cb) {
+    delete chunk.time
+    t.deepEqual(chunk, {
+      pid: pid,
+      hostname: hostname,
+      level: 30,
+      msg: 'foo bar',
+      v: 1
+    })
+    t.end()
+    cb()
+  }))
+
+  instance.info({}, 'foo %s', 'bar')
+})
+
+test('object and format string property', function (t) {
+  var instance = pino(sink(function (chunk, enc, cb) {
+    delete chunk.time
+    t.deepEqual(chunk, {
+      pid: pid,
+      hostname: hostname,
+      level: 30,
+      msg: 'foo bar',
+      answer: 42,
+      v: 1
+    })
+    t.end()
+    cb()
+  }))
+
+  instance.info({ answer: 42 }, 'foo %s', 'bar')
+})
+
 test('correctly strip undefined when returned from toJSON', function (t) {
   t.plan(1)
Repository: chaijs/chai (js)

Issue:
Add 'catch' to proxyExcludedKeys
As discussed [here](https://github.com/domenic/chai-as-promised/issues/220#issuecomment-328989791) it would be great if the keyword `catch` could also be added to [`proxyExcludedKeys`](https://github.com/chaijs/chai/blob/0d19b3518265ba0ff17689a3ae1dc7e7b6c6bf16/lib/chai/config.js#L93):
in `lib/chai/config.js`.
Thanks go to @meeber 

Pull request:
add 'catch' keyword to proxyExcludedKeys
closes #1050

Patch:
diff --git a/lib/chai/config.js b/lib/chai/config.js
index ca1e30a..412a0c8 100644
--- a/lib/chai/config.js
+++ b/lib/chai/config.js
@@ -90,5 +90,5 @@ module.exports = {
    * @api public
    */
 
-  proxyExcludedKeys: ['then', 'inspect', 'toJSON']
+  proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON']
 };


Test patch:
diff --git a/test/configuration.js b/test/configuration.js
index 1f929d1..7127314 100644
--- a/test/configuration.js
+++ b/test/configuration.js
@@ -788,8 +788,8 @@ describe('configuration', function () {
       }
     };
 
-    it('should have default value equal to `[\'then\', \'inspect\', \'toJSON\']`', function() {
-      expect(chai.config.proxyExcludedKeys).to.be.deep.equal(['then', 'inspect', 'toJSON']);
+    it('should have default value equal to `[\'then\', \'catch\', \'inspect\', \'toJSON\']`', function() {
+      expect(chai.config.proxyExcludedKeys).to.be.deep.equal(['then', 'catch', 'inspect', 'toJSON']);
     });
 
     it('should not throw when accessing non-existing `then` and `inspect` in an environment with proxy support', function() {
Repository: FriendsOfPHP/PHP-CS-Fixer (php)

Issue:
Bug in `static_lambda` rule
Hi,

It looks like the `static_lambda` rule is not working correctly in this case. Even if the case is totally unlikely to happen, it should not add the `static` keyword in the front.

```php
<?php

declare(strict_types=1);

namespace App;

class Foo
{
    public function foo()
    {
        return array_map(
            fn ($item) => $this,
            []
        );
    }
}

Current result:

```
--- /home/devlin/Code/XXX/src/Foo.php
+++ /home/devlin/Code/XXX/src/Foo.php
@@ -1,5 +1,12 @@
 <?php
 
 declare(strict_types=1);
 
 namespace App;
@@ -9,7 +16,7 @@
     public function foo()
     {
         return array_map(
-            fn ($item) => $this,
+            static fn ($item) => $this,
             []
         );
     }
```

Expected result:

It should not add the `static` keyword.

Pull request:
bug: Fix #6439 issue in `StaticLambda` fixer
This PR fix #6439 

Patch:
diff --git a/src/Fixer/FunctionNotation/StaticLambdaFixer.php b/src/Fixer/FunctionNotation/StaticLambdaFixer.php
index 211f7c946..d844cfe82 100644
--- a/src/Fixer/FunctionNotation/StaticLambdaFixer.php
+++ b/src/Fixer/FunctionNotation/StaticLambdaFixer.php
@@ -134,7 +134,7 @@ private function findExpressionEnd(Tokens $tokens, int $index): int
      */
     private function hasPossibleReferenceToThis(Tokens $tokens, int $startIndex, int $endIndex): bool
     {
-        for ($i = $startIndex; $i < $endIndex; ++$i) {
+        for ($i = $startIndex; $i <= $endIndex; ++$i) {
             if ($tokens[$i]->isGivenKind(T_VARIABLE) && '$this' === strtolower($tokens[$i]->getContent())) {
                 return true; // directly accessing '$this'
             }


Test patch:
diff --git a/tests/Fixer/FunctionNotation/StaticLambdaFixerTest.php b/tests/Fixer/FunctionNotation/StaticLambdaFixerTest.php
index bda80a6b3..93dafb6a3 100644
--- a/tests/Fixer/FunctionNotation/StaticLambdaFixerTest.php
+++ b/tests/Fixer/FunctionNotation/StaticLambdaFixerTest.php
@@ -302,6 +302,20 @@ public function foo()
                     }
                 }',
             ],
+            [
+                '<?php
+                    class B
+                    {
+                        public function C()
+                        {
+                            return array_map(
+                                fn () => $this,
+                                []
+                            );
+                        }
+                    }
+                ',
+            ],
         ];
     }
 }
Repository: sindresorhus/got (ts)

Issue:
Socket hang up for stream put
I get a socket hang up when creating a read stream and then piping it to a put stream.
```
events.js:183
      throw er; // Unhandled 'error' event
      ^

RequestError: socket hang up
    at ClientRequest.request.once.error (/mnt/c/Users/marti/mvp-rest/node_modules/got/source/request-as-event-emitter.js:175:19)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:121:20)
    at ClientRequest.emit (events.js:211:7)
    at ClientRequest.origin.emit.args [as emit] (/mnt/c/Users/marti/mvp-rest/node_modules/@szmarczak/http-timer/source/index.js:36:11)
    at Socket.socketOnEnd (_http_client.js:423:9)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
```

If i use request library instead for put then it works.

Code to reproduce:
```js
var got = require('got')
var request = require('request')
require('http')
  .createServer((req, res) => {
    if (req.method === 'GET') {
      console.log('getting')
      res.end('get')
    } else {
      console.log(req.method)
      res.end('put/post/etc ok')
    }
  })
  .listen(3100, () => {
    got.stream.get('http://localhost:3100').pipe(got.stream.put('http://localhost:3100'))
    // got.stream.get('http://localhost:3100').pipe(request.put('http://localhost:3100'))
  })
```

I have tested some and commenting out this line fixes it:

https://github.com/sindresorhus/got/blob/master/source/request-as-event-emitter.js#L280

Not saying removing that is a fix, but it seems got or node have a problem with that header being set, or being set to a certain value. Not sure what request sets it to.

Setting header content-length to 0 or some other incorrect values "fixes" it. But request manages to read correct content-length of the incoming stream. Would be nice if got did the same.

Pull request:
Don't set content-length header when uploadBodySize is null
Fixes #650

Patch:
diff --git a/source/request-as-event-emitter.js b/source/request-as-event-emitter.js
index d21ebc7..d706367 100644
--- a/source/request-as-event-emitter.js
+++ b/source/request-as-event-emitter.js
@@ -276,7 +276,7 @@ module.exports = (options, input) => {
 			}
 
 			if (is.undefined(options.headers['content-length']) && is.undefined(options.headers['transfer-encoding'])) {
-				if (uploadBodySize > 0 || options.method === 'PUT') {
+				if ((uploadBodySize > 0 || options.method === 'PUT') && !is.null(uploadBodySize)) {
 					options.headers['content-length'] = uploadBodySize;
 				}
 			}


Test patch:
diff --git a/test/stream.js b/test/stream.js
index a64e54f..de57d28 100644
--- a/test/stream.js
+++ b/test/stream.js
@@ -189,3 +189,9 @@ test('destroying got.stream() cancels the request', async t => {
 	stream.destroy();
 	t.truthy(req.aborted);
 });
+
+test('piping to got.stream.put()', async t => {
+	await t.notThrowsAsync(async () => {
+		await getStream(got.stream(s.url).pipe(got.stream.put(`${s.url}/post`)));
+	});
+});