<commit_before>package dotty.tools.languageserver.util.server

import java.io.PrintWriter
import java.net.URI
import java.nio.file.Path
import java.util

import dotty.tools.languageserver.DottyLanguageServer
import org.eclipse.lsp4j.{ DidOpenTextDocumentParams, InitializeParams, InitializeResult, TextDocumentItem}

class TestServer(testFolder: Path) {

  val server = new DottyLanguageServer
  init()

  private[this] def init(): InitializeResult = {
    // Fill the configuration with values populated by sbt
    def showSeq[T](lst: Seq[T]): String =
      lst
        .map(elem => '"' + elem.toString.replace('\\', '/') + '"')
        .mkString("[ ", ", ", " ]")
    val dottyIdeJson: String =
      s"""[ {
         |  "id" : "dotty-ide-test",
         |  "compilerVersion" : "${BuildInfo.ideTestsCompilerVersion}",
         |  "compilerArguments" : ${showSeq(BuildInfo.ideTestsCompilerArguments)},
         |  "sourceDirectories" : ${showSeq(BuildInfo.ideTestsSourceDirectories)},
         |  "dependencyClasspath" : ${showSeq(BuildInfo.ideTestsDependencyClasspath)},
         |  "classDirectory" : "${BuildInfo.ideTestsClassDirectory.toString().replace('\\','/')}"
         |}
         |]""".stripMargin
    val configFile = testFolder.resolve(DottyLanguageServer.IDE_CONFIG_FILE)
    testFolder.toFile.mkdirs()
    testFolder.resolve("src").toFile.mkdirs()
    testFolder.resolve("out").toFile.mkdirs()

    new PrintWriter(configFile.toString) {
      write(dottyIdeJson)
      close()
    }
<commit_msg>remove unnecessary parentheses<commit_after>package dotty.tools.languageserver.util.server

import java.io.PrintWriter
import java.net.URI
import java.nio.file.Path
import java.util

import dotty.tools.languageserver.DottyLanguageServer
import org.eclipse.lsp4j.{ DidOpenTextDocumentParams, InitializeParams, InitializeResult, TextDocumentItem}

class TestServer(testFolder: Path) {

  val server = new DottyLanguageServer
  init()

  private[this] def init(): InitializeResult = {
    // Fill the configuration with values populated by sbt
    def showSeq[T](lst: Seq[T]): String =
      lst
        .map(elem => '"' + elem.toString.replace('\\', '/') + '"')
        .mkString("[ ", ", ", " ]")
    val dottyIdeJson: String =
      s"""[ {
         |  "id" : "dotty-ide-test",
         |  "compilerVersion" : "${BuildInfo.ideTestsCompilerVersion}",
         |  "compilerArguments" : ${showSeq(BuildInfo.ideTestsCompilerArguments)},
         |  "sourceDirectories" : ${showSeq(BuildInfo.ideTestsSourceDirectories)},
         |  "dependencyClasspath" : ${showSeq(BuildInfo.ideTestsDependencyClasspath)},
         |  "classDirectory" : "${BuildInfo.ideTestsClassDirectory.toString.replace('\\','/')}"
         |}
         |]""".stripMargin
    val configFile = testFolder.resolve(DottyLanguageServer.IDE_CONFIG_FILE)
    testFolder.toFile.mkdirs()
    testFolder.resolve("src").toFile.mkdirs()
    testFolder.resolve("out").toFile.mkdirs()

    new PrintWriter(configFile.toString) {
      write(dottyIdeJson)
      close()
    }

{'fraction_non_alphanumeric': 0.14271621177244329, 'fraction_numerical': 0.0006576783952647156, 'mean_word_length': 3.658499234303216, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7394277', 'n_tokens_mistral': 933, 'n_tokens_neox': 902, 'n_words': 148}