PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: remarkablemark/html-react-parser (ts)

Issue:
Wrong return types on attributesToProps
### Description
In the file `attributes-to-props.d.ts` the return types of `attributesToProps` function is a `Object` with `String` items.

https://github.com/remarkablemark/html-react-parser/blob/80bbea06fac6825f2667060f979fbd54b407e748/lib/attributes-to-props.d.ts#L3-L4

But in the `attributesToProps` function, `setStyleProp` is call to transform `CSSInline` to `StyleObject`.

https://github.com/remarkablemark/html-react-parser/blob/80bbea06fac6825f2667060f979fbd54b407e748/lib/attributes-to-props.js#L62

The return of the function is an `StyleObject` and not a `String`.

https://github.com/remarkablemark/html-react-parser/blob/80bbea06fac6825f2667060f979fbd54b407e748/lib/utilities.js#L76-L87

The result of this miss-typing is an error if you would like to get an `CSSProperty`.

<img width="452" alt="Capture d’écran 2021-04-16 à 10 42 51" src="https://user-images.githubusercontent.com/10879770/114997956-ba26e800-9ea0-11eb-8b0a-081d69d0cea5.png">

### Expected Behavior

Update `attributes-to-props.d.ts` with :

```ts
export type Attributes = Record<string, string>; 
export type Props = Record<string, string> & {
  style: Record<string, string>;
}; 
```


Pull request:
fix(attributes-to-props): fix attributes-to-props type `Props`
Fixes #242

## What is the motivation for this pull request?

fix(attributes-to-props): fix attributes-to-props type `Props`

## What is the current behavior?

```ts
type Props = Record<string, string>;
```

## What is the new behavior?

```ts
type Props = Record<string, string> & {
  style: Record<string, string>;
}; 
```

## Checklist:

- [x] Tests
- [x] Types


Patch:
diff --git a/lib/attributes-to-props.d.ts b/lib/attributes-to-props.d.ts
index d793fe8..ec5147c 100644
--- a/lib/attributes-to-props.d.ts
+++ b/lib/attributes-to-props.d.ts
@@ -1,7 +1,10 @@
 // TypeScript Version: 4.1
 
 export type Attributes = Record<string, string>;
-export type Props = Attributes;
+
+export type Props = Record<string, string> & {
+  style: Record<string, string>;
+};
 
 /**
  * Converts HTML/SVG DOM attributes to React props.
diff --git a/tsconfig.json b/tsconfig.json
index 37e9f50..8607ec9 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -20,6 +20,7 @@
     "index.d.ts",
     "lib/dom-to-react.d.ts",
     "test/types/index.tsx",
+    "test/types/lib/attributes-to-props.ts",
     "test/types/lib/dom-to-react.tsx"
   ]
 }


Test patch:
diff --git a/test/types/lib/attributes-to-props.ts b/test/types/lib/attributes-to-props.ts
new file mode 100644
index 0000000..fff8bae
--- /dev/null
+++ b/test/types/lib/attributes-to-props.ts
@@ -0,0 +1,17 @@
+import attributesToProps, {
+  Attributes,
+  Props
+} from 'html-react-parser/lib/attributes-to-props';
+
+let attributes: Attributes = {};
+
+attributes = {
+  class: 'my-class',
+  style: 'color: #bada55; line-height: 42;'
+};
+
+// $ExpectType Props
+const {
+  className,
+  style: { color, lineHeight }
+} = attributesToProps(attributes);
Repository: JuliaCollections/DataStructures.jl (julia)

Issue:
CircularBuffer push! increases size even if value can't be converted
Reproducible with the following steps:
```
julia> using DataStructures
julia> cb = CircularBuffer{Int}(5);
julia> size(cb)
(0,)
julia> push!(cb, 1.5)
ERROR: InexactError: Int64(1.5)
[...]
julia> size(cb)
(1,)
pkg> status
[...]
  [864edb3b] DataStructures v0.18.9
[...]
```

This seems strongly like unexpected behavior to me and should probably be fixed.

Pull request:
closes #754

Patch:
diff --git a/src/circular_buffer.jl b/src/circular_buffer.jl
index ab56dfa8f..e1a6a88d7 100644
--- a/src/circular_buffer.jl
+++ b/src/circular_buffer.jl
@@ -101,14 +101,18 @@ end
 
 Add an element to the back and overwrite front if full.
 """
-@inline function Base.push!(cb::CircularBuffer, data)
+@inline function Base.push!(cb::CircularBuffer{T}, data) where T
+
+    # As per the behaviour of Base.push!
+    data_converted = convert(T, data)
+
     # if full, increment and overwrite, otherwise push
     if cb.length == cb.capacity
         cb.first = (cb.first == cb.capacity ? 1 : cb.first + 1)
     else
         cb.length += 1
     end
-    @inbounds cb.buffer[_buffer_index(cb, cb.length)] = data
+    @inbounds cb.buffer[_buffer_index(cb, cb.length)] = data_converted
     return cb
 end
 


Test patch:
diff --git a/test/test_circular_buffer.jl b/test/test_circular_buffer.jl
index 5c6af105d..24b90edd5 100644
--- a/test/test_circular_buffer.jl
+++ b/test/test_circular_buffer.jl
@@ -165,6 +165,15 @@
         end
     end
 
+    @testset "Issue 754" begin
+        cb = CircularBuffer{Int}(5)
+        @test size(cb) == (0,)
+        @test_throws InexactError push!(cb, 1.5)
+        @test size(cb) == (0,)
+        push!(cb, 1.0)
+        @test size(cb) == (1,)
+    end
+
     @testset "resize!" begin
         @testset "resize an empty buffer" begin
             cb = CircularBuffer{Int}(3)
Repository: ceph/go-ceph (go)

Issue:
Missing cephfs API components: function ceph_select_filesystem
The cephfs API implements function(s) below but go-ceph does not:
* ceph_select_filesystem

This issue has been filed to track implementing this missing
functionality in the appropriate package within go-ceph.
Please refer to the Ceph C API for details about the function(s)
in question.

NOTE: This issue was generated by a script.
If the content is innacurate or wording seems a bit odd
please excuse the script and blame the creator @phlogistonjohn



Pull request:
cephfs: add wrapper for ceph_lchown
Signed-off-by: RAJAT SINGH <rajasing@redhat.com>


<!--
Thank you for opening a pull request. Please provide:

- A clear summary of your changes

- Descriptive and succinct commit messages with the format:
  """
  [topic]: [short description]

  [Longer description]

  Signed-off-by: [Your Name] <[your email]>
  """

  Topic will generally be the go ceph package dir you are working in.

- Ensure checklist items listed below are accounted for
-->
Added wrapper for lchown that was missing. Fixes #262 
## Checklist
- [x] Added tests for features and functional changes
- [ ] Public functions and types are documented
- [ ] Standard formatting is applied to Go code


Patch:
diff --git a/cephfs/permissions.go b/cephfs/permissions.go
index 77153fb..d55470b 100644
--- a/cephfs/permissions.go
+++ b/cephfs/permissions.go
@@ -29,3 +29,12 @@ func (mount *MountInfo) Chown(path string, user uint32, group uint32) error {
 	ret := C.ceph_chown(mount.mount, cPath, C.int(user), C.int(group))
 	return getError(ret)
 }
+
+// Lchown changes the ownership of a file/directory/etc without following symbolic links
+func (mount *MountInfo) Lchown(path string, user uint32, group uint32) error {
+	cPath := C.CString(path)
+	defer C.free(unsafe.Pointer(cPath))
+
+	ret := C.ceph_lchown(mount.mount, cPath, C.int(user), C.int(group))
+	return getError(ret)
+}


Test patch:
diff --git a/cephfs/permissions_test.go b/cephfs/permissions_test.go
index be16811..1d94afc 100644
--- a/cephfs/permissions_test.go
+++ b/cephfs/permissions_test.go
@@ -64,3 +64,32 @@ func TestChown(t *testing.T) {
 	assert.Equal(t, uint32(sx.Uid), bob)
 	assert.Equal(t, uint32(sx.Gid), bob)
 }
+
+func TestLchown(t *testing.T) {
+	dirname := "four"
+	var bob uint32 = 1010
+	var root uint32
+
+	mount := fsConnect(t)
+	defer fsDisconnect(t, mount)
+
+	err := mount.MakeDir(dirname, 0755)
+	assert.NoError(t, err)
+	defer mount.RemoveDir(dirname)
+
+	err = mount.SyncFs()
+	assert.NoError(t, err)
+
+	err = mount.Symlink(dirname, "symlnk")
+	assert.NoError(t, err)
+	defer mount.Unlink("symlnk")
+
+	err = mount.Lchown("symlnk", bob, bob)
+	sx, err := mount.Statx("symlnk", StatxBasicStats, AtSymlinkNofollow)
+	assert.NoError(t, err)
+	assert.Equal(t, uint32(sx.Uid), bob)
+	assert.Equal(t, uint32(sx.Gid), bob)
+	sx, err = mount.Statx(dirname, StatxBasicStats, AtSymlinkNofollow)
+	assert.Equal(t, uint32(sx.Uid), root)
+	assert.Equal(t, uint32(sx.Gid), root)
+}
Repository: cobalt-org/liquid-rust (rust)

Issue:
Integration tests are not run
The tests in the `tests` folder are not run.

Because of the `[[test]]` in `Cargo.toml` cargo only run the test specified here. And this test is just an empty file. Because you want to use a non-default feature in a test, this means you cannot just remove this section.

I see multiple ways to solve this issue:

1. Manually specify all the tests in `Cargo.toml`
2. Include all other tests from `liquid.rs` (via `mod`) (this could be done automatically with code generation in `build.rs`)
3. Remove the section from `Cargo.toml` but specify the feature on the command line each time (`cargo test --features "serde"`)

Pull request:
feat: Turn `serde` into a default feature.
This is actually more of a workaround that I don't mind.  There isn't a
low maintenance way to enable a feature for tests.  I misunderstood
cargo's documentation and thought I could add a `[[test]]` section but
that instead disabled all the tests.

Fixes #128

Patch:
diff --git a/.travis.yml b/.travis.yml
index 1fe9127..4cb72f6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,11 +17,11 @@ script:
   - cargo -V
   - cargo check --verbose
   - cargo check --verbose --features "cli"
-  - cargo check --verbose --features "cli serde serde_yaml serde_json"
-  - cargo test  --verbose --features "cli serde serde_yaml serde_json"
+  - cargo check --verbose --features "cli serde_yaml serde_json"
+  - cargo test  --verbose --features "cli serde_yaml serde_json"
   - ! which cargo-clippy || cargo when --channel nightly clippy -- --version
-  - ! which cargo-clippy || cargo when --channel nightly clippy --features "cli serde serde_yaml serde_json"
-  - cargo when --channel nightly bench --features "cli serde serde_yaml serde_json"
+  - ! which cargo-clippy || cargo when --channel nightly clippy --features "cli serde_yaml serde_json"
+  - cargo when --channel nightly bench --features "cli serde_yaml serde_json"
   - cargo when --channel stable doc --no-deps --all-features
   - cargo when --channel stable fmt -- --version
   - cargo when --channel stable fmt -- --write-mode=diff
diff --git a/Cargo.toml b/Cargo.toml
index d6a6751..3d4a918 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,12 +24,8 @@ doctest = false
 bench = false
 doc = false
 
-[[test]]
-name = "liquid"
-required-features = ["serde"]
-
 [features]
-default = ["extra-filters"]
+default = ["extra-filters", "serde"]
 cli = ["clap", "error-chain", "serde_yaml"]
 extra-filters = []
 dev = []
@@ -50,6 +46,7 @@ serde_json = { version = "1.0", optional = true }
 
 [build-dependencies]
 skeptic = "0.9"
+serde = { version = "1.0", features = ["derive"] }
 
 [dev-dependencies]
 difference = "1.0"


Test patch:
diff --git a/tests/liquid.rs b/tests/liquid.rs
deleted file mode 100644
index 8b13789..0000000
--- a/tests/liquid.rs
+++ /dev/null
@@ -1,1 +0,0 @@
-
Repository: nelmio/alice (php)

Issue:
Loader doesn't preserve double backslashes
It seems that loader doesn't preserve double backslashes.

```yaml
prop: |
    \\ these two backslashes become one in object
```

Pull request:
Fixed issue with double backslash preserving.
Closes #167.

Patch:
diff --git a/src/Nelmio/Alice/Instances/Processor/Methods/UnescapeAt.php b/src/Nelmio/Alice/Instances/Processor/Methods/UnescapeAt.php
index 766d1775..09da1f17 100644
--- a/src/Nelmio/Alice/Instances/Processor/Methods/UnescapeAt.php
+++ b/src/Nelmio/Alice/Instances/Processor/Methods/UnescapeAt.php
@@ -30,6 +30,6 @@ class UnescapeAt implements MethodInterface
     {
         $value = $processable->getValue();
 
-        return preg_replace('{\\\\([@\\\\])}', '$1', $value);
+        return str_replace('\\@', '@', $value);
     }
 }


Test patch:
diff --git a/tests/Nelmio/Alice/Fixtures/LoaderTest.php b/tests/Nelmio/Alice/Fixtures/LoaderTest.php
index 271c5520..58f5a48d 100644
--- a/tests/Nelmio/Alice/Fixtures/LoaderTest.php
+++ b/tests/Nelmio/Alice/Fixtures/LoaderTest.php
@@ -1362,7 +1362,7 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
         ]);
 
         $this->assertInstanceOf(self::USER, $res['user']);
-        $this->assertSame('@foo \\@foo \\@foo \\foo', $res['user']->username);
+        $this->assertSame('@foo \\@foo \\\\@foo \\foo', $res['user']->username);
     }
 
     public function testAddProcessor()
@@ -1468,6 +1468,13 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
         $this->assertInstanceOf(self::USER, $user1);
         $this->assertEquals('user_alice', $user1->username);
     }
+
+    public function testBackslashes()
+    {
+        $loader = new Loader();
+        $res = $loader->load(__DIR__ . '/../support/fixtures/backslashes.yml');
+        $this->assertEquals('\\\\', $res['user0']->username);
+    }
 }
 
 class FakerProvider
diff --git a/tests/Nelmio/Alice/support/fixtures/backslashes.yml b/tests/Nelmio/Alice/support/fixtures/backslashes.yml
new file mode 100644
index 00000000..64a63fd5
--- /dev/null
+++ b/tests/Nelmio/Alice/support/fixtures/backslashes.yml
@@ -0,0 +1,4 @@
+Nelmio\Alice\support\models\User:
+    user0:
+        username: |-
+            \\