PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: platers/obsidian-linter (ts)

Issue:
Bug: No Bare URLs Affects HTML
❶ no use linter 
❷ use linter optimization
![image](https://github.com/platers/obsidian-linter/assets/29135984/72cf7cb3-87c6-4eef-9e42-2e21f47d984a)

Pull request:
Updated `No Bare URLs` to Ignore html Elements
Fixes #777 

Changes Made:
- Added a test for the scenario in question
- Ignored html for `No Bare URLs`

Patch:
diff --git a/src/rules/no-bare-urls.ts b/src/rules/no-bare-urls.ts
index d17c013..9d1c64f 100644
--- a/src/rules/no-bare-urls.ts
+++ b/src/rules/no-bare-urls.ts
@@ -16,7 +16,7 @@ export default class NoBareUrls extends RuleBuilder<NoBareUrlsOptions> {
       nameKey: 'rules.no-bare-urls.name',
       descriptionKey: 'rules.no-bare-urls.description',
       type: RuleType.CONTENT,
-      ruleIgnoreTypes: [IgnoreTypes.code, IgnoreTypes.math, IgnoreTypes.yaml, IgnoreTypes.link, IgnoreTypes.wikiLink, IgnoreTypes.tag, IgnoreTypes.image, IgnoreTypes.inlineCode, IgnoreTypes.anchorTag],
+      ruleIgnoreTypes: [IgnoreTypes.code, IgnoreTypes.math, IgnoreTypes.yaml, IgnoreTypes.link, IgnoreTypes.wikiLink, IgnoreTypes.tag, IgnoreTypes.image, IgnoreTypes.inlineCode, IgnoreTypes.anchorTag, IgnoreTypes.html],
     });
   }
   get OptionsClass(): new () => NoBareUrlsOptions {


Test patch:
diff --git a/__tests__/no-bare-urls.test.ts b/__tests__/no-bare-urls.test.ts
index 40e9d05..6405eba 100644
--- a/__tests__/no-bare-urls.test.ts
+++ b/__tests__/no-bare-urls.test.ts
@@ -47,7 +47,7 @@ ruleTest({
         \`http --headers --follow --all https://google.com\`
       `,
     },
-    {// https://github.com/platers/obsidian-linter/issues/588
+    {// accounts for https://github.com/platers/obsidian-linter/issues/588
       testName: 'Make sure that anchor tags are not affected by the rule',
       before: dedent`
         <a href="https://www.google.com" class="tc-tiddlylink-external" rel="noopener noreferrer" target="_blank">https://www.google.com</a>
@@ -56,5 +56,16 @@ ruleTest({
         <a href="https://www.google.com" class="tc-tiddlylink-external" rel="noopener noreferrer" target="_blank">https://www.google.com</a>
       `,
     },
+    {// accounts for https://github.com/platers/obsidian-linter/issues/777
+      testName: 'Make sure that iframe tags are not affected by the rule when a space is present in the src attribute of the tag',
+      before: dedent`
+        > [!note]  [Google](https://www.google.com)
+        > <iframe width="100%" height="600" src=" https://www.google.com "></iframe>
+      `,
+      after: dedent`
+        > [!note]  [Google](https://www.google.com)
+        > <iframe width="100%" height="600" src=" https://www.google.com "></iframe>
+      `,
+    },
   ],
 });
Repository: spf13/viper (go)

Issue:
MergeConfig fails when a target key is nil instead of unset
**Expected behavior (what you expected to happen)**:
I am merging a config file on top of existing configuration. So some of the keys, like a slice, may be nil instead of unset. I expect that merging a populated key into a configuration where that key is nil results in using the populated value.

**Actual behavior (what actually happened)**:
I see a log message from jww about the source and destination types not matching (because the type of the target is nil) and then the key is skipped.

```
ERROR 2021/05/12 17:26:29 svType != tvType; key=storage, st=[]interface {}, tt=<nil>, sv=[map[config:map[env:MY_ENV_VAR] name:stuff plugin:myplugin]], tv=<nil>
```

The failure is occurring on these lines is https://github.com/spf13/viper/blob/36be6bf91f8c02e8fd53f87205ad230706a3eea9/viper.go#L1829-L1834


**Repl.it link**:
None

**Code reproducing the issue**:

This was easier to reproduce with a single change to the viper test `TestMergeConfig` by setting universe to `null`, instead of omitting it. That causes the test to fail.

https://github.com/spf13/viper/blob/36be6bf91f8c02e8fd53f87205ad230706a3eea9/viper_test.go#L1693-L1703

```
var yamlMergeExampleTgt = []byte(`
hello:
    pop: 37890
    largenum: 765432101234567
    num2pow63: 9223372036854775808
    universe: null
    world:
    - us
    - uk
    - fr
    - de
`)
```

**Environment**:
- Viper version: tip of master 36be6bf
- Config source: files
- File format: any

**Anything else we should know?**:


Pull request:
Fix merging a key into a nil target
When merging a key where the target value is nil, the type of the target and source do not match. What currently happens is an error is logged and the key is skipped.

I have changed it so that it does the same thing as when the target key is missing: copy the source value to the target.

Fixes #1134 

Patch:
diff --git a/viper.go b/viper.go
index 50b4780..a89efe9 100644
--- a/viper.go
+++ b/viper.go
@@ -1826,7 +1826,7 @@ func mergeMaps(
 
 		svType := reflect.TypeOf(sv)
 		tvType := reflect.TypeOf(tv)
-		if svType != tvType {
+		if tvType != nil && svType != tvType { // Allow for the target to be nil
 			jww.ERROR.Printf(
 				"svType != tvType; key=%s, st=%v, tt=%v, sv=%v, tv=%v",
 				sk, svType, tvType, sv, tv)


Test patch:
diff --git a/viper_test.go b/viper_test.go
index 45bf8e9..a5bbbd4 100644
--- a/viper_test.go
+++ b/viper_test.go
@@ -1695,6 +1695,7 @@ hello:
     pop: 37890
     largenum: 765432101234567
     num2pow63: 9223372036854775808
+    universe: null
     world:
     - us
     - uk
Repository: jlongster/prettier (js)

Issue:
Missing parenthesis for functions left of a template literal
```js
(function() {})()``;
(function() {})``;
```

outputs

```js
function() {}()``;
function() {}``;
```

which is invalid

https://jlongster.github.io/prettier/#%7B%22content%22%3A%22(function()%20%7B%7D)()%60%60%3B%5Cn(function()%20%7B%7D)%60%60%3B%5Cn%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3Afalse%2C%22bracketSpacing%22%3Atrue%7D%7D

Those test262 are testing crazy things :p

Pull request:
Fix parens for functions inside TaggedTemplateExpression
Fixes #244 (again)

Sorry for missing this one!

Patch:
diff --git a/src/fast-path.js b/src/fast-path.js
index cc195dc92..94b2fcf44 100644
--- a/src/fast-path.js
+++ b/src/fast-path.js
@@ -374,6 +374,7 @@ FPp.needsParens = function(assumeExpressionContext) {
 
       switch (parent.type) {
         case "MemberExpression":
+        case "TaggedTemplateExpression":
         case "UnaryExpression":
           return true;
 


Test patch:
diff --git a/tests/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/arrows/__snapshots__/jsfmt.spec.js.snap
index 3e6449a4b..9e447683e 100644
--- a/tests/arrows/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/arrows/__snapshots__/jsfmt.spec.js.snap
@@ -30,6 +30,7 @@ exports[`test arrow_function_expression.js 1`] = `
 typeof (() => {});
 export default (() => {})();
 (() => {})()\`\`;
+(() => {})\`\`;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 (a => {
 }).length;
@@ -39,6 +40,8 @@ export default (() => {
 })()
 (() => {
 })()\`\`;
+(() => {
+})\`\`;
 "
 `;
 
diff --git a/tests/arrows/arrow_function_expression.js b/tests/arrows/arrow_function_expression.js
index f0309346f..dac425060 100644
--- a/tests/arrows/arrow_function_expression.js
+++ b/tests/arrows/arrow_function_expression.js
@@ -2,3 +2,4 @@
 typeof (() => {});
 export default (() => {})();
 (() => {})()``;
+(() => {})``;
diff --git a/tests/function/__snapshots__/jsfmt.spec.js.snap b/tests/function/__snapshots__/jsfmt.spec.js.snap
index a776342cc..cb2af2b51 100644
--- a/tests/function/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/function/__snapshots__/jsfmt.spec.js.snap
@@ -356,6 +356,7 @@ exports[`test function_expression.js 1`] = `
 typeof (function() {});
 export default (function() {})();
 (function() {})()\`\`;
+(function() {})\`\`;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 (function() {
 }).length;
@@ -365,6 +366,8 @@ export default (function() {
 })()
 (function() {
 })()\`\`;
+(function() {
+})\`\`;
 "
 `;
 
diff --git a/tests/function/function_expression.js b/tests/function/function_expression.js
index 786e8bdb5..93c6da8ec 100644
--- a/tests/function/function_expression.js
+++ b/tests/function/function_expression.js
@@ -2,3 +2,4 @@
 typeof (function() {});
 export default (function() {})();
 (function() {})()``;
+(function() {})``;
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 317
Good morning! Here's your coding interview problem for today.

This problem was asked by Yahoo.

Write a function that returns the bitwise **_AND_** of all integers between `M` and `N`, inclusive.

Pull request:
Day317
Resolves #645.

Patch:
diff --git a/README.md b/README.md
index 0b12102..939059e 100644
--- a/README.md
+++ b/README.md
@@ -322,3 +322,4 @@ problems from
 * [Day 312](https://github.com/vaskoz/dailycodingproblem-go/issues/637)
 * [Day 314](https://github.com/vaskoz/dailycodingproblem-go/issues/640)
 * [Day 315](https://github.com/vaskoz/dailycodingproblem-go/issues/642)
+* [Day 317](https://github.com/vaskoz/dailycodingproblem-go/issues/645)
diff --git a/day317/problem.go b/day317/problem.go
new file mode 100644
index 0000000..2f18885
--- /dev/null
+++ b/day317/problem.go
@@ -0,0 +1,38 @@
+package day317
+
+import (
+	"math/bits"
+)
+
+// BitwiseAndInclusiveRange returns the AND of all the numbers
+// between m and n inclusive.
+// This runs by performing O(abs(N-M)) AND operations.
+// This is a brute force solution.
+func BitwiseAndInclusiveRange(m, n uint64) uint64 {
+	if m > n {
+		m, n = n, m
+	}
+	for i := m + 1; m != 0 && i <= n; i++ {
+		m &= i
+	}
+	return m
+}
+
+// BitwiseAndInclusiveRangeFaster returns the AND of all the numbers
+// between m and n inclusive.
+// This is a smarter bit manipulation version.
+func BitwiseAndInclusiveRangeFaster(m, n uint64) uint64 {
+	var result uint64
+	for {
+		mMsb := bits.Len64(m)
+		nMsb := bits.Len64(n)
+		if mMsb != nMsb || mMsb == 0 {
+			break
+		}
+		val := uint64(1 << (uint(mMsb) - 1))
+		result += val
+		m -= val
+		n -= val
+	}
+	return result
+}


Test patch:
diff --git a/day317/problem_test.go b/day317/problem_test.go
new file mode 100644
index 0000000..5f695de
--- /dev/null
+++ b/day317/problem_test.go
@@ -0,0 +1,49 @@
+package day317
+
+import "testing"
+
+// nolint
+var testcases = []struct {
+	m, n, expected uint64
+}{
+	{1, 10, 0},
+	{12, 15, 12},
+	{10, 1, 0},
+	{15, 12, 12},
+	{19, 17, 16},
+	{20, 10, 0},
+}
+
+func TestBitwiseAndInclusiveRange(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := BitwiseAndInclusiveRange(tc.m, tc.n); result != tc.expected {
+			t.Errorf("Expected %v, got %v", tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkBitwiseAndInclusiveRange(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			BitwiseAndInclusiveRange(tc.m, tc.n)
+		}
+	}
+}
+
+func TestBitwiseAndInclusiveRangeFaster(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := BitwiseAndInclusiveRangeFaster(tc.m, tc.n); result != tc.expected {
+			t.Errorf("Expected %v, got %v", tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkBitwiseAndInclusiveRangeFaster(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			BitwiseAndInclusiveRangeFaster(tc.m, tc.n)
+		}
+	}
+}