PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: go-bdd/gobdd (go)
Issue: ctx.GetError should not return err if there's nil
**Describe the bug**

Here's sample code:

```go
func itReturnsNoError(t gobdd.StepTest, ctx context.Context) context.Context {
	res, err := ctx.GetError(statsErrKey{})
	if err != nil {
		t.Error(err)
	}
	if res != nil {
		t.Errorf("expected no error but %+v received", res)
	}
	
	return ctx
}
```

When I want to check if the `GetError` returns an error, sometimes I want to get `nil` from it. But, in such case the `GetError` will return the `err` as the second returned value. It should be `nil` as well.

Pull request description: Return no error if ctx.GetError returns nil
Fixes #93 

Patch:
diff --git a/context/context.go b/context/context.go
index 8f297cd..8a8783a 100644
--- a/context/context.go
+++ b/context/context.go
@@ -44,6 +44,10 @@ func (ctx Context) GetError(key interface{}, defaultValue ...interface{}) (inter
 		return nil, fmt.Errorf("the key %+v does not exist", key)
 	}
 
+	if ctx.values[key] == nil {
+		return nil, nil
+	}
+
 	value, ok := ctx.values[key].(error)
 	if !ok {
 		return nil, fmt.Errorf("the expected value is not error  (%T)", key)
diff --git a/go.mod b/go.mod
index ba3bc61..60ca666 100644
--- a/go.mod
+++ b/go.mod
@@ -7,4 +7,5 @@ require (
 	github.com/cucumber/messages-go/v9 v9.0.3
 	github.com/go-bdd/assert v0.0.0-20190820124234-20d47a68475d
 	github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381
+	github.com/stretchr/testify v1.4.0
 )


Test patch:
diff --git a/context/context_test.go b/context/context_test.go
new file mode 100644
index 0000000..a166ca4
--- /dev/null
+++ b/context/context_test.go
@@ -0,0 +1,16 @@
+package context
+
+import (
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+func TestNilInGetError(t *testing.T) {
+	ctx := New()
+	ctx.Set("err", nil)
+
+	res, err := ctx.GetError("err")
+	assert.NoError(t, err)
+	assert.Nil(t, res)
+}
Repository: rrd108/vue-mess-detector (ts)
Issue: Layouts folder should be skipped for single name component check 
Like we do for pages
Pull request description: fix : ignore layouts directory
### Summary
<!-- Provide a general summary of your changes in the title above -->
Fix for the rule  "Rename the component to use multi-word name"

### Description
<!-- Describe your changes in detail -->
I skipped the layout directory so as not to analyze it for the rule

### Related Issues
<!-- List any related issues or pull requests, using the format `Fixes #issue_number` -->
Fixes #345

### Type of Change
<!-- Please select the options that best describe your changes -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update

### Screenshots (if applicable)
<!-- Add screenshots to help expalin the changes -->


Patch:
diff --git a/src/rules/vue-essential/singleNameComponent.ts b/src/rules/vue-essential/singleNameComponent.ts
index 17f22c1..cbf7478 100644
--- a/src/rules/vue-essential/singleNameComponent.ts
+++ b/src/rules/vue-essential/singleNameComponent.ts
@@ -8,8 +8,8 @@ const results: FileCheckResult[] = []
 const resetResults = () => (results.length = 0)
 
 const checkSingleNameComponent = (filePath: string) => {
-  // in the pages directory this rule does not apply
-  if (filePath.includes('pages')) {
+  // in the pages and layouts directory this rule does not apply
+  if (filePath.includes('pages') || filePath.includes('layouts')) {
     return
   }
 


Test patch:
diff --git a/src/rules/vue-essential/singleNameComponent.test.ts b/src/rules/vue-essential/singleNameComponent.test.ts
index f4435f7..a48862e 100644
--- a/src/rules/vue-essential/singleNameComponent.test.ts
+++ b/src/rules/vue-essential/singleNameComponent.test.ts
@@ -9,6 +9,13 @@ describe('checkSingleNameComponent', () => {
     expect(result).toStrictEqual([])
   })
 
+  it('ignores layouts directory', () => {
+    checkSingleNameComponent('layouts/default.vue')
+    const result = reportSingleNameComponent()
+    expect(result.length).toBe(0)
+    expect(result).toStrictEqual([])
+  })
+
   it('ignores App.vue', () => {
     checkSingleNameComponent('components/App.vue')
     const result = reportSingleNameComponent()
Repository: genjidb/genji (go)
Issue: Allow reference to other fields when inserting or updating a document
```js
genji> insert into foo values {
  base: 379.99,
  vat: 20,
  total: base + base * vat / 100
};
```

Pull request description: Add reference to current document to eval context
This PR fixes #65 by adding the current field buffer to the eval stack whenever we are evaluating a KVPairs into a document.

Patch:
diff --git a/sql/query/expr/literal.go b/sql/query/expr/literal.go
index a00ce8a1..61bb6d1c 100644
--- a/sql/query/expr/literal.go
+++ b/sql/query/expr/literal.go
@@ -170,6 +170,9 @@ func (kvp KVPairs) IsEqual(other Expr) bool {
 // Eval turns a list of KVPairs into a document.
 func (kvp KVPairs) Eval(ctx EvalStack) (document.Value, error) {
 	var fb document.FieldBuffer
+	if ctx.Document == nil {
+		ctx.Document = &fb
+	}
 
 	for _, kv := range kvp {
 		v, err := kv.V.Eval(ctx)


Test patch:
diff --git a/sql/query/insert_test.go b/sql/query/insert_test.go
index 5736ca99..15ccd230 100644
--- a/sql/query/insert_test.go
+++ b/sql/query/insert_test.go
@@ -29,12 +29,14 @@ func TestInsertStmt(t *testing.T) {
 		{"Values / Named Params", "INSERT INTO test (a, b, c) VALUES ($d, 'e', $f)", false, `{"pk()":1,"a":"d","b":"e","c":"f"}`, []interface{}{sql.Named("f", "f"), sql.Named("d", "d")}},
 		{"Values / Invalid params", "INSERT INTO test (a, b, c) VALUES ('d', ?)", true, "", []interface{}{'e'}},
 		{"Values / List", `INSERT INTO test (a, b, c) VALUES ("a", 'b', [1, 2, 3])`, false, `{"pk()":1,"a":"a","b":"b","c":[1,2,3]}`, nil},
+		{"Values / Document", `INSERT INTO test (a, b, c) VALUES ("a", 'b', {c: 1, d: c + 1})`, false, `{"pk()":1,"a":"a","b":"b","c":{"c":1,"d":2}}`, nil},
 		{"Documents", "INSERT INTO test VALUES {a: 'a', b: 2.3, c: 1 = 1}", false, `{"pk()":1,"a":"a","b":2.3,"c":true}`, nil},
 		{"Documents / Positional Params", "INSERT INTO test VALUES {a: ?, b: 2.3, c: ?}", false, `{"pk()":1,"a":"a","b":2.3,"c":true}`, []interface{}{"a", true}},
 		{"Documents / Named Params", "INSERT INTO test VALUES {a: $a, b: 2.3, c: $c}", false, `{"pk()":1,"a":1,"b":2.3,"c":true}`, []interface{}{sql.Named("c", true), sql.Named("a", 1)}},
 		{"Documents / List ", "INSERT INTO test VALUES {a: [1, 2, 3]}", false, `{"pk()":1,"a":[1,2,3]}`, nil},
 		{"Documents / strings", `INSERT INTO test VALUES {'a': 'a', b: 2.3}`, false, `{"pk()":1,"a":"a","b":2.3}`, nil},
 		{"Documents / double quotes", `INSERT INTO test VALUES {"a": "b"}`, false, `{"pk()":1,"a":"b"}`, nil},
+		{"Documents / with reference to other fields", `INSERT INTO test VALUES {a: 400, b: a * 4}`, false, `{"pk()":1,"a":400,"b":1600}`, nil},
 	}
 
 	for _, test := range tests {