galtimur/lca-bug-localization-test huggingface dataset:
Repository: fwcd/kotlin-language-server
Issue: VSCode Format on Save deletes any file changes

Having fwcd-kotlin and editor.formatOnSave enabled in VSCode makes saving files impossible.
https://i.gyazo.com/9bdfba2d927450a0a8aac00c545f1384.mp4


Changed files:
server/src/main/kotlin/org/javacs/kt/SourceFiles.kt
server/src/main/kotlin/org/javacs/kt/KotlinTextDocumentService.kt

diff --git a/server/src/main/kotlin/org/javacs/kt/KotlinTextDocumentService.kt b/server/src/main/kotlin/org/javacs/kt/KotlinTextDocumentService.kt
index fd3e1f0..a7c89ce 100644
--- a/server/src/main/kotlin/org/javacs/kt/KotlinTextDocumentService.kt
+++ b/server/src/main/kotlin/org/javacs/kt/KotlinTextDocumentService.kt
@@ -61,7 +61,10 @@ class KotlinTextDocumentService(
         get() = uri.endsWith(".kts")
 
     private val TextDocumentIdentifier.content: String
-        get() = uriContentProvider.contentOf(parseURI(uri))
+        get() {
+            val uri = parseURI(uri)
+            return sf.contentOfTracked(uri) ?: uriContentProvider.contentOf(uri)
+        }
 
     fun connect(client: LanguageClient) {
         this.client = client
diff --git a/server/src/main/kotlin/org/javacs/kt/SourceFiles.kt b/server/src/main/kotlin/org/javacs/kt/SourceFiles.kt
index b1d67e9..9153d51 100644
--- a/server/src/main/kotlin/org/javacs/kt/SourceFiles.kt
+++ b/server/src/main/kotlin/org/javacs/kt/SourceFiles.kt
@@ -113,6 +113,10 @@ class SourceFiles(
         }
     }
 
+    fun contentOfTracked(uri: URI):String? {
+        return files[uri]?.content
+    }
+
     fun createdOnDisk(uri: URI) {
         changedOnDisk(uri)
     }
Repository: hannah-sten/texify-idea
Issue: LatexLineBreakInspection triggered incorrectly 

#### Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version
IntelliJ 2020.2

#### Operating System 
macOS

#### TeXiFy IDEA version
Latest alpha

#### Description
The following bit of text incorrectly triggers the `Sentence does not start on a new line` Inspection.

#### Minimal example to reproduce the problem

```latex
This is an abbreviation (ABC). % commemt
More text here.
```



Changed files:
src/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspection.kt
test/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspectionTest.kt

diff --git a/src/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspection.kt b/src/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspection.kt
index 4e6d4f529..f33211117 100644
--- a/src/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspection.kt
+++ b/src/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspection.kt
@@ -47,8 +47,9 @@ open class LatexLineBreakInspection : TexifyInspectionBase() {
                 val startOffset = matcher.start()
                 val endOffset = matcher.end() + (endLine - offset)
 
-                // Do not trigger the inspection when in a comment.
-                if (file.findElementAt(startOffset + text.startOffset)?.isComment() == true) {
+                val element = file.findElementAt(startOffset + text.startOffset)
+                // Do not trigger the inspection when in a comment or when a comment starts directly after.
+                if ((element?.isComment() == true) || (element?.nextSiblingIgnoreWhitespace()?.isComment() == true)) {
                     continue
                 }
 
diff --git a/test/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspectionTest.kt b/test/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspectionTest.kt
index d1ab3f4b5..db6ce91bc 100644
--- a/test/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspectionTest.kt
+++ b/test/nl/hannahsten/texifyidea/inspections/latex/LatexLineBreakInspectionTest.kt
@@ -14,6 +14,29 @@ This e<weak_warning descr="Sentence does not start on a new line">tc. is missing
         myFixture.checkHighlighting()
     }
 
+    fun testNoWarning() {
+        myFixture.configureByText(LatexFileType, """
+            First sentence.
+            Second sentence.
+        """.trimIndent())
+        myFixture.checkHighlighting()
+    }
+
+    fun testNoWarningWithComment() {
+        myFixture.configureByText(LatexFileType, """
+            This is an abbreviation (ABC). % commemt
+            More text here.
+        """.trimIndent())
+        myFixture.checkHighlighting()
+    }
+
+    fun testNoWarningInMathMode() {
+        myFixture.configureByText(LatexFileType, """
+            \\[ Why. would. you. do. this. \\]
+        """.trimIndent())
+        myFixture.checkHighlighting()
+    }
+
     fun testQuickfix() {
         myFixture.configureByText(LatexFileType,
         """
Repository: horizontalsystems/unstoppable-wallet-android
Issue: TX fee: in send controller and send confirmation controller doesn't match.

tried sending 0.1 ETH in dev build no.467. The send controller showed fee as $0.01 ut the send confirmation controller showed it as 0$.

I suspect it might be due to rounding. Note that we shouldn't be rounding the values in send AND send confirmation controllers


Changed files:
app/src/main/java/io/horizontalsystems/bankwallet/modules/send/SendModule.kt
app/src/main/java/io/horizontalsystems/bankwallet/viewHelpers/ValueFormatter.kt

diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/SendModule.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/SendModule.kt
index 054277d80..a7badc872 100644
--- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/SendModule.kt
+++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/SendModule.kt
@@ -114,7 +114,7 @@ object SendModule {
                 ValueFormatter.format(this.coinValue)
             }
             is SendModule.AmountInfo.CurrencyValueInfo -> {
-                ValueFormatter.formatSimple(this.currencyValue)
+                ValueFormatter.format(this.currencyValue)
             }
         }
     }
diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/viewHelpers/ValueFormatter.kt b/app/src/main/java/io/horizontalsystems/bankwallet/viewHelpers/ValueFormatter.kt
index 3e3d4af4c..e4bd7b535 100644
--- a/app/src/main/java/io/horizontalsystems/bankwallet/viewHelpers/ValueFormatter.kt
+++ b/app/src/main/java/io/horizontalsystems/bankwallet/viewHelpers/ValueFormatter.kt
@@ -105,9 +105,4 @@ object ValueFormatter {
         return spannable
     }
 
-    fun formatSimple(currencyValue: CurrencyValue): String? {
-        val result = currencyValue.value.setScale(2, RoundingMode.HALF_EVEN)
-        val formatted = currencyFormatter.format(result)
-        return "${currencyValue.currency.symbol}$formatted"
-    }
 }