PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: paustint/soql-parser-js (ts)
Issue: If an empty orderby array is included, the composed query is invalid
<!--
  Please include the following classification.
  If your classification is not added, you can modify the list below
-->
- [ ] Feature
- [x] Bug Request

<!--If this is a bug, please include the steps to reproduce the bug-->
## Description
If an empty array is provided when composing a query, then `ORDER BY` should be omitted from the query.

The following query results in an invalid generated query:

```json
{
  "fields": [
    {
      "type": "Field",
      "field": "Id"
    }
  ],
  "sObject": "Account",
  "orderBy": [],
  "limit": 1,
  "offset": 5
}
```

```sql
SELECT Id
FROM Account
ORDER BY 
LIMIT 1
OFFSET 5
```
Pull request description: If an empty orderby array is included, the composed query is invalid #87
Added check to ensure order by is only added if when an object or array with more than one element is provided

resolves #87

Patch:
diff --git a/src/composer/composer.ts b/src/composer/composer.ts
index 41bd84d..9c7d2f3 100644
--- a/src/composer/composer.ts
+++ b/src/composer/composer.ts
@@ -14,6 +14,7 @@ import {
 import * as utils from '../utils';
 import { FieldData, Formatter, FormatOptions } from '../formatter/formatter';
 import { parseQuery } from '../parser/visitor';
+import { isArray } from 'util';
 
 export interface SoqlComposeConfig {
   logging: boolean; // default=false
@@ -186,7 +187,7 @@ export class Compose {
       }
     }
 
-    if (query.orderBy) {
+    if (query.orderBy && (!isArray(query.orderBy) || query.orderBy.length > 0)) {
       output += this.formatter.formatClause('ORDER BY');
       output += ` ${this.parseOrderBy(query.orderBy)}`;
       this.log(output);


Test patch:
diff --git a/test/test.spec.ts b/test/test.spec.ts
index 7dfb8dd..73f59e7 100644
--- a/test/test.spec.ts
+++ b/test/test.spec.ts
@@ -98,6 +98,20 @@ describe('compose queries', () => {
     const soqlQuery = composeQuery(query);
     expect(soqlQuery).to.equal(`SELECT Id FROM Account WHERE Foo IN ('1', '2', '3') OR Bar = 'foo'`);
   });
+  it('Should not add extraneous order by clauses', () => {
+    const query: Query = {
+      fields: [
+        {
+          type: 'Field',
+          field: 'Id',
+        },
+      ],
+      sObject: 'Account',
+      orderBy: [],
+    };
+    const soqlQuery = composeQuery(query);
+    expect(soqlQuery).to.equal(`SELECT Id FROM Account`);
+  });
 });
 
 describe('format queries', () => {
Repository: arve0/markdown-it-attrs (js)
Issue: Styling a element with several CSS classes
Hi,
I am trying to use this in `tui.editor` within a Gollum installation, I have already written a render layer for Gollum which mimics `markdown-it-attrs` behaviors. Something that makes me wonder is some inconsistencies when having several classes on an element.

Example input:
```md
1.this is the markdown I'm trying to parse {.note .green}
2.this is the markdown I'm trying to parse {.note.green}
```
Current output:
```html
<p class="note green">1.this is the markdown I'm trying to parse</p>
<p>2.this is the markdown I'm trying to parse</p>
```

Expected output:
```html
<p class="note green">1.this is the markdown I'm trying to parse</p>
<p class="note green">2.this is the markdown I'm trying to parse</p>
```
Won't you agree that both should render the same way? I mean why not allowing the shorthand `.warning.green` instead of `.warning .green`? and why it completely eats `.note.green`?

Thanks
/Reza
Pull request description: allow dot in class names
fixes #75 

Patch:
diff --git a/utils.js b/utils.js
index a210f24..8188a6d 100644
--- a/utils.js
+++ b/utils.js
@@ -36,15 +36,15 @@ exports.getAttrs = function (str, start, options) {
     }
 
     // {.class} {..css-module}
-    if (char_ === classChar) {
-      if (key === '') {
-        key = 'class';
-        parsingKey = false;
-        continue;
-      } else if (key === 'class') {
+    if (char_ === classChar && key === '') {
+      if (str.charAt(i + 1) === classChar) {
         key = 'css-module';
-        continue;
+        i += 1;
+      } else {
+        key = 'class';
       }
+      parsingKey = false;
+      continue;
     }
 
     // {#id}


Test patch:
diff --git a/test.js b/test.js
index 8505dbb..d069bd0 100644
--- a/test.js
+++ b/test.js
@@ -24,9 +24,9 @@ describeTestsWithOptions({
 
 function describeTestsWithOptions(options, postText) {
   describe('markdown-it-attrs.utils' + postText, () => {
-    it(replaceDelimiters('should parse {.class ..css-module #id key=val}', options), () => {
-      let src = '{.red ..mod #head key=val}';
-      let expected = [['class', 'red'], ['css-module', 'mod'], ['id', 'head'], ['key', 'val']];
+    it(replaceDelimiters('should parse {.class ..css-module #id key=val .class.with.dot}', options), () => {
+      let src = '{.red ..mod #head key=val .class.with.dot}';
+      let expected = [['class', 'red'], ['css-module', 'mod'], ['id', 'head'], ['key', 'val'], ['class', 'class.with.dot']];
       let res = utils.getAttrs(replaceDelimiters(src, options), 0, options);
       assert.deepEqual(res, expected);
     });
Repository: mgechev/revive (go)
Issue: revive:disable-next-line isn't working
Using macOS and golangci-lint v1.41.1 (a207480, 2021-06-19), I expected this to work, and not give me a linter failure:
```go
//revive:disable-next-line:var-naming
func (source Source) BaseApiURL() string {
```

But actually I get this error when linting:
```
source.go:99:22: var-naming: method BaseApiURL should be BaseAPIURL (revive)
func (source Source) BaseApiURL() string {
                     ^
make: *** [lint] Error 1
```

To work around, I can use this:
```go
func (source Source) BaseApiURL() string { //revive:disable-line:var-naming
```

But from how `disable-next-line` is described in the README, I think I've seen a bug.
Pull request description: fix issue #540
Closes #540 


Patch:
diff --git a/lint/file.go b/lint/file.go
index 8bef9c2..ee29c1d 100644
--- a/lint/file.go
+++ b/lint/file.go
@@ -207,7 +207,7 @@ func (f *File) disabledIntervals(rules []Rule, mustSpecifyDisableReason bool, fa
 		for _, c := range comments {
 			match := re.FindStringSubmatch(c.Text)
 			if len(match) == 0 {
-				return
+				continue
 			}
 
 			ruleNames := []string{}


Test patch:
diff --git a/test/disable-annotations_test.go b/test/disable-annotations_test.go
index b716734..afb88ef 100644
--- a/test/disable-annotations_test.go
+++ b/test/disable-annotations_test.go
@@ -14,3 +14,7 @@ func TestDisabledAnnotations(t *testing.T) {
 func TestModifiedAnnotations(t *testing.T) {
 	testRule(t, "disable-annotations2", &rule.VarNamingRule{}, &lint.RuleConfig{})
 }
+
+func TestDisableNextLineAnnotations(t *testing.T) {
+	testRule(t, "disable-annotations3", &rule.VarNamingRule{}, &lint.RuleConfig{})
+}
\ No newline at end of file
diff --git a/testdata/disable-annotations3.go b/testdata/disable-annotations3.go
new file mode 100644
index 0000000..95f239c
--- /dev/null
+++ b/testdata/disable-annotations3.go
@@ -0,0 +1,14 @@
+// Package fix_tures is a testing package
+// tests for issue #540
+//revive:disable-next-line:var-naming
+package fix_tures
+
+func foo1() {
+	// something before the annotation
+	//revive:disable-next-line:var-naming
+	// something after
+	var invalid_name = 0
+}
+
+//revive:disable-next-line:var-naming
+func (source Source) BaseApiURL() string {}