PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: chaijs/chai (js)
Issue: Requesting "does" as a no-op assertion
    expect(foobar).to.have.property("baz").which.does.not.have.property("thing");

Pull request description: Add .does as a no-op assertion, Fix #700
Hello guys, I saw that #700 was marked as pull-request-wanted.
So here I am 😄 

I also did not find tests addressing no-op assertions.
Maybe I could add tests for it.

What do you guys think about it?

Patch:
diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js
index 9ca0b0c..90c4a69 100644
--- a/lib/chai/core/assertions.js
+++ b/lib/chai/core/assertions.js
@@ -34,6 +34,7 @@ module.exports = function (chai, _) {
    * - of
    * - same
    * - but
+   * - does
    *
    * @name language chains
    * @namespace BDD
@@ -43,7 +44,7 @@ module.exports = function (chai, _) {
   [ 'to', 'be', 'been'
   , 'is', 'and', 'has', 'have'
   , 'with', 'that', 'which', 'at'
-  , 'of', 'same', 'but' ].forEach(function (chain) {
+  , 'of', 'same', 'but', 'does' ].forEach(function (chain) {
     Assertion.addProperty(chain);
   });
 


Test patch:
diff --git a/test/expect.js b/test/expect.js
index 04e79c4..aa9dc3f 100644
--- a/test/expect.js
+++ b/test/expect.js
@@ -10,6 +10,30 @@ describe('expect', function () {
     expect('foo').to.equal('foo');
   });
 
+  it('no-op chains', function() {
+    function test(chain) {
+      // tests that chain exists
+      expect(expect(1)[chain]).not.undefined;
+
+      // tests methods
+      expect(1)[chain].equal(1);
+
+      // tests properties that assert
+      expect(false)[chain].false;
+
+      // tests not
+      expect(false)[chain].not.true;
+
+      // tests chainable methods
+      expect([1, 2, 3])[chain].contains(1);
+    }
+
+    [ 'to', 'be', 'been'
+    , 'is', 'and', 'has', 'have'
+    , 'with', 'that', 'which', 'at'
+    , 'of', 'same', 'but', 'does' ].forEach(test);
+  });
+
   it('fail', function () {
     err(function() {
       expect.fail(0, 1, 'this has failed');
diff --git a/test/should.js b/test/should.js
index 7fdf495..37a4876 100644
--- a/test/should.js
+++ b/test/should.js
@@ -7,6 +7,30 @@ describe('should', function() {
     should.not.equal('foo', 'bar');
   });
 
+  it('no-op chains', function() {
+    function test(chain) {
+      // tests that chain exists
+      ((1).should[chain]).should.not.undefined;
+
+      // tests methods
+      (1).should[chain].equal(1);
+
+      // tests properties that assert
+      (false).should[chain].false;
+
+      // tests not
+      (false).should[chain].not.true;
+
+      // tests chainable methods
+      [1, 2, 3].should[chain].contains(1);
+    }
+
+    [ 'to', 'be', 'been'
+    , 'is', 'and', 'has', 'have'
+    , 'with', 'that', 'which', 'at'
+    , 'of', 'same', 'but', 'does' ].forEach(test);
+  });
+
   it('fail', function () {
     err(function() {
       should.fail(0, 1, 'this has failed');
Repository: jazzband/django-axes (python)
Issue: `AXES_SENSITIVE_PARAMETERS` doesn't affect database handler logs
Hello!
I encountered an issue when attempting to utilize the `AXES_SENSITIVE_PARAMETERS` configuration in order to prevent usernames from being written into our log files, even though I added the setting like so:
```python
AXES_SENSITIVE_PARAMETERS = ["username"]
```
Whenever a login attempt fails a log is still being written:
![image](https://user-images.githubusercontent.com/107052238/221629353-c4cf3263-4e21-4565-941d-f0846bc9843e.png)

I might've misunderstood how it works, but I did some debugging and found the following:
1. Inside `axes.handlers.database.py` some of the WARN logs are being written using the `client_str` variable
2. The `client_str` variable is produced from the `get_client_str` function in `axes.helpers.py`
3. In `get_client_str`, lines 298-302 should be replaced with a call to `get_query_str`, which does the same thing but also "cleanses" the dictionary, using the `AXES_SENSITIVE_PARAMETERS ` configuration value.

I'd love some feedback whether I misunderstood the usage of this configuration, or is this an actual issue,
Thanks! Shai.
Pull request description: Override log handler when using sensitive parameters.
Closes #1010.

Not quite sure if it was needed in `AXES_VERBOSE` mode only, so made the changes afterwards.

Patch:
diff --git a/axes/helpers.py b/axes/helpers.py
index 457354d..778d582 100644
--- a/axes/helpers.py
+++ b/axes/helpers.py
@@ -306,7 +306,7 @@ def get_client_str(
         client_dict = {}
         for client in client_list:
             client_dict.update(client)
-
+    client_dict = cleanse_parameters(client_dict.copy())
     # Path info is always included as last component in the client string for traceability purposes
     if path_info and isinstance(path_info, (tuple, list)):
         path_info = path_info[0]


Test patch:
diff --git a/tests/test_helpers.py b/tests/test_helpers.py
index fc4b5a3..0222d53 100644
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@ -269,6 +269,26 @@ class ClientStringTestCase(AxesTestCase):
             self.email,
         )
 
+    @override_settings(AXES_SENSITIVE_PARAMETERS=["username"])
+    def test_get_client_str_with_sensitive_parameters(self):
+        username = "test@example.com"
+        ip_address = "127.0.0.1"
+        user_agent = "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
+        path_info = "/admin/"
+
+        expected = self.get_expected_client_str(
+            "********************",
+            ip_address,
+            user_agent,
+            path_info,
+            self.request
+        )
+        actual = get_client_str(
+            username, ip_address, user_agent, path_info, self.request
+        )
+
+        self.assertEqual(expected, actual)
+
 
 def get_dummy_client_str(username, ip_address, user_agent, path_info, request):
     return "client string"