PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: platers/obsidian-linter (ts)

Issue:
Bug: remove-link-spacing removes spacing inside checkbox when followed by markdown link
Hello again.
I noticed today that when `remove-link-spacing` is active, empty check boxes (`- [ ]`) get nuked on lint. I don't use them often but when I do, I they get linted into oblivion. A sub-option on this to exclude checkboxes would be great.

Pull request:
Fix Checkboxes Followed by Regular Markdown Link when Removing Whitespace from Link
Fixes #236 

It was reported that empty checkboxes followed by a link would have their whitespace removed. The regex was not preventing a beginning bracket from being added to the link text which is what caused the issue since it would attach it to the link itself.

Changes Made:
- updated the regex to no longer allow an opening square bracket ([) or new line character in link text for either wiki links or regular markdown links
- Added a test to allow us to make sure we do not accidentally create this issue again

Patch:
diff --git a/src/utils.ts b/src/utils.ts
index 03988bf..98f9704 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -13,7 +13,7 @@ export const backtickBlockRegexTemplate = fencedRegexTemplate.replaceAll('X', '`
 export const tildeBlockRegexTemplate = fencedRegexTemplate.replaceAll('X', '~');
 export const indentedBlockRegex = '^((\t|( {4})).*\n)+';
 export const codeBlockRegex = new RegExp(`${backtickBlockRegexTemplate}|${tildeBlockRegexTemplate}|${indentedBlockRegex}`, 'gm');
-export const linkRegex = /((!?)\[.*\]\(.*\))|(\[{2}.*\]{2})/g;
+export const linkRegex = /((!?)\[[^[\n]*\]\([^[\n]*\))|(\[{2}[^[\n]*\]{2})/g;
 export const tagRegex = /#[^\s#]{1,}/g;
 
 // Helper functions


Test patch:
diff --git a/src/test.ts b/src/test.ts
index 415f51f..2ba2fd5 100644
--- a/src/test.ts
+++ b/src/test.ts
@@ -976,6 +976,20 @@ describe('Links', () => {
 
     expect(rulesDict['capitalize-headings'].apply(before, {'Style': 'First letter'})).toBe(after);
   });
+  // accounts for https://github.com/platers/obsidian-linter/issues/236
+  it('Link after checkbox is not affected by removing whitespace in links', () => {
+    const before = dedent`
+    - [ ] [Link text](path/fileName.md)
+    - [ ] [[fileName]]
+    `;
+
+    const after = dedent`
+    - [ ] [Link text](path/fileName.md)
+    - [ ] [[fileName]]
+    `;
+
+    expect(rulesDict['remove-link-spacing'].apply(before)).toBe(after);
+  });
 });
 
 describe('Remove Multiple Spaces', () => {
Repository: tightenco/tlint (php)

Issue:
PHP notice thrown when using tlint
I get the following notice repeatedly when using tlint:

```
PHP Notice:  Undefined property: PhpParser\Node\Expr\New_::$name in /Users/me/.composer/vendor/tightenco/tlint/src/Linters/RequestValidation.php on line 32
```

It doesn't hinder tlint from working but it doesn't look nice in the build-logs. :)

Pull request:
Add instance of Variable check to RequestValidation linter.
Closes #129 

Patch:
diff --git a/src/Linters/RequestValidation.php b/src/Linters/RequestValidation.php
index 5f622dc..571fc67 100644
--- a/src/Linters/RequestValidation.php
+++ b/src/Linters/RequestValidation.php
@@ -28,7 +28,9 @@ class RequestValidation extends BaseLinter
             if (! $isController && $this->extends($node, 'Controller')) {
                 $isController = true;
             }
+
             return $node instanceof Node\Expr\MethodCall
+                && $node->var instanceof Node\Expr\Variable
                 && $node->var->name === 'this'
                 && $node->name->name === 'validate';
         });


Test patch:
diff --git a/tests/Linting/Linters/RequestValidationTest.php b/tests/Linting/Linters/RequestValidationTest.php
index 341823b..5691a9c 100644
--- a/tests/Linting/Linters/RequestValidationTest.php
+++ b/tests/Linting/Linters/RequestValidationTest.php
@@ -81,4 +81,29 @@ file;
 
         $this->assertEmpty($lints);
     }
+
+    /** @test */
+    function does_not_cause_php_notice_when_value_is_not_an_expression_with_a_name()
+    {
+        $file = <<<file
+<?php
+
+namespace App;
+
+class ControllerA extends Controller
+{
+    public function store()
+    {
+        return back()
+            ->with('errors', (new ViewErrorBag)->add('field', 'message'));
+    }
+}
+file;
+
+        $lints = (new TLint)->lint(
+            new RequestValidation($file)
+        );
+
+        $this->assertEmpty($lints);
+    }
 }
Repository: JuliaStats/HypothesisTests.jl (julia)

Issue:
p val > 1 in ExactMannWhitneyUTest 
```
A = [ 1.34937, 1.75722,0.276514, 1.04546 , 1.69085 , 0.738085, 2.36313 ]
B = [ 2.62325 , 1.16533 , 1.1327  ,  0.728714]

julia>ExactMannWhitneyUTest(A,B)
Exact Mann-Whitney U test
-------------------------
Population details:
    parameter of interest:   Location parameter (pseudomedian)
    value under h_0:         0
    point estimate:          0.20035500000000006

Test summary:
    outcome with 95% confidence: fail to reject h_0
    two-sided p-value:           1.0727272727272728

Details:
    number of observations in each group: [7, 4]
    Mann-Whitney-U statistic:             14.0
    rank sums:                            [41.0, 25.0]
    adjustment for ties:                  0.0
```

Pull request:
Fix taken from [here](https://github.com/SurajGupta/r-source/blob/a28e609e72ed7c47f6ddfbb86c85279a0750f0b7/src/library/stats/R/wilcox.test.R#L76) in the R source code. 

Tests seem to fail for FischerExactTest for unrelated reasons.

Patch:
diff --git a/src/mann_whitney.jl b/src/mann_whitney.jl
index da1e959e..df3a7157 100644
--- a/src/mann_whitney.jl
+++ b/src/mann_whitney.jl
@@ -141,10 +141,11 @@ function pvalue(x::ExactMannWhitneyUTest; tail=:both)
         # cannot account for ties
         if tail == :both
             if x.U < x.nx * x.ny / 2
-                2 * pwilcox(x.U, x.nx, x.ny, true)
+                p = pwilcox(x.U, x.nx, x.ny, true)
             else
-                2 * pwilcox(x.U - 1, x.nx, x.ny, false)
+                p = pwilcox(x.U - 1, x.nx, x.ny, false)
             end
+            min(2 * p, 1.0)
         elseif tail == :left
             pwilcox(x.U, x.nx, x.ny, true)
         else # tail == :right
@@ -226,7 +227,8 @@ function pvalue(x::ApproximateMannWhitneyUTest; tail=:both)
     if x.mu == x.sigma == 0
         1.0
     elseif tail == :both
-        2 * ccdf(Normal(), abs(x.mu - 0.5 * sign(x.mu))/x.sigma)
+        p = 2 * ccdf(Normal(), abs(x.mu - 0.5 * sign(x.mu))/x.sigma)
+        min(p, 1.0)
     elseif tail == :left
         cdf(Normal(), (x.mu + 0.5)/x.sigma)
     else # tail == :right


Test patch:
diff --git a/test/mann_whitney.jl b/test/mann_whitney.jl
index 5076b35c..0f614901 100644
--- a/test/mann_whitney.jl
+++ b/test/mann_whitney.jl
@@ -53,4 +53,25 @@ end
 @testset "Issue #39" begin
     @test abs(@inferred(pvalue(ExactMannWhitneyUTest(Float32[1:10;], Float32[2:11;]))) - 0.5096) <= 1e-4
 end
+
+@testset "Issue #126 pvalues above 1" begin
+	A = [1.34937, 1.75722,0.276514, 1.04546, 1.69085, 0.738085, 2.36313]
+	B = [2.62325, 1.16533, 1.1327, 0.728714]
+
+	m = ExactMannWhitneyUTest(A,B)
+	p = @inferred(pvalue(m; tail = :both))
+	@test p == 1
+
+	A = [12,10,7,6,3,1]
+	B = [11,9,8,5,4,2]
+
+	m = MannWhitneyUTest(A,B)
+	p = @inferred(pvalue(m; tail = :both))
+
+	@test p == 1
+
+	m = ApproximateMannWhitneyUTest(A, B)
+	p = @inferred(pvalue(m; tail = :both))
+end
+
 end
Repository: oclif/core (ts)

Issue:
this.exit(0) no longer exits in v3
**Describe the bug**
`this.exit(0)` used to exit with a code of zero in v2. In v3, this behavior has changed in that a command no longer exits.

**To Reproduce**
Reproduction repository: https://github.com/maxbeatty/reproduce-oclif-test-exit-zero

Simple command that can exit in different ways:
https://github.com/maxbeatty/reproduce-oclif-test-exit-zero/blob/2dfa70a1ab80b057167c3f4a9eb1f58701b125cc/src/commands/hello/index.ts#L20-L40

Tests for exit logic:
https://github.com/maxbeatty/reproduce-oclif-test-exit-zero/blob/2dfa70a1ab80b057167c3f4a9eb1f58701b125cc/test/commands/hello/index.test.ts#L11-L32

CI failure:
https://github.com/maxbeatty/reproduce-oclif-test-exit-zero/actions/runs/6670925950/job/18131787718

Downgrading to v2 restores expected behavior:
- https://github.com/maxbeatty/reproduce-oclif-test-exit-zero/pull/2/files
- https://github.com/maxbeatty/reproduce-oclif-test-exit-zero/actions/runs/6670912544/job/18131748129

**Expected behavior**
`this.exit(code)` should exit the command with the given code.

**Environment (please complete the following information):**
 - OS & version: observed locally in macOS and in GitHub Actions on Ubuntu
 - Shell/terminal & version: _does not seem to be related_


Pull request:
fix: restore exit(0) behavior
Fixes #846 

Patch:
diff --git a/src/command.ts b/src/command.ts
index 1f7e103..b93afb8 100644
--- a/src/command.ts
+++ b/src/command.ts
@@ -210,9 +210,7 @@ export abstract class Command {
     return Errors.error(input, options as any)
   }
 
-  public exit(code: number): never
-  public exit(code: 0): void
-  public exit(code = 0): void | never {
+  public exit(code = 0): never {
     Errors.exit(code)
   }
 
diff --git a/src/errors/index.ts b/src/errors/index.ts
index 873d616..ce120a5 100644
--- a/src/errors/index.ts
+++ b/src/errors/index.ts
@@ -11,10 +11,8 @@ export {ExitError} from './errors/exit'
 export {ModuleLoadError} from './errors/module-load'
 export {handle} from './handle'
 
-export function exit(code = 0) {
-  if (code !== 0) {
-    throw new ExitError(code)
-  }
+export function exit(code = 0): never {
+  throw new ExitError(code)
 }
 
 export function error(input: Error | string, options: {exit: false} & PrettyPrintableError): void


Test patch:
diff --git a/test/command/command.test.ts b/test/command/command.test.ts
index c86f333..35f33ea 100644
--- a/test/command/command.test.ts
+++ b/test/command/command.test.ts
@@ -68,7 +68,8 @@ describe('command', () => {
 
       return Command.run([])
     })
-    .it('exits with 0 does not throw error')
+    .catch(/EEXIT: 0/)
+    .it('exits with 0')
 
   describe('parse', () => {
     fancy.stdout().it('has a flag', async (ctx) => {