PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: getkin/kin-openapi (go)
Issue: Additional properties false not validated
### Reproduction

```go
func TestAdditionalProperties(t *testing.T)
	schema := &openapi3.Schema{
		AdditionalProperties: openapi3.AdditionalProperties{
			Has: openapi3.BoolPtr(false),
		},
	}
	
	value := map[string]interface{}{"foo": 42}
	
	err := schema.VisitJSON(value)

	require.Error(t, err) // fails. err is nil
}
```

### Expected

I'm expecting this to return an error as `"foo"` isn't defined in `properties` and is not allowed by `additionalProperties`.

### Actual

The above test returns `nil`.

Pull request description: Fix additional properties false not validated
Resolves #746

The issue was with `Schema.IsEmpty()` assuming incorrectly that `additionalProperties=false` means empty schema while the default value for `additionalProperties` is `true`.

From the [spec](https://spec.openapis.org/oas/v3.0.3#properties):

> `additionalProperties` - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, **`additionalProperties` defaults to `true`**.


Patch:
diff --git a/openapi3/schema.go b/openapi3/schema.go
index 892f325..fbf1900 100644
--- a/openapi3/schema.go
+++ b/openapi3/schema.go
@@ -810,7 +810,7 @@ func (schema *Schema) IsEmpty() bool {
 	if ap := schema.AdditionalProperties.Schema; ap != nil && !ap.Value.IsEmpty() {
 		return false
 	}
-	if apa := schema.AdditionalProperties.Has; apa != nil && *apa {
+	if apa := schema.AdditionalProperties.Has; apa != nil && !*apa {
 		return false
 	}
 	if items := schema.Items; items != nil && !items.Value.IsEmpty() {


Test patch:
diff --git a/openapi3/issue746_test.go b/openapi3/issue746_test.go
new file mode 100644
index 0000000..390a348
--- /dev/null
+++ b/openapi3/issue746_test.go
@@ -0,0 +1,26 @@
+package openapi3
+
+import (
+	"encoding/json"
+	"testing"
+
+	"github.com/stretchr/testify/require"
+)
+
+func TestIssue746(t *testing.T) {
+	schema := &Schema{}
+	err := schema.UnmarshalJSON([]byte(`{"additionalProperties": false}`))
+	require.NoError(t, err)
+
+	var value interface{}
+	err = json.Unmarshal([]byte(`{"foo": "bar"}`), &value)
+	require.NoError(t, err)
+
+	err = schema.VisitJSON(value)
+	require.Error(t, err)
+
+	schemaErr := &SchemaError{}
+	require.ErrorAs(t, err, &schemaErr)
+	require.Equal(t, "properties", schemaErr.SchemaField)
+	require.Equal(t, `property "foo" is unsupported`, schemaErr.Reason)
+}
Repository: gobuffalo/pop (go)
Issue: Enable customizing CreatedAt and UpdatedAt touching
## Description

To enforce consistent timestamps between databases and service instances, we want to store all timestamps in UTC. However it is not possible to enforce UTC for `UpdatedAt` because pop will overwrite the value with `time.Now()` which includes the local time zone. In contrast, `CreatedAt` is only set to `time.Now()` when it is the zero value.

### Proposals

There are a view ways I can think of we can allow this kind of customization of time stamps.

1. Allow setting the `nowFunc`. This will enable globally defining the behavior.

1. Customizing model based. Add an interface a model can implement to `touchUpdatedAt` and `touchCreatedAt`, something like
  ```go
  type UpdatedAtSetter interface{
    TouchUpdatedAt()
  }
  ```

1. Both of above options.

I'm happy to implement this if you tell me the approach you like. I personally would prefer setting the `nowFunc` globally.
Pull request description: feat: Allow customizing the time used for CreatedAt/UpdatedAt
Provide a way to override the time used for CreatedAt/UpdatedAt. This can be really useful to make tests deterministic, but also for overriding things like the time zone for UpdatedAt

Resolves #591 



Patch:
diff --git a/model.go b/model.go
index dddbec6..7b03d78 100644
--- a/model.go
+++ b/model.go
@@ -15,6 +15,11 @@ import (
 
 var nowFunc = time.Now
 
+// SetNowFunc allows an override of time.Now for customizing CreatedAt/UpdatedAt
+func SetNowFunc(f func() time.Time) {
+	nowFunc = f
+}
+
 // Value is the contents of a `Model`.
 type Value interface{}
 


Test patch:
diff --git a/executors_test.go b/executors_test.go
index d515483..ddafdb5 100644
--- a/executors_test.go
+++ b/executors_test.go
@@ -1964,3 +1964,28 @@ func Test_Delete(t *testing.T) {
 		r.Equal(count, ctx)
 	})
 }
+
+func Test_Create_Timestamps_With_NowFunc(t *testing.T) {
+	if PDB == nil {
+		t.Skip("skipping integration tests")
+	}
+	transaction(func(tx *Connection) {
+		r := require.New(t)
+
+		originalNowFunc := nowFunc
+		// ensure the original function is restored
+		defer func() {
+			nowFunc = originalNowFunc
+		}()
+
+		fakeNow, _ := time.Parse(time.RFC3339, "2019-07-14T00:00:00Z")
+		SetNowFunc(func() time.Time { return fakeNow })
+
+		friend:= Friend{FirstName: "Yester", LastName: "Day"}
+		err := tx.Create(&friend)
+		r.NoError(err)
+
+		r.Equal(fakeNow, friend.CreatedAt)
+		r.Equal(fakeNow, friend.UpdatedAt)
+	})
+}
Repository: typescript-eslint/tslint-to-eslint-config (ts)
Issue: space-within-parens converts 0 spaces incorrectly
### 🐛 Bug Report

-   `tslint-to-eslint-config` version: 0.5.1

#### Actual Behavior

```yaml
  space-within-parens:
    options:
      - 0
```

Is converted into `space-in-parens: always`

#### Expected Behavior

It should be converted into `space-in-parens: never`

#### Reproduction

See PR for reproduction.

Pull request description: Fix space-within-parens with option 0
## PR Checklist

-   [x] Addresses an existing issue: fixes #331
-   [ ] That issue was marked as [`status: accepting prs`](https://github.com/typescript-eslint/tslint-to-eslint-config/labels/status%3A%20accepting%20prs)

## Overview
If the requirement is `0` spaces, the result will be `never`.


Patch:
diff --git a/src/rules/converters/space-within-parens.ts b/src/rules/converters/space-within-parens.ts
index f24c898..01779e0 100644
--- a/src/rules/converters/space-within-parens.ts
+++ b/src/rules/converters/space-within-parens.ts
@@ -4,7 +4,7 @@ export const convertSpaceWithinParens: RuleConverter = tslintRule => {
     let notices: string[] | undefined;
     let arg: string;
 
-    if (tslintRule.ruleArguments.length === 1) {
+    if (tslintRule.ruleArguments.length === 1 && tslintRule.ruleArguments[0] !== 0) {
         arg = "always";
         notices = ["The number of spaces will be ignored"];
     } else {


Test patch:
diff --git a/src/rules/converters/tests/space-within-parens.test.ts b/src/rules/converters/tests/space-within-parens.test.ts
index 32aed65..83fe604 100644
--- a/src/rules/converters/tests/space-within-parens.test.ts
+++ b/src/rules/converters/tests/space-within-parens.test.ts
@@ -16,6 +16,21 @@ describe(convertSpaceWithinParens, () => {
         });
     });
 
+    test("conversion with 0 spaces required", () => {
+        const result = convertSpaceWithinParens({
+            ruleArguments: [0],
+        });
+
+        expect(result).toEqual({
+            rules: [
+                {
+                    ruleArguments: ["never"],
+                    ruleName: "space-in-parens",
+                },
+            ],
+        });
+    });
+
     test("conversion with min spaces arguement", () => {
         const result = convertSpaceWithinParens({
             ruleArguments: [5],
Repository: gcanti/tcomb (js)
Issue: null Maybes stringify to {}
Hello, something changed between 3.2.4 and 3.2.5 that causes this undesirable behavior

### Expected behaviour

```
const thing = t.struct({ foo: t.maybe(t.struct({ bar: t.String })) })
> JSON.stringify(thing({foo: null}))
'{"foo":null}'
```

### Actual behaviour

```
> JSON.stringify(thing({foo: null}))
'{"foo":{}}'
```

Pull request description: null Maybes should stringify to null, fix #227

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cbaf09b..c6ab378 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,11 @@
 **Note**: Gaps between patch versions are faulty/broken releases.
 **Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice.
 
+# v3.2.6
+
+- **Bug Fix**
+  - null Maybes should stringify to null, fix #227 (@gcanti)
+
 # v3.2.5
 
 - **Polish**
diff --git a/lib/create.js b/lib/create.js
index fcf5814..78956a6 100644
--- a/lib/create.js
+++ b/lib/create.js
@@ -6,7 +6,7 @@ var stringify = require('./stringify');
 // creates an instance of a type, handling the optional new operator
 module.exports = function create(type, value, path) {
   if (isType(type)) {
-    return !type.meta.identity && typeof value === 'object' ? new type(value, path): type(value, path);
+    return !type.meta.identity && typeof value === 'object' && value !== null ? new type(value, path): type(value, path);
   }
 
   if (process.env.NODE_ENV !== 'production') {
diff --git a/package.json b/package.json
index 81a396a..0187446 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "tcomb",
-  "version": "3.2.5",
+  "version": "3.2.6",
   "description": "Type checking and DDD for JavaScript",
   "main": "index.js",
   "typings": "index.d.ts",


Test patch:
diff --git a/test/maybe.js b/test/maybe.js
index 2bc0e47..969e75b 100644
--- a/test/maybe.js
+++ b/test/maybe.js
@@ -91,6 +91,12 @@ describe('t.maybe(type, [name])', function () {
       assert.ok(typeof T(undefined) === 'undefined');
     });
 
+    it('should play well with JSON.stringify (#227)', function () {
+      var thing = t.struct({ foo: t.maybe(t.struct({ bar: t.String })) });
+      assert.strictEqual(JSON.stringify(thing({foo: null})), '{"foo":null}');
+      assert.strictEqual(JSON.stringify(thing({foo: undefined})), '{}');
+    });
+
   });
 
   describe('is(x)', function () {
Repository: jsonata-js/jsonata (js)
Issue: Handling of "undefined" input to negate operator is inconsistent?
JSONata, as a query system should be tolerant to finding ‘nothing’ as a routine thing. This is reflected by the fact that passing the `undefined` value (the Javascript value used to represent 'nothing' here) to any operator or function does not raise an error, instead just itself returning `undefined`. 

For instance:
Where the path `x` is not on the context:
`x + 1 => undefined` (no error is raised)

_(To my knowledge, the only meaningful exception to this behaviour is `$exists(undefined) => false`, but there may be others)._

This behaviour is not observed by the negate operator. E.g.
`-x` raises an error (`Cannot negate a non-numeric value: undefined`).

Is this another deliberate exception to this behaviour, or is this a bug?
Pull request description: unary negation of undefined (no match) should return undefined
resolves #99 

When handling the unary negation operator `-`, let `undefined` (no match) pass through.

Patch:
diff --git a/jsonata.js b/jsonata.js
index 30ac3f0..c2dc89b 100644
--- a/jsonata.js
+++ b/jsonata.js
@@ -1817,7 +1817,9 @@ var jsonata = (function() {
         switch (expr.value) {
             case '-':
                 result = yield * evaluate(expr.expression, input, environment);
-                if (isNumeric(result)) {
+                if(typeof result === 'undefined') {
+                    result = undefined;
+                } else if (isNumeric(result)) {
                     result = -result;
                 } else {
                     throw {


Test patch:
diff --git a/test/test-suite/groups/numeric-operators/case016.json b/test/test-suite/groups/numeric-operators/case016.json
new file mode 100644
index 0000000..2668ba3
--- /dev/null
+++ b/test/test-suite/groups/numeric-operators/case016.json
@@ -0,0 +1,6 @@
+{
+    "expr": "- notexist",
+    "dataset": "dataset0",
+    "bindings": {},
+    "undefinedResult": true
+}
\ No newline at end of file