PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: willowtreeapps/assertk (kotlin)
Issue: New assertion: `containsMatch`
A mixture of `contains` and `match`, but only looks for a match within the string rather than against the whole thing.

Implementation is basically `matchesPredicate(regex::containsMatchIn)`, but it's nice to not have to do that every time you want to switch from an exact `contains` to a fuzzy, regex-based one (or similarly, from matching the whole string to only part of a string).
Pull request description: Unlike 'contains' this is a regex rather than a literal. Unlike 'matches' this looks for a subset of the charsequence to match rather than the entire contents.

Closes #452

Patch:
diff --git a/assertk/src/commonMain/kotlin/assertk/assertions/charsequence.kt b/assertk/src/commonMain/kotlin/assertk/assertions/charsequence.kt
index 89c18394..01a71147 100644
--- a/assertk/src/commonMain/kotlin/assertk/assertions/charsequence.kt
+++ b/assertk/src/commonMain/kotlin/assertk/assertions/charsequence.kt
@@ -144,3 +144,11 @@ fun Assert<CharSequence>.matches(regex: Regex) = given { actual ->
     if (actual.matches(regex)) return
     expected("to match:${show(regex)} but was:${show(actual)}")
 }
+
+/**
+ * Asserts the char sequence contains a match of the regular expression.
+ */
+fun Assert<CharSequence>.containsMatch(regex: Regex) = given { actual ->
+    if (regex.containsMatchIn(actual)) return
+    expected("to contain match:${show(regex)} but was:${show(actual)}")
+}


Test patch:
diff --git a/assertk/src/commonTest/kotlin/test/assertk/assertions/CharSequenceTest.kt b/assertk/src/commonTest/kotlin/test/assertk/assertions/CharSequenceTest.kt
index 7ec39104..cddd8754 100644
--- a/assertk/src/commonTest/kotlin/test/assertk/assertions/CharSequenceTest.kt
+++ b/assertk/src/commonTest/kotlin/test/assertk/assertions/CharSequenceTest.kt
@@ -270,4 +270,18 @@ class CharSequenceTest {
         assertEquals("expected to match:${show(regex)} but was:<\"12345\">", error.message)
     }
     //endregion
+
+    //region contains match
+    @Test fun contains_match_matching_value_passes() {
+        assertThat("abc1234xyz").containsMatch(Regex("\\d\\d\\d\\d"))
+    }
+
+    @Test fun contains_match_not_matching_value_fails() {
+        val regex = Regex("\\d\\d\\d\\d")
+        val error = assertFailsWith<AssertionError> {
+            assertThat("abc123xyz").containsMatch(regex)
+        }
+        assertEquals("expected to contain match:${show(regex)} but was:<\"abc123xyz\">", error.message)
+    }
+    //endregion
 }
Repository: adhocore/gronx (go)
Issue: Range-with-step showing time outside the range as due
First of all, thanks for the awesome library.

For the following example, IsDue() is returning `true` incorrectly.
```
expr = 0-10/2 * * * *
ref  = 2011-06-20 12:12:00
```

I think it is because of this function:
```
func inStepRange(val, start, end, step int) bool {
	for {
		if start == val {
			return true
		}
		if start > end {
			return false
		}

		start += step
	}
}
```

After `start += step`, the next time around the loop, the code fails to check whether `start > end`. 

I think the problem can be solved by interchanging the order of the two `if` conditions within the `for` loop. I'll be happy to submit a PR if you are accepting.
Pull request description: Fix range-with-step check for boundary condition (#6)
Fixes #6 

Patch:
diff --git a/validator.go b/validator.go
index 3437f42..074415b 100644
--- a/validator.go
+++ b/validator.go
@@ -53,16 +53,12 @@ func inRange(val int, s string) (bool, error) {
 }
 
 func inStepRange(val, start, end, step int) bool {
-	for {
-		if start == val {
+	for i := start; i <= end && i <= val; i += step {
+		if i == val {
 			return true
 		}
-		if start > end {
-			return false
-		}
-
-		start += step
 	}
+	return false
 }
 
 func isValidMonthDay(val string, last int, ref time.Time) (bool, error) {


Test patch:
diff --git a/gronx_test.go b/gronx_test.go
index 8948172..c6a55c3 100644
--- a/gronx_test.go
+++ b/gronx_test.go
@@ -129,6 +129,7 @@ func testcases() []Case {
 		{"0 0 * * 2-7", "2011-06-18 23:09:00", false},
 		{"0 0 * * 4-7", "2011-07-19 00:00:00", false},
 		{"0-12/4 * * * *", "2011-06-20 12:04:00", true},
+		{"0-10/2 * * * *", "2011-06-20 12:12:00", false},
 		{"4-59/2 * * * *", "2011-06-20 12:04:00", true},
 		{"4-59/2 * * * *", "2011-06-20 12:06:00", true},
 		{"4-59/3 * * * *", "2011-06-20 12:06:00", false},