PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: JoshuaKGoldberg/tslint-to-eslint-config (ts)

Issue:
Include `sourceType: "module"` in parser options
See https://github.com/eslint/eslint/issues/4344. For now, let's include `sourceType: "module"` in outputs, as existing TypeScript projects that already have TSLint are very likely to use module mode for source types as it is.

Pull request:
Always output sourceType: module in parser options
Fixes #47.

Patch:
diff --git a/src/creation/writeConversionResults.ts b/src/creation/writeConversionResults.ts
index c512603..f09fe86 100644
--- a/src/creation/writeConversionResults.ts
+++ b/src/creation/writeConversionResults.ts
@@ -23,6 +23,7 @@ export const writeConversionResults = async (
         parser: "@typescript-eslint/parser",
         parserOptions: {
             project: "tsconfig.json",
+            sourceType: "module",
         },
         plugins,
         rules: formatConvertedRules(ruleConversionResults, originalConfigurations.tslint),


Test patch:
diff --git a/src/creation/writeConversionResults.test.ts b/src/creation/writeConversionResults.test.ts
index 6f02a2a..303079a 100644
--- a/src/creation/writeConversionResults.test.ts
+++ b/src/creation/writeConversionResults.test.ts
@@ -32,6 +32,7 @@ describe("writeConversionResults", () => {
                     parser: "@typescript-eslint/parser",
                     parserOptions: {
                         project: "tsconfig.json",
+                        sourceType: "module",
                     },
                     plugins: ["@typescript-eslint"],
                     rules: {},
@@ -72,6 +73,7 @@ describe("writeConversionResults", () => {
                     parser: "@typescript-eslint/parser",
                     parserOptions: {
                         project: "tsconfig.json",
+                        sourceType: "module",
                     },
                     plugins: ["@typescript-eslint", "@typescript-eslint/tslint"],
                     rules: {
Repository: hyrodium/BasicBSpline.jl (julia)

Issue:
`countknots` is sometimes incorrect
```julia
julia> using BasicBSpline

julia> k = KnotVector([-2,-1,-0.0,-0.0,0.0,1,3])
KnotVector([-2.0, -1.0, -0.0, -0.0, 0.0, 1.0, 3.0])

julia> countknots(k,0)
1

julia> countknots(k,-0.)
2
```
Both `countknots(k,0)` and `countknots(k,-0.)` should return `3`.

Pull request:
This PR fixes #282.

Patch:
diff --git a/src/_KnotVector.jl b/src/_KnotVector.jl
index 1380286e9..5760d6240 100644
--- a/src/_KnotVector.jl
+++ b/src/_KnotVector.jl
@@ -273,5 +273,5 @@ function countknots(k::AbstractKnotVector, t::Real)
     # return count(==(t), k.vector)
 
     # for large case, this is faster
-    return length(searchsorted(k,t))
+    return length(searchsorted(_vec(k), t, lt=<))
 end


Test patch:
diff --git a/test/test_KnotVector.jl b/test/test_KnotVector.jl
index dab195e83..a18de1a9e 100644
--- a/test/test_KnotVector.jl
+++ b/test/test_KnotVector.jl
@@ -152,5 +152,10 @@
         @test countknots(k, 2.0) == 2
         @test 1 ∈ k
         @test 1.5 ∉ k
+
+        k = KnotVector([-2.0, -1.0, -0.0, -0.0, 0.0, 1.0, 3.0])
+        @test countknots(k,0) == 3
+        @test countknots(k,0.0) == 3
+        @test countknots(k,-0.0) == 3
     end
 end
Repository: PyCQA/pyflakes (python)

Issue:
@overload of async functions
Since #435, pyflakes git tip copes with synchronous @overload'ed functions, but not with async ones:

```python
from typing import overload

@overload
def f(x: int) -> int:
    ...

@overload
def f(x: float) -> float:
    ...

def f(x):
    return x

@overload
async def g(x: int) -> int:
    ...

@overload
async def g(x: float) -> float:
    ...

async def g(x):
    return x
```
```bash
$ python -m pyflakes .

18:1 redefinition of unused 'g' from line 14
22:1 redefinition of unused 'g' from line 18
```

Pull request:
Allow @overload on async functions as well
resolves #470

Patch:
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 44c6b25..eca2002 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -72,9 +72,11 @@ else:
 if PY35_PLUS:
     FOR_TYPES = (ast.For, ast.AsyncFor)
     LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
+    FUNCTION_TYPES = (ast.FunctionDef, ast.AsyncFunctionDef)
 else:
     FOR_TYPES = (ast.For,)
     LOOP_TYPES = (ast.While, ast.For)
+    FUNCTION_TYPES = (ast.FunctionDef,)
 
 # https://github.com/python/typed_ast/blob/1.4.0/ast27/Parser/tokenizer.c#L102-L104
 TYPE_COMMENT_RE = re.compile(r'^#\s*type:\s*')
@@ -642,7 +644,7 @@ def is_typing_overload(value, scope_stack):
         )
 
     return (
-        isinstance(value.source, ast.FunctionDef) and
+        isinstance(value.source, FUNCTION_TYPES) and
         any(
             is_typing_overload_decorator(dec)
             for dec in value.source.decorator_list


Test patch:
diff --git a/pyflakes/test/test_type_annotations.py b/pyflakes/test/test_type_annotations.py
index 676a4a5..045c57a 100644
--- a/pyflakes/test/test_type_annotations.py
+++ b/pyflakes/test/test_type_annotations.py
@@ -56,6 +56,24 @@ class TestTypeAnnotations(TestCase):
             return s
         """)
 
+    @skipIf(version_info < (3, 5), 'new in Python 3.5')
+    def test_typingOverloadAsync(self):
+        """Allow intentional redefinitions via @typing.overload (async)"""
+        self.flakes("""
+        from typing import overload
+
+        @overload
+        async def f(s):  # type: (None) -> None
+            pass
+
+        @overload
+        async def f(s):  # type: (int) -> int
+            pass
+
+        async def f(s):
+            return s
+        """)
+
     def test_overload_with_multiple_decorators(self):
         self.flakes("""
             from typing import overload
Repository: slimphp/Slim (php)

Issue:
Using wrong flag to write to error log in ErrorHandler
In `ErrorHandler` at line [262](https://github.com/slimphp/Slim/blob/038fd5713d5a41636fdff0e8dcceedecdd17fc17/Slim/Handlers/ErrorHandler.php#L262), the condition is checked against the wrong flag.

the condition must check against `$this->logErrorDetails` rather than `$this->displayErrorDetails`. so the line would be:

`if (!$this->logErrorDetails) {`

If the bug is valid, I can create a pull request to fix it.

More details: It seems `writeToErrorLog()` is used to save the logs properly somewhere and `$this->displayErrorDetails` is used by the renderer to show the error details in realtime on the client

Pull request:
Only render tip to error log if plain text renderer is used
If the logErrorRenderer is not the plain text renderer then we must not render the tips message as this will break the structured format of the message that's been rendered.

Closes #3317

Patch:
diff --git a/Slim/Handlers/ErrorHandler.php b/Slim/Handlers/ErrorHandler.php
index f9606e36..34c1eabf 100644
--- a/Slim/Handlers/ErrorHandler.php
+++ b/Slim/Handlers/ErrorHandler.php
@@ -259,7 +259,7 @@ class ErrorHandler implements ErrorHandlerInterface
     {
         $renderer = $this->callableResolver->resolve($this->logErrorRenderer);
         $error = $renderer($this->exception, $this->logErrorDetails);
-        if (!$this->displayErrorDetails) {
+        if ($this->logErrorRenderer === PlainTextErrorRenderer::class && !$this->displayErrorDetails) {
             $error .= "\nTips: To display error details in HTTP response ";
             $error .= 'set "displayErrorDetails" to true in the ErrorHandler constructor.';
         }


Test patch:
diff --git a/tests/Handlers/ErrorHandlerTest.php b/tests/Handlers/ErrorHandlerTest.php
index 9346f1c7..b50dff4b 100644
--- a/tests/Handlers/ErrorHandlerTest.php
+++ b/tests/Handlers/ErrorHandlerTest.php
@@ -353,6 +353,35 @@ class ErrorHandlerTest extends TestCase
         $handler->__invoke($request, $exception, false, true, true);
     }
 
+    public function testWriteToErrorLogDoesNotShowTipIfErrorLogRendererIsNotPlainText()
+    {
+        $request = $this
+            ->createServerRequest('/', 'GET')
+            ->withHeader('Accept', 'application/json');
+
+        $logger = $this->getMockLogger();
+
+        $handler = new ErrorHandler(
+            $this->getCallableResolver(),
+            $this->getResponseFactory(),
+            $logger
+        );
+
+        $handler->setLogErrorRenderer(HtmlErrorRenderer::class);
+
+        $logger->expects(self::once())
+            ->method('error')
+            ->willReturnCallback(static function (string $error) {
+                self::assertStringNotContainsString(
+                    'set "displayErrorDetails" to true in the ErrorHandler constructor',
+                    $error
+                );
+            });
+
+        $exception = new HttpNotFoundException($request);
+        $handler->__invoke($request, $exception, false, true, true);
+    }
+
     public function testDefaultErrorRenderer()
     {
         $request = $this