PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: stretchr/testify (go)

Issue:
assert.ObjectsAreEqual work not correct with serialized\deserialized time.Time
**time.Time** not equals before and after serialization/deserialization to JSON on machine in **UTC**
reason: https://github.com/golang/go/issues/19486#issuecomment-292610767

code: https://play.golang.org/p/H0ACWIBZE3O

solution: change the **time.Time** comparison format. For example, compare time using **time.Equal**

Pull request:
Compare time.Time objects for equality correctly
Adding test

## Summary
Fix assert.ObjectsAreEqual bug with not equals time.Time before and after serializing\deserializing

## Changes
Added a check in ObectsAreEqual in case the arguments are a time object

## Motivation
Fix bug to use test in docker 

## Related issues
Closes #950 
Fix #951 


Patch:
diff --git a/assert/assertions.go b/assert/assertions.go
index 6c629e8..94fb18c 100644
--- a/assert/assertions.go
+++ b/assert/assertions.go
@@ -60,6 +60,16 @@ func ObjectsAreEqual(expected, actual interface{}) bool {
 		return expected == actual
 	}
 
+	tExp, ok := expected.(time.Time)
+	if ok {
+
+		tAct, ok := actual.(time.Time)
+		if ok {
+			return tExp.Equal(tAct)
+		}
+		return false
+	}
+
 	exp, ok := expected.([]byte)
 	if !ok {
 		return reflect.DeepEqual(expected, actual)


Test patch:
diff --git a/assert/assertions_test.go b/assert/assertions_test.go
index f32362b..5755f1a 100644
--- a/assert/assertions_test.go
+++ b/assert/assertions_test.go
@@ -148,6 +148,21 @@ func TestObjectsAreEqual(t *testing.T) {
 
 }
 
+func TestObjectsAreEqual_SerializedTime(t *testing.T) {
+	t0 := time.Now().Round(0)
+	b, err := json.Marshal(t0)
+	if err != nil {
+		t.Fail()
+	}
+	var t1 time.Time
+	if err := json.Unmarshal(b, &t1); err != nil {
+		t.Fail()
+	}
+	if !ObjectsAreEqual(t0, t1) {
+		t.Errorf("time must be equals")
+	}
+}
+
 func TestImplements(t *testing.T) {
 
 	mockT := new(testing.T)
Repository: Masterminds/semver (go)

Issue:
NewConstraint method faulty behavior
Used version: 3.1.1
When I try to create a constraint with NewConstraint method I get following returns:

**good Example**
c, cErr := semver.NewConstraint("12.3.4.1234")
c.String() = nil
cErr = "improper constraint: 12.3.4.1234"

**faulty behavior**
c, cErr := semver.NewConstraint("12.**23**.4.1234")
c.String() = "12.23.4 1234"
cErr = nil

or

c, cErr := semver.NewConstraint("12.3.**34**.1234")
c.String() = "12.3.34 1234"
cErr = nil


------------

I would expect the same behavior as with "12.3.4.1234", means telling me its not a contraint.. 

Pull request:
Fixing issue where validation of constraint section gave false positives
Closes #185

Validation of strings was producing false positives when there were too
many sections. A string like 1.2.3.1234 would be found in error but on
like 1.23.3.1234 or 1.2.34.1234 could pass even though it had too many
segments. This is because a string like 1.23.3.1234 would be found as
two different constraints of 1.1 and 3.3.1234.

The fix was to treat validation for the the first and following
constraints separately. For for the following ones a space or command
is now required before it to show it's a second or further one.

Patch:
diff --git a/constraints.go b/constraints.go
index c94fbc9..2daee9a 100644
--- a/constraints.go
+++ b/constraints.go
@@ -180,8 +180,13 @@ func init() {
 		ops,
 		cvRegex))
 
+	// The first time a constraint shows up will look slightly different from
+	// future times it shows up due to a leading space or comma in a given
+	// string.
 	validConstraintRegex = regexp.MustCompile(fmt.Sprintf(
-		`^(\s*(%s)\s*(%s)\s*\,?)+$`,
+		`^(\s*(%s)\s*(%s)\s*)((?:\s+|,\s*)(%s)\s*(%s)\s*)*$`,
+		ops,
+		cvRegex,
 		ops,
 		cvRegex))
 }


Test patch:
diff --git a/constraints_test.go b/constraints_test.go
index 477eb98..903cd8c 100644
--- a/constraints_test.go
+++ b/constraints_test.go
@@ -231,6 +231,15 @@ func TestNewConstraint(t *testing.T) {
 
 		// The 3 - 4 should be broken into 2 by the range rewriting
 		{"3 - 4 || => 3.0, < 4", 2, 2, false},
+
+		// Due to having 4 parts these should produce an error. See
+		// https://github.com/Masterminds/semver/issues/185 for the reason for
+		// these tests.
+		{"12.3.4.1234", 0, 0, true},
+		{"12.23.4.1234", 0, 0, true},
+		{"12.3.34.1234", 0, 0, true},
+		{"12.3.34 ~1.2.3", 1, 2, false},
+		{"12.3.34~ 1.2.3", 0, 0, true},
 	}
 
 	for _, tc := range tests {
diff --git a/version_test.go b/version_test.go
index a134d7a..b7289eb 100644
--- a/version_test.go
+++ b/version_test.go
@@ -87,6 +87,13 @@ func TestNewVersion(t *testing.T) {
 		{"1.2.2147483648", false},
 		{"1.2147483648.3", false},
 		{"2147483648.3.0", false},
+
+		// Due to having 4 parts these should produce an error. See
+		// https://github.com/Masterminds/semver/issues/185 for the reason for
+		// these tests.
+		{"12.3.4.1234", true},
+		{"12.23.4.1234", true},
+		{"12.3.34.1234", true},
 	}
 
 	for _, tc := range tests {
Repository: gluon-lang/gluon (rust)

Issue:
Pattern matching error on type aliases
First of all, thanks for the amazing work on Gluon - I've just starting playing with it, and I'm pretty excited about its potential.

I found an unexpected case where pattern matching doesn't work if the type is a type alias.
e.g.
```
type MyType = (String, Int)

let getName thing : MyType -> String =
    let (name, count) = thing
    name
```
This compiles fine (according to the language server anyway), but fails when run with "Undefined variable `name`".
If, however the function is defined as
```
let getName thing : (String, Int) -> String =
    let (name, count) = thing
    name
```
it works. I would expect these to be equivalent.
Gluon version 0.11.2

Pull request:
fix(compiler): Don't panic when matching a tuple against an alias
Fixes #749

Patch:
diff --git a/vm/src/core/mod.rs b/vm/src/core/mod.rs
index 8091bcb9..da530359 100644
--- a/vm/src/core/mod.rs
+++ b/vm/src/core/mod.rs
@@ -1675,6 +1675,8 @@ impl<'a, 'e> PatternTranslator<'a, 'e> {
                     }
                 }
                 ast::Pattern::Tuple { ref typ, ref elems } => {
+                    let typ = remove_aliases_cow(&self.0.env, &mut NullInterner, typ);
+
                     for (i, (elem, field_type)) in elems.iter().zip(typ.row_iter()).enumerate() {
                         if !add_duplicate_ident(
                             &mut replacements,


Test patch:
diff --git a/tests/pattern_match.rs b/tests/pattern_match.rs
index 3d5091e0..1d6079a1 100644
--- a/tests/pattern_match.rs
+++ b/tests/pattern_match.rs
@@ -188,3 +188,17 @@ match (Some 10, 1) with
 "#,
 10
 }
+
+test_expr! {
+pattern_match_tuple_alias,
+r#"
+type MyType = (String, Int)
+
+let getName thing : MyType -> String =
+    let (name, count) = thing
+    name
+
+getName ("abc", 123)
+"#,
+"abc".to_string()
+}
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 226
Good morning! Here's your coding interview problem for today.

This problem was asked by Airbnb.

You come across a dictionary of sorted words in a language you've never seen before. Write a program that returns the correct order of letters in this language.

For example, given `['xww', 'wxyz', 'wxyw', 'ywx', 'ywz']`, you should return `['x', 'z', 'w', 'y']`.

Pull request:
Day226
Resolves #467.

Patch:
diff --git a/README.md b/README.md
index 3626459..8cb2218 100644
--- a/README.md
+++ b/README.md
@@ -236,3 +236,4 @@ problems from
 * [Day 223](https://github.com/vaskoz/dailycodingproblem-go/issues/460)
 * [Day 224](https://github.com/vaskoz/dailycodingproblem-go/issues/462)
 * [Day 225](https://github.com/vaskoz/dailycodingproblem-go/issues/465)
+* [Day 226](https://github.com/vaskoz/dailycodingproblem-go/issues/467)
diff --git a/day226/problem.go b/day226/problem.go
new file mode 100644
index 0000000..159474d
--- /dev/null
+++ b/day226/problem.go
@@ -0,0 +1,58 @@
+package day226
+
+// AlienLanguageOrder returns the correct order of letters
+// of an alien language.
+func AlienLanguageOrder(sortedWords []string) []rune {
+	g := make(map[rune]map[rune]struct{})
+	for i := 1; i < len(sortedWords); i++ {
+		var firstDiff int
+		for firstDiff = 0; sortedWords[i-1][firstDiff] == sortedWords[i][firstDiff]; firstDiff++ {
+		}
+		if _, exists := g[rune(sortedWords[i-1][firstDiff])]; !exists {
+			g[rune(sortedWords[i-1][firstDiff])] = make(map[rune]struct{})
+		}
+		g[rune(sortedWords[i-1][firstDiff])][rune(sortedWords[i][firstDiff])] = struct{}{}
+	}
+	return kahnsTopologicalSort(g)
+}
+
+func kahnsTopologicalSort(g map[rune]map[rune]struct{}) []rune {
+	var result []rune
+	s := make(map[rune]struct{})
+	for k := range g {
+		s[k] = struct{}{}
+	}
+	for _, v := range g {
+		for k := range v {
+			delete(s, k)
+		}
+	}
+	for len(s) != 0 {
+		var n rune
+		for k := range s {
+			n = k
+			break
+		}
+		delete(s, n)
+		result = append(result, n)
+		for m := range g[n] {
+			delete(g[n], m)
+			if !hasIncomingEdges(g, m) {
+				s[m] = struct{}{}
+			}
+		}
+
+	}
+	return result
+}
+
+func hasIncomingEdges(g map[rune]map[rune]struct{}, m rune) bool {
+	for _, to := range g {
+		for k := range to {
+			if k == m {
+				return true
+			}
+		}
+	}
+	return false
+}


Test patch:
diff --git a/day226/problem_test.go b/day226/problem_test.go
new file mode 100644
index 0000000..298fea8
--- /dev/null
+++ b/day226/problem_test.go
@@ -0,0 +1,30 @@
+package day226
+
+import (
+	"reflect"
+	"testing"
+)
+
+var testcases = []struct {
+	alienWords []string
+	order      []rune
+}{
+	{[]string{"xww", "wxyz", "wxyw", "ywx", "ywz"}, []rune{'x', 'z', 'w', 'y'}},
+}
+
+func TestAlienLanguageOrder(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if order := AlienLanguageOrder(tc.alienWords); !reflect.DeepEqual(order, tc.order) {
+			t.Errorf("Expected %v, got %v", tc.order, order)
+		}
+	}
+}
+
+func BenchmarkAlienLanguageOrder(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			AlienLanguageOrder(tc.alienWords)
+		}
+	}
+}
Repository: kbsali/php-redmine-api (php)

Issue:
Changes made in #257 introduces a BC break
Changes made in [#257](https://github.com/kbsali/php-redmine-api/pull/257/files#diff-a0d92f5dcb3b7fa15b6523c906ed0ad089ba350c1aa9d6cb36a011143fd246c8R66) introduces a BC break in the return value of [`AbstractApi::get()`](https://github.com/kbsali/php-redmine-api/pull/257/files#diff-a0d92f5dcb3b7fa15b6523c906ed0ad089ba350c1aa9d6cb36a011143fd246c8R47).
Prior to these changes, if the response body was empty, `get()` was returning `false`, and currently it returns `null`.
Since this package lacks a exception oriented flow in front of HTTP responses ending in error codes (400~599), my implementation relies in the return values to determine the situation about a request.

Obviously the compatibility with PSR-18 is great, I'd just like to expose this situation in order to verify if these changes could respect BC.
Note that this is the only one BC break I've checked, since this is the first issue I encountered after updating the dependency.

Pull request:
Return `false` from `AbstractApi::get()` on empty response body
Fixes #274.

Patch:
diff --git a/src/Redmine/Api/AbstractApi.php b/src/Redmine/Api/AbstractApi.php
index 9aa1a0f..9303324 100644
--- a/src/Redmine/Api/AbstractApi.php
+++ b/src/Redmine/Api/AbstractApi.php
@@ -42,7 +42,7 @@ abstract class AbstractApi implements Api
      * @param string $path
      * @param bool   $decodeIfJson
      *
-     * @return string|array|SimpleXMLElement|null
+     * @return string|array|SimpleXMLElement|false
      */
     protected function get($path, $decodeIfJson = true)
     {
@@ -64,7 +64,7 @@ abstract class AbstractApi implements Api
             }
         }
 
-        return ('' === $body) ? null : $body;
+        return ('' === $body) ? false : $body;
     }
 
     /**
diff --git a/src/Redmine/Api/IssueRelation.php b/src/Redmine/Api/IssueRelation.php
index a0fc1d1..bb6aa31 100644
--- a/src/Redmine/Api/IssueRelation.php
+++ b/src/Redmine/Api/IssueRelation.php
@@ -42,7 +42,7 @@ class IssueRelation extends AbstractApi
     public function show($id)
     {
         $ret = $this->get('/relations/'.urlencode($id).'.json');
-        if (null === $ret) {
+        if (false === $ret) {
             return [];
         }
 


Test patch:
diff --git a/tests/Unit/Api/AbstractApiTest.php b/tests/Unit/Api/AbstractApiTest.php
index d377f99..971e7b3 100644
--- a/tests/Unit/Api/AbstractApiTest.php
+++ b/tests/Unit/Api/AbstractApiTest.php
@@ -129,7 +129,8 @@ class AbstractApiTest extends TestCase
             ['{"foo_bar": 12345}', null, ['foo_bar' => 12345]], // test decode by default
             ['{"foo_bar": 12345}', false, '{"foo_bar": 12345}'],
             ['{"foo_bar": 12345}', true, ['foo_bar' => 12345]],
-            ['', true, null], // test decode with empty body
+            'Empty body, JSON decode: false' => ['', false, false],
+            'Empty body, JSON decode: true' => ['', true, false],
             ['{"foo_bar":', true, 'Error decoding body as JSON: Syntax error'], // test invalid JSON
         ];
     }