PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: hedhyw/json-log-viewer (go)

Issue:
fix: filtering is not working by rune 'q'

Pull request:
fix: hotkeys in filter
Closes #13

Patch:
diff --git a/internal/app/action.go b/internal/app/action.go
index b6d2a80..fa52d43 100644
--- a/internal/app/action.go
+++ b/internal/app/action.go
@@ -31,7 +31,19 @@ func (m Model) quit() (Model, tea.Cmd) {
 	return m, tea.Quit
 }
 
+func (m Model) quitByRune() (tea.Model, tea.Cmd) {
+	if m.IsFilterShown() {
+		return nil, nil
+	}
+
+	return m, tea.Quit
+}
+
 func (m Model) showFilter() (tea.Model, tea.Cmd) {
+	if m.IsFilterShown() {
+		return nil, nil
+	}
+
 	if !m.IsTableShown() {
 		return nil, nil
 	}
diff --git a/internal/app/handler.go b/internal/app/handler.go
index 0d0e7f6..ef95ee6 100644
--- a/internal/app/handler.go
+++ b/internal/app/handler.go
@@ -12,8 +12,10 @@ func (m Model) handleKeyMsg(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
 	switch msg.String() {
 	case "esc":
 		return m.back()
-	case "q", "ctrl+c":
+	case "ctrl+c":
 		return m.quit()
+	case "q":
+		return m.quitByRune()
 	case "enter":
 		return m.handleEnter()
 	case "f":


Test patch:
diff --git a/internal/app/app_test.go b/internal/app/app_test.go
index c356da5..d019895 100644
--- a/internal/app/app_test.go
+++ b/internal/app/app_test.go
@@ -104,6 +104,19 @@ func TestAppQuit(t *testing.T) {
 			assert.Equal(t, tea.Quit(), cmd())
 		}
 	})
+
+	t.Run("q", func(t *testing.T) {
+		t.Parallel()
+
+		_, cmd := toAppModel(appModel.Update(tea.KeyMsg{
+			Type:  tea.KeyRunes,
+			Runes: []rune{'q'},
+		}))
+
+		if assert.NotNil(t, cmd) {
+			assert.Equal(t, tea.Quit(), cmd())
+		}
+	})
 }
 
 func newTestModel(tb testing.TB, content []byte) app.Model {
@@ -124,3 +137,26 @@ func toAppModel(teaModel tea.Model, cmd tea.Cmd) (app.Model, tea.Cmd) {
 
 	return appModel, cmd
 }
+
+func TestAppViewFiltereRunes(t *testing.T) {
+	appModel := newTestModel(t, assets.ExampleJSONLog())
+
+	appModel, _ = toAppModel(appModel.Update(tea.KeyMsg{
+		Type:  tea.KeyRunes,
+		Runes: []rune{'f'},
+	}))
+	assert.True(t, appModel.IsFilterShown(), appModel.View())
+
+	appModel, cmd := toAppModel(appModel.Update(tea.KeyMsg{
+		Type:  tea.KeyRunes,
+		Runes: []rune{'q'},
+	}))
+	assert.NotEqual(t, tea.Quit(), cmd())
+
+	appModel, cmd = toAppModel(appModel.Update(tea.KeyMsg{
+		Type:  tea.KeyRunes,
+		Runes: []rune{'f'},
+	}))
+	assert.NotEqual(t, tea.Quit(), cmd())
+	assert.True(t, appModel.IsFilterShown(), appModel.View())
+}
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 145
Good morning! Here's your coding interview problem for today.

This problem was asked by Google.

Given the head of a singly linked list, swap every two nodes and return its head.

For example, given `1 -> 2 -> 3 -> 4`, return `2 -> 1 -> 4 -> 3`.

Pull request:
Day145
Resolves #302.

Patch:
diff --git a/README.md b/README.md
index bb128c6..a54e76f 100644
--- a/README.md
+++ b/README.md
@@ -154,5 +154,6 @@ problems from
 * [Day 141](https://github.com/vaskoz/dailycodingproblem-go/issues/294)
 * [Day 142](https://github.com/vaskoz/dailycodingproblem-go/issues/297)
 * [Day 143](https://github.com/vaskoz/dailycodingproblem-go/issues/299)
+* [Day 145](https://github.com/vaskoz/dailycodingproblem-go/issues/302)
 * [Day 146](https://github.com/vaskoz/dailycodingproblem-go/issues/303)
 * [Day 147](https://github.com/vaskoz/dailycodingproblem-go/issues/304)
diff --git a/day145/problem.go b/day145/problem.go
new file mode 100644
index 0000000..4c95f8b
--- /dev/null
+++ b/day145/problem.go
@@ -0,0 +1,18 @@
+package day145
+
+// LL is a singly linked list of integers.
+type LL struct {
+	Value int
+	Next  *LL
+}
+
+// SwapEveryTwo swaps every two nodes in a linked list.
+func SwapEveryTwo(head *LL) *LL {
+	if head == nil || head.Next == nil {
+		return head
+	}
+	result := head.Next
+	result.Next, head.Next = head, head.Next.Next
+	result.Next.Next = SwapEveryTwo(result.Next.Next)
+	return result
+}


Test patch:
diff --git a/day145/problem_test.go b/day145/problem_test.go
new file mode 100644
index 0000000..1c8a776
--- /dev/null
+++ b/day145/problem_test.go
@@ -0,0 +1,42 @@
+package day145
+
+import "testing"
+
+var testcases = []struct {
+	input, expected *LL
+}{
+	{&LL{1, &LL{2, &LL{3, &LL{4, nil}}}},
+		&LL{2, &LL{1, &LL{4, &LL{3, nil}}}},
+	},
+	{&LL{1, &LL{2, &LL{3, &LL{4, &LL{5, nil}}}}},
+		&LL{2, &LL{1, &LL{4, &LL{3, &LL{5, nil}}}}},
+	},
+}
+
+func TestSwapEveryTwo(t *testing.T) {
+	t.Parallel()
+	for tcid, tc := range testcases {
+		if result := SwapEveryTwo(tc.input); !equal(result, tc.expected) {
+			t.Errorf("TCID%d do not match", tcid)
+		}
+	}
+}
+
+func BenchmarkSwapEveryTwo(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			SwapEveryTwo(tc.input)
+		}
+	}
+}
+
+func equal(one, two *LL) bool {
+	for one != nil && two != nil {
+		if one.Value != two.Value {
+			return false
+		}
+		one = one.Next
+		two = two.Next
+	}
+	return one == nil && two == nil
+}
Repository: auth0/auth0.js (js)

Issue:
Tenant override is not used for popup usernamepassword/login
The `overrides.__tenant` option ([code](https://github.com/auth0/auth0.js/blob/5caa9adecbf3966b28cf6f33de749f940a86df15/src/web-auth/index.js#L82)) is correctly used on the `/usernamepassword/login` call in [webauth.redirect ](https://github.com/auth0/auth0.js/blob/5caa9adecbf3966b28cf6f33de749f940a86df15/src/web-auth/redirect.js#L45), but it's not being set when doing [webauth.popup.loginWithCredentials](https://github.com/auth0/auth0.js/blob/5caa9adecbf3966b28cf6f33de749f940a86df15/src/web-auth/popup.js#L118). 
To reproduce:

```
var options = {
    auth: {
        redirect: false,
        params: {
            scope: 'openid',
        },
        responseType: 'token'
    },
    overrides: {
        __tenant: 'test-tenant'
    }
};

lock.show();
```

The `tenant` value will be on the POST body to `/usernamepassword/login` only when `redirect` is set to  `true`. If `redirect: false`, the overridden `tenant` value is not present on the request body.

Pull request:
Fixing tenant override in popup mode
fix #481 

Patch:
diff --git a/src/web-auth/popup.js b/src/web-auth/popup.js
index b078860..3709d51 100644
--- a/src/web-auth/popup.js
+++ b/src/web-auth/popup.js
@@ -121,6 +121,7 @@ Popup.prototype.authorize = function(options, cb) {
       'scope',
       'domain',
       'audience',
+      'tenant',
       'responseType',
       'redirectUri',
       '_csrf',


Test patch:
diff --git a/test/web-auth/extensibility.test.js b/test/web-auth/extensibility.test.js
index 6493d16..dfb22e9 100644
--- a/test/web-auth/extensibility.test.js
+++ b/test/web-auth/extensibility.test.js
@@ -92,7 +92,7 @@ describe('auth0.WebAuth extensibility', function() {
     it('should change the content of the params', function(done) {
       stub(PopupHandler.prototype, 'load', function(url, relayUrl, options, cb) {
         expect(url).to.be(
-          'https://test.auth0.com/authorize?client_id=...&response_type=code&owp=true&redirect_uri=http%3A%2F%2Fcustom-url.com'
+          'https://test.auth0.com/authorize?client_id=...&response_type=code&tenant=test&owp=true&redirect_uri=http%3A%2F%2Fcustom-url.com'
         );
         expect(relayUrl).to.be('https://test.auth0.com/relay.html');
         expect(options).to.eql({});