PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: brenolf/polyjuice (js)

Issue:
Add `validateCommentPosition` rule
http://jscs.info/rule/validateCommentPosition

Pull request:
Resolves #38

Patch:
diff --git a/lib/dictionaries/jscs/validateCommentPosition.js b/lib/dictionaries/jscs/validateCommentPosition.js
new file mode 100644
index 0000000..a0cf868
--- /dev/null
+++ b/lib/dictionaries/jscs/validateCommentPosition.js
@@ -0,0 +1,22 @@
+/**
+* @fileoverview Translation for `validateCommentPosition` (JSCS) to ESLint
+* @author Breno Lima de Freitas <https://breno.io>
+* @copyright 2016 Breno Lima de Freitas. All rights reserved.
+* See LICENSE file in root directory for full license.
+*/
+
+'use strict'
+
+//------------------------------------------------------------------------------
+// Rule Translation Definition
+//------------------------------------------------------------------------------
+
+module.exports = function(__current__, value) {
+  if (value.position === 'beside') {
+    return {
+      'no-inline-comments': 2
+    }
+  }
+
+  return {}
+};


Test patch:
diff --git a/test/dictionaries/jscs/validateCommentPosition.test.js b/test/dictionaries/jscs/validateCommentPosition.test.js
new file mode 100644
index 0000000..0427b01
--- /dev/null
+++ b/test/dictionaries/jscs/validateCommentPosition.test.js
@@ -0,0 +1,34 @@
+/**
+ * @fileoverview Tests for `validateCommentPosition` (JSCS) translation
+ * @author Breno Lima de Freitas <https://breno.io>
+ * @copyright 2016 Breno Lima de Freitas. All rights reserved.
+ * See LICENSE file in root directory for full license.
+ */
+
+'use strict'
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+var lib = require('../../../lib/dictionaries/jscs/validateCommentPosition.js')
+
+var getFn = caller(lib)
+
+describe('jscs#validateCommentPosition', function() {
+  it('converts the rule correctly', function() {
+    var fn = getFn()
+
+    expect(fn({
+      position: 'above',
+      allExcept: ['pragma']
+    })).to.be.empty
+
+    expect(fn({
+      position: 'beside',
+      allExcept: ['pragma']
+    })).to.eql({
+      'no-inline-comments': 2
+    })
+  })
+})
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 214
Good morning! Here's your coding interview problem for today.

This problem was asked by Stripe.

Given an integer n, return the length of the longest consecutive run of 1s in its binary representation.

For example, given `156`, you should return `3`.

Pull request:
Day214
Resolves #441.

Patch:
diff --git a/README.md b/README.md
index baaae24..e2c6bd5 100644
--- a/README.md
+++ b/README.md
@@ -224,3 +224,4 @@ problems from
 * [Day 211](https://github.com/vaskoz/dailycodingproblem-go/issues/434)
 * [Day 212](https://github.com/vaskoz/dailycodingproblem-go/issues/436)
 * [Day 213](https://github.com/vaskoz/dailycodingproblem-go/issues/439)
+* [Day 214](https://github.com/vaskoz/dailycodingproblem-go/issues/441)
diff --git a/day214/problem.go b/day214/problem.go
new file mode 100644
index 0000000..e6712e6
--- /dev/null
+++ b/day214/problem.go
@@ -0,0 +1,44 @@
+package day214
+
+import "strconv"
+
+// LengthLongestConsecutiveRunOnesBitShift calculates the longest
+// run of 1's using bit shifting.
+func LengthLongestConsecutiveRunOnesBitShift(n int) int {
+	var max, count int
+	for n != 0 {
+		if n&1 == 1 {
+			count++
+		} else {
+			if count > max {
+				max = count
+			}
+			count = 0
+		}
+		n >>= 1
+	}
+	if count > max {
+		return count
+	}
+	return max
+}
+
+// LengthLongestConsecutiveRunOnesString converts the number
+// into a binary representation string.
+func LengthLongestConsecutiveRunOnesString(n int) int {
+	var max, count int
+	for _, digit := range strconv.FormatInt(int64(n), 2) {
+		if digit == '1' {
+			count++
+		} else {
+			if count > max {
+				max = count
+			}
+			count = 0
+		}
+	}
+	if count > max {
+		return count
+	}
+	return max
+}


Test patch:
diff --git a/day214/problem_test.go b/day214/problem_test.go
new file mode 100644
index 0000000..34bb6e4
--- /dev/null
+++ b/day214/problem_test.go
@@ -0,0 +1,46 @@
+package day214
+
+import "testing"
+
+var testcases = []struct {
+	n                      int
+	longestConsecutiveOnes int
+}{
+	{156, 3},
+	{20432348234, 3},
+	{65535, 16},
+}
+
+func TestLengthLongestConsecutiveRunOnesBitShift(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := LengthLongestConsecutiveRunOnesBitShift(tc.n); result != tc.longestConsecutiveOnes {
+			t.Errorf("Given n=%d, expected %d, got %d", tc.n, tc.longestConsecutiveOnes, result)
+		}
+	}
+}
+
+func BenchmarkLengthLongestConsecutiveRunOnesBitShift(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			LengthLongestConsecutiveRunOnesBitShift(tc.n)
+		}
+	}
+}
+
+func TestLengthLongestConsecutiveRunOnesString(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := LengthLongestConsecutiveRunOnesString(tc.n); result != tc.longestConsecutiveOnes {
+			t.Errorf("Given n=%d, expected %d, got %d", tc.n, tc.longestConsecutiveOnes, result)
+		}
+	}
+}
+
+func BenchmarkLengthLongestConsecutiveRunOnesString(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			LengthLongestConsecutiveRunOnesString(tc.n)
+		}
+	}
+}