PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: bluekeyes/go-gitdiff (go)
Issue: gitdiff: line 63: git file header: invalid mode line: invalid syntax
Looks like your library is a bit out-of-date? Line 63 for me in sample I was testing with looks like this:

```
new file mode 100644
```
Pull request description: Fix parsing of mode lines with trailing space
If a patch is passed through a system that converts line endings to '\r\n', mode lines end up with trailing whitespace that confuses `strconv.ParseInt`. In Git, this is avoided by using `strtoul()` for parsing, which stops at the first non-digit character.

Changing line endings in patch content itself can cause other problems so it is best to avoid this transform, but if it does happen, it shouldn't cause a parse error.

Fixes #37. I might want to revisit this in the future in favor of something more like `strtoul()`, but for now, I think it is still better to fail on obviously wrong numbers than to silently parse some part of them.

Patch:
diff --git a/gitdiff/file_header.go b/gitdiff/file_header.go
index 58904b4..77ceb5d 100644
--- a/gitdiff/file_header.go
+++ b/gitdiff/file_header.go
@@ -324,12 +324,12 @@ func parseGitHeaderNewName(f *File, line, defaultName string) error {
 }
 
 func parseGitHeaderOldMode(f *File, line, defaultName string) (err error) {
-	f.OldMode, err = parseMode(line)
+	f.OldMode, err = parseMode(strings.TrimSpace(line))
 	return
 }
 
 func parseGitHeaderNewMode(f *File, line, defaultName string) (err error) {
-	f.NewMode, err = parseMode(line)
+	f.NewMode, err = parseMode(strings.TrimSpace(line))
 	return
 }
 


Test patch:
diff --git a/gitdiff/file_header_test.go b/gitdiff/file_header_test.go
index 102795c..ef29833 100644
--- a/gitdiff/file_header_test.go
+++ b/gitdiff/file_header_test.go
@@ -486,6 +486,12 @@ func TestParseGitHeaderData(t *testing.T) {
 				OldMode: os.FileMode(0100644),
 			},
 		},
+		"oldModeWithTrailingSpace": {
+			Line: "old mode 100644\r\n",
+			OutputFile: &File{
+				OldMode: os.FileMode(0100644),
+			},
+		},
 		"invalidOldMode": {
 			Line: "old mode rw\n",
 			Err:  true,
@@ -496,6 +502,12 @@ func TestParseGitHeaderData(t *testing.T) {
 				NewMode: os.FileMode(0100755),
 			},
 		},
+		"newModeWithTrailingSpace": {
+			Line: "new mode 100755\r\n",
+			OutputFile: &File{
+				NewMode: os.FileMode(0100755),
+			},
+		},
 		"invalidNewMode": {
 			Line: "new mode rwx\n",
 			Err:  true,
@@ -518,6 +530,15 @@ func TestParseGitHeaderData(t *testing.T) {
 				IsNew:   true,
 			},
 		},
+		"newFileModeWithTrailingSpace": {
+			Line:        "new file mode 100755\r\n",
+			DefaultName: "dir/file.txt",
+			OutputFile: &File{
+				NewName: "dir/file.txt",
+				NewMode: os.FileMode(0100755),
+				IsNew:   true,
+			},
+		},
 		"copyFrom": {
 			Line: "copy from dir/file.txt\n",
 			OutputFile: &File{
Repository: kaliber5/ember-responsive-image (ts)
Issue: Cloudinary's image format parameter is wrong for JPEG
Should be `f_jpg` instead of `f_jpeg`
Pull request description: Fix JPEG URLs for Cloudinary provider
Fixes #389

Patch:
diff --git a/addon/helpers/responsive-image-cloudinary-provider.ts b/addon/helpers/responsive-image-cloudinary-provider.ts
index de7ec3d4..45e581ab 100644
--- a/addon/helpers/responsive-image-cloudinary-provider.ts
+++ b/addon/helpers/responsive-image-cloudinary-provider.ts
@@ -17,6 +17,10 @@ interface CloudinaryOptions {
 
 const URL_REGEX = /https?:/;
 
+const formatMap: Record<string, string> = {
+  jpeg: 'jpg',
+};
+
 export const provider = (
   image: string,
   service: ResponsiveImageService,
@@ -46,7 +50,7 @@ export const provider = (
     imageUrlFor(width: number, type: ImageType = 'jpeg'): string {
       let resizeParams = `w_${width},c_limit,q_${options.quality ?? 'auto'}`;
       if (deliveryType !== 'upload') {
-        resizeParams += `,f_${type}`;
+        resizeParams += `,f_${formatMap[type] ?? type}`;
       }
 
       const params = options.transformations


Test patch:
diff --git a/tests/integration/helpers/responsive-image-cloudinary-provider-test.ts b/tests/integration/helpers/responsive-image-cloudinary-provider-test.ts
index b220aa35..c19477dd 100644
--- a/tests/integration/helpers/responsive-image-cloudinary-provider-test.ts
+++ b/tests/integration/helpers/responsive-image-cloudinary-provider-test.ts
@@ -21,7 +21,7 @@ module(
       assert.deepEqual(data.imageTypes, ['png', 'jpeg', 'webp', 'avif']);
     });
 
-    test('it returns correct image URLs', async function (assert) {
+    test('it returns correct upload image URLs', async function (assert) {
       await render(
         hbs`{{dump (responsive-image-cloudinary-provider "samples/animals/three-dogs")}}`
       );
@@ -44,6 +44,29 @@ module(
       );
     });
 
+    test('it returns correct fetch image URLs', async function (assert) {
+      await render(
+        hbs`{{dump (responsive-image-cloudinary-provider "https://via.placeholder.com/150")}}`
+      );
+
+      const data = getData() as ProviderResult;
+
+      assert.equal(
+        data.imageUrlFor(100, 'jpeg'),
+        'https://res.cloudinary.com/kaliber5/image/fetch/w_100,c_limit,q_auto,f_jpg/https%3A%2F%2Fvia.placeholder.com%2F150'
+      );
+
+      assert.equal(
+        data.imageUrlFor(1000, 'jpeg'),
+        'https://res.cloudinary.com/kaliber5/image/fetch/w_1000,c_limit,q_auto,f_jpg/https%3A%2F%2Fvia.placeholder.com%2F150'
+      );
+
+      assert.equal(
+        data.imageUrlFor(100, 'webp'),
+        'https://res.cloudinary.com/kaliber5/image/fetch/w_100,c_limit,q_auto,f_webp/https%3A%2F%2Fvia.placeholder.com%2F150'
+      );
+    });
+
     test('it supports custom transformations', async function (assert) {
       await render(
         hbs`{{dump (responsive-image-cloudinary-provider "samples/animals/three-dogs" transformations="co_rgb:20a020,e_colorize:50")}}`
Repository: raphlinus/pulldown-cmark (rust)
Issue: [fuzz result] "table head" with trailing characters getting counted as a header
Something that looks like a table header, but has trailing text, shouldn't count as a table. It plainly contradicts what the spec says here (and disagrees with Pandoc Markdown, Pandoc GFM, actual GFM, and everything else I think to try).

```markdown
|
-|- *
```

<details>

Events from pulldown-cmark:

```rust
"\n |\n-|- *\n" -> [
  Start(Table([]))
    Start(TableHead)
    End(TableHead)
    Start(TableRow)
      Start(TableCell)
        Text(Borrowed("*"))
      End(TableCell)
    End(TableRow)
  End(Table)
]
```

Events from pandoc:

```rust
"\n |\n-|- *\n" -> [
  Start(Paragraph)
    Text(Boxed("|"))
    SoftBreak
    Text(Boxed("-|- *"))
  End(Paragraph)
]
```

Events from commonmark.js:

```rust
"\n |\n-|- *\n" -> [
  Start(Paragraph)
    Text(Boxed("|"))
    SoftBreak
    Text(Boxed("-|- *"))
  End(Paragraph)
]
```

</details>

Pull request description: Reject table delimiter row with unexpected trailing characters
Fixes #813

Patch:
diff --git a/specs/regression.txt b/specs/regression.txt
index 39f00c9..694ef3e 100644
--- a/specs/regression.txt
+++ b/specs/regression.txt
@@ -2163,3 +2163,13 @@ ISSUE 716
 .
 <p><code>\!\"\#\$\%\& \!\"\#\$\%\& \!\"\#\$\%\&</code></pre>
 ````````````````````````````````
+
+ISSUE 813
+
+```````````````````````````````` example
+|
+-|- *
+.
+<p>|
+-|- *</p>
+````````````````````````````````
diff --git a/src/scanners.rs b/src/scanners.rs
index cc2dd15..625db73 100644
--- a/src/scanners.rs
+++ b/src/scanners.rs
@@ -598,9 +598,8 @@ pub(crate) fn scan_table_head(data: &[u8]) -> (usize, Vec<Alignment>) {
                 found_hyphen_in_col = false;
             }
             _ => {
-                cols = vec![];
-                start_col = true;
-                break;
+                // It isn't a table head if it has characters outside the allowed set.
+                return (0, vec![]);
             }
         }
         i += 1;


Test patch:
diff --git a/tests/suite/regression.rs b/tests/suite/regression.rs
index 90069ee..2355616 100644
--- a/tests/suite/regression.rs
+++ b/tests/suite/regression.rs
@@ -2538,7 +2538,7 @@ fn regression_test_156() {
 
     test_markdown_html(original, expected, false, false, false);
 }
-
+  
 #[test]
 fn regression_test_157() {
     let original = r##"`\!\"\#\$\%\&
@@ -2550,3 +2550,15 @@ fn regression_test_157() {
 
     test_markdown_html(original, expected, false, false, false);
 }
+    
+#[test]
+fn regression_test_158() {
+    let original = r##"|
+-|- *
+"##;
+    let expected = r##"<p>|
+-|- *</p>
+"##;
+
+    test_markdown_html(original, expected, false, false, false);
+}
Repository: algorand/js-algorand-sdk (ts)
Issue: Cannot encode ABI string with non-ASCII characters
## Problem

When I try to encode the value `"What’s your favorite tall building?"` as an ABI `string`, an error occurs.

However, `"What's your favorite tall building?"` works fine. Note the difference between `’` and `'` -- the first is not an ASCII character, while the second is, which leads me to believe non-ASCII characters are not supported.
Pull request description: Bug-Fix: encode ABI string with non-ASCII characters
Fixes #699 

Patch:
diff --git a/src/abi/abi_type.ts b/src/abi/abi_type.ts
index 7ca39c1..3ea89e6 100644
--- a/src/abi/abi_type.ts
+++ b/src/abi/abi_type.ts
@@ -380,8 +380,13 @@ export class ABIStringType extends ABIType {
       throw new Error(`Cannot encode value as string: ${value}`);
     }
     const encodedBytes = Buffer.from(value);
-    const encodedLength = bigIntToBytes(value.length, LENGTH_ENCODE_BYTE_SIZE);
-    const mergedBytes = new Uint8Array(value.length + LENGTH_ENCODE_BYTE_SIZE);
+    const encodedLength = bigIntToBytes(
+      encodedBytes.length,
+      LENGTH_ENCODE_BYTE_SIZE
+    );
+    const mergedBytes = new Uint8Array(
+      encodedBytes.length + LENGTH_ENCODE_BYTE_SIZE
+    );
     mergedBytes.set(encodedLength);
     mergedBytes.set(encodedBytes, LENGTH_ENCODE_BYTE_SIZE);
     return mergedBytes;


Test patch:
diff --git a/tests/10.ABI.ts b/tests/10.ABI.ts
index c2dd071..1eeb4f0 100644
--- a/tests/10.ABI.ts
+++ b/tests/10.ABI.ts
@@ -236,6 +236,29 @@ describe('ABI encoding', () => {
           'MO2H6ZU47Q36GJ6GVHUKGEBEQINN7ZWVACMWZQGIYUOE3RBSRVYHV4ACJI'
         ).publicKey,
       ],
+      [
+        new ABIStringType().encode('What’s new'),
+        new Uint8Array([
+          0,
+          12,
+          87,
+          104,
+          97,
+          116,
+          226,
+          128,
+          153,
+          115,
+          32,
+          110,
+          101,
+          119,
+        ]),
+      ],
+      [
+        new ABIStringType().encode('😅🔨'),
+        new Uint8Array([0, 8, 240, 159, 152, 133, 240, 159, 148, 168]),
+      ],
       [new ABIByteType().encode(10), new Uint8Array([10])],
       [new ABIByteType().encode(255), new Uint8Array([255])],
       [new ABIBoolType().encode(true), new Uint8Array([128])],
@@ -453,6 +476,33 @@ describe('ABI encoding', () => {
         ),
         'MO2H6ZU47Q36GJ6GVHUKGEBEQINN7ZWVACMWZQGIYUOE3RBSRVYHV4ACJI',
       ],
+      [
+        new ABIStringType().decode(
+          new Uint8Array([
+            0,
+            12,
+            87,
+            104,
+            97,
+            116,
+            226,
+            128,
+            153,
+            115,
+            32,
+            110,
+            101,
+            119,
+          ])
+        ),
+        'What’s new',
+      ],
+      [
+        new ABIStringType().decode(
+          new Uint8Array([0, 8, 240, 159, 152, 133, 240, 159, 148, 168])
+        ),
+        '😅🔨',
+      ],
       [new ABIByteType().decode(new Uint8Array([10])), 10],
       [new ABIByteType().decode(new Uint8Array([255])), 255],
       [new ABIBoolType().decode(new Uint8Array([128])), true],
Repository: tailwindlabs/tailwindcss (ts)
Issue: Responsive Container Classes dont work

 ```
module.exports = {
  purge: [],
  theme: {
    container: {
      center: true,
      padding: {
        default: '1rem',
        sm: '2rem',
        lg: '4rem',
        xl: '5rem',
      },
    },
```
This do not work. Just the default has an effect to the container when compiled. 

Maybe this is in conflict with my screens config:

``` 
 screens: {
      'sm': { 'min': '640px' },
      'md': { 'min': '768px' },
      'lg': { 'min': '1024px' },
      'xl': { 'min': '1280px' },
      'xxl': { 'min': '1441px' },
      'wide': { 'min': '1601px' },
      'ultrawide': { 'min': '1901px' },
      'landscape': { 'raw': '(orientation: landscape) and (max-width: 1280px)' },
      'phone-landscape': { 'raw': '(orientation: landscape) and (max-width: 1024px)' },
      'mini-landscape': { 'raw': '(orientation: landscape) and (max-width: 640px)' },
 },
```

Is this normal that this don't work that way or is this maybe a bug?
I  tinkered around 2 hours on this today but as I said - just the default has an effect for me - not the breakpoint ones. 

I hope its my bad and not a bug. 

Tailwindcss version: 1.8.3


Pull request description: Fix issue where container padding not applied when using object syntax
Fixes #2339.

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6422a0ea..56c24d5a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
-- Nothing yet!
+- Fix issue where container padding not applied when using object syntax ([#2353](https://github.com/tailwindlabs/tailwindcss/pull/2353))
 
 ## [1.8.5] - 2020-09-07
 
diff --git a/src/plugins/container.js b/src/plugins/container.js
index 440f323d..ff1ff415 100644
--- a/src/plugins/container.js
+++ b/src/plugins/container.js
@@ -49,7 +49,11 @@ function mapMinWidthsToPadding(minWidths, screens, paddings) {
 
   _.each(minWidths, minWidth => {
     Object.keys(screens).forEach(screen => {
-      if (`${screens[screen]}` === `${minWidth}`) {
+      const screenMinWidth = _.isPlainObject(screens[screen])
+        ? screens[screen].min || screens[screen]['min-width']
+        : screens[screen]
+
+      if (`${screenMinWidth}` === `${minWidth}`) {
         mapping.push({
           screen,
           minWidth,


Test patch:
diff --git a/__tests__/containerPlugin.test.js b/__tests__/containerPlugin.test.js
index 68d0486b..a81239e4 100644
--- a/__tests__/containerPlugin.test.js
+++ b/__tests__/containerPlugin.test.js
@@ -209,6 +209,12 @@ test('responsive horizontal padding can be included by default', () => {
     [container()],
     config({
       theme: {
+        screens: {
+          sm: '576px',
+          md: { min: '768px' },
+          lg: { 'min-width': '992px' },
+          xl: { min: '1200px', max: '1600px' },
+        },
         container: {
           padding: {
             default: '1rem',
Repository: slimphp/Slim (php)
Issue: Support PSR-17 implementation from Guzzle/psr7 2.0 
Guzzle/psr7 2.0 added its own PSR-17 implementation. http-interop/http-factory-guzzle recommends using that implementation instead.

Could we have support for the new implementation? http-interop/http-factory-guzzle could still be used as a fallback, but Guzzle/psr7 2.0 would allow dropping the additional dependency from a project.
Pull request description: Use PSR-17 factory from Guzzle/psr7 2.0
`http-interop/http-factory-guzzle` recommends to use PSR-17 implementation from `guzzlehttp/psr7` if we can use version `^2.0`. Since it matches our dependencies, I replaced old package with the new one.
Users can still use `http-interop/http-factory-guzzle` if they add it manually.

Closes #3105 

Patch:
diff --git a/Slim/Factory/Psr17/GuzzlePsr17Factory.php b/Slim/Factory/Psr17/GuzzlePsr17Factory.php
index 8ac77029..702d537d 100644
--- a/Slim/Factory/Psr17/GuzzlePsr17Factory.php
+++ b/Slim/Factory/Psr17/GuzzlePsr17Factory.php
@@ -12,8 +12,8 @@ namespace Slim\Factory\Psr17;
 
 class GuzzlePsr17Factory extends Psr17Factory
 {
-    protected static $responseFactoryClass = 'Http\Factory\Guzzle\ResponseFactory';
-    protected static $streamFactoryClass = 'Http\Factory\Guzzle\StreamFactory';
+    protected static $responseFactoryClass = 'GuzzleHttp\Psr7\HttpFactory';
+    protected static $streamFactoryClass = 'GuzzleHttp\Psr7\HttpFactory';
     protected static $serverRequestCreatorClass = 'GuzzleHttp\Psr7\ServerRequest';
     protected static $serverRequestCreatorMethod = 'fromGlobals';
 }
diff --git a/composer.json b/composer.json
index 80cabde8..22d42bf0 100644
--- a/composer.json
+++ b/composer.json
@@ -57,7 +57,6 @@
         "ext-simplexml": "*",
         "adriansuter/php-autoload-override": "^1.2",
         "guzzlehttp/psr7": "^2.0",
-        "http-interop/http-factory-guzzle": "^1.2",
         "laminas/laminas-diactoros": "^2.6",
         "nyholm/psr7": "^1.4",
         "nyholm/psr7-server": "^1.0",


Test patch:
diff --git a/tests/Factory/AppFactoryTest.php b/tests/Factory/AppFactoryTest.php
index ecfae162..67f2112a 100644
--- a/tests/Factory/AppFactoryTest.php
+++ b/tests/Factory/AppFactoryTest.php
@@ -10,7 +10,7 @@ declare(strict_types=1);
 
 namespace Slim\Tests\Factory;
 
-use Http\Factory\Guzzle\ResponseFactory as GuzzleResponseFactory;
+use GuzzleHttp\Psr7\HttpFactory;
 use Laminas\Diactoros\ResponseFactory as LaminasDiactorosResponseFactory;
 use Nyholm\Psr7\Factory\Psr17Factory;
 use Psr\Container\ContainerInterface;
@@ -46,7 +46,7 @@ class AppFactoryTest extends TestCase
         return [
             [SlimPsr17Factory::class, SlimResponseFactory::class],
             [NyholmPsr17Factory::class, Psr17Factory::class],
-            [GuzzlePsr17Factory::class, GuzzleResponseFactory::class],
+            [GuzzlePsr17Factory::class, HttpFactory::class],
             [LaminasDiactorosPsr17Factory::class, LaminasDiactorosResponseFactory::class],
             [ZendDiactorosPsr17Factory::class, ZendDiactorosResponseFactory::class],
         ];