PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: tightenco/tlint (php)

Issue:
AlphabeticalImports is not working as expected.
This is how my imports are set up in `quicksand` right now [DeleteOldSoftDeletes.php](https://github.com/Jhnbrn90/quicksand/blob/feature/deleting-many-to-many-relationships/src/DeleteOldSoftDeletes.php):

```
use DateInterval;
use DateTime;
use Exception;
use Illuminate\Config\Repository as Config;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
```

Tlint should squawk about Log and DB being out of alphabetical order, but running tlint against this file does not catch it.

Pull request:
Sort imports alphabetically throughout
This PR adjusts the `AlphabeticalImports` linter to check for alpha sort throughout the entire import strings.

Fixes #107.

Patch:
diff --git a/src/Linters/AlphabeticalImports.php b/src/Linters/AlphabeticalImports.php
index 4dc461e..5b53d5e 100644
--- a/src/Linters/AlphabeticalImports.php
+++ b/src/Linters/AlphabeticalImports.php
@@ -33,7 +33,7 @@ class AlphabeticalImports extends BaseLinter
 
         if (! empty($useStatements)) {
             $importStrings = array_map(function (UseUse $useStatement) {
-                return explode('\\', $useStatement->name->toString())[0] ?? $useStatement->name->toString();
+                return $useStatement->name->toString();
             }, $useStatements);
 
             $alphabetical = $importStrings;


Test patch:
diff --git a/tests/Linters/AlphabeticalImportsTest.php b/tests/Linters/AlphabeticalImportsTest.php
index db4427a..3ac3923 100644
--- a/tests/Linters/AlphabeticalImportsTest.php
+++ b/tests/Linters/AlphabeticalImportsTest.php
@@ -7,7 +7,7 @@ use Tighten\TLint;
 class AlphabeticalImportsTest extends TestCase
 {
     /** @test */
-    function catches_non_alphabetical_imports()
+    function catches_non_alphabetical_imports_at_the_beginning_of_the_string()
     {
         $file = <<<file
 <?php
@@ -15,6 +15,25 @@ class AlphabeticalImportsTest extends TestCase
 use B\A as AA;
 use A\Z\Z;
 
+\$ok = 'thing';
+file;
+
+        $lints = (new TLint)->lint(
+            new AlphabeticalImports($file)
+        );
+
+        $this->assertEquals(3, $lints[0]->getNode()->getLine());
+    }
+
+    /** @test */
+    function catches_non_alphabetical_imports_anywhere_in_the_string()
+    {
+        $file = <<<file
+<?php
+
+use Illuminate\Support\Facades\Log;
+use Illuminate\Support\Facades\DB;
+
 \$ok = 'thing';
 file;
 
@@ -44,8 +63,8 @@ use GuzzleHttp\Promise\Promise;
 use GuzzleHttp\Psr7\Response;
 use function GuzzleHttp\Psr7\stream_for;
 use Illuminate\Contracts\Console\Kernel;
-use Illuminate\Support\Facades\App;
 use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Support\Facades\App;
 use Mockery;
 use Symfony\Component\Console\Input\ArrayInput;
 use Symfony\Component\Console\Output\BufferedOutput;
Repository: labstack/echo (go)

Issue:
Escaping colon does not work
### Issue Description

The PR from https://github.com/labstack/echo/pull/1988 doesn't seem to work.

### Expected behaviour

should match routes

### Actual behaviour

none of the routes are matched

### Steps to reproduce

Code below

### Working code to debug

```go
package main

import (
	"github.com/imroc/req"
	"github.com/labstack/echo/v4"
	"github.com/stretchr/testify/assert"
	"net/http"
	"testing"
	"time"
)

func TestEscape(t *testing.T) {
	e := echo.New()
	e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
		return func(c echo.Context) error {
			t.Logf("%s %s", c.Request().Method, c.Request().URL.Path)
			return next(c)
		}
	})
	e.GET("/action/ws\\:list", func(c echo.Context) error {
		return c.String(http.StatusOK, "should match")
	})
	e.GET("/action/ws\\:nooo", func(c echo.Context) error {
		return c.String(http.StatusOK, "should not match")
	})
	go e.Start(":8080")

	time.Sleep(time.Second / 2)
	res, err := req.Get("http://localhost:8080/action/ws:list", req.Param{})
	assert.NoError(t, err)
	t.Log(res) // 404 not found
}
```

### Version/commit

4.6.1

Pull request:
fix: route containing escaped colon is not actually matched to the request path
Route containing escaped colon should be matchable to request path with colon but is not actually matched (fixes #2046)

Patch:
diff --git a/router.go b/router.go
index a8277c8..dc93e29 100644
--- a/router.go
+++ b/router.go
@@ -99,6 +99,9 @@ func (r *Router) Add(method, path string, h HandlerFunc) {
 	for i, lcpIndex := 0, len(path); i < lcpIndex; i++ {
 		if path[i] == ':' {
 			if i > 0 && path[i-1] == '\\' {
+				path = path[:i-1] + path[i:]
+				i--
+				lcpIndex--
 				continue
 			}
 			j := i + 1


Test patch:
diff --git a/router_test.go b/router_test.go
index 1cb36b4..57be74d 100644
--- a/router_test.go
+++ b/router_test.go
@@ -1124,6 +1124,8 @@ func TestRouterParam_escapeColon(t *testing.T) {
 	e := New()
 
 	e.POST("/files/a/long/file\\:undelete", handlerFunc)
+	e.POST("/multilevel\\:undelete/second\\:something", handlerFunc)
+	e.POST("/mixed/:id/second\\:something", handlerFunc)
 	e.POST("/v1/some/resource/name:customVerb", handlerFunc)
 
 	var testCases = []struct {
@@ -1133,12 +1135,22 @@ func TestRouterParam_escapeColon(t *testing.T) {
 		expectError string
 	}{
 		{
-			whenURL:     "/files/a/long/file\\:undelete",
+			whenURL:     "/files/a/long/file:undelete",
 			expectRoute: "/files/a/long/file\\:undelete",
 			expectParam: map[string]string{},
 		},
 		{
-			whenURL:     "/files/a/long/file\\:notMatching",
+			whenURL:     "/multilevel:undelete/second:something",
+			expectRoute: "/multilevel\\:undelete/second\\:something",
+			expectParam: map[string]string{},
+		},
+		{
+			whenURL:     "/mixed/123/second:something",
+			expectRoute: "/mixed/:id/second\\:something",
+			expectParam: map[string]string{"id": "123"},
+		},
+		{
+			whenURL:     "/files/a/long/file:notMatching",
 			expectRoute: nil,
 			expectError: "code=404, message=Not Found",
 			expectParam: nil,