<commit_before>package org.purescript.ide.purs

import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.util.SystemInfo
import com.intellij.util.io.exists
import java.nio.file.Path
import java.util.concurrent.TimeUnit


class Npm {
    companion object {
        private val localBinPath: String by lazy { run("npm bin") }

        private val globalBinPath: String by lazy { run("npm -g bin") }

        private fun run(command: String): String {
            val npmCmd = when {
                SystemInfo.isWindows -> listOf("cmd", "/c", command)
                else -> listOf("/usr/bin/env", "bash", "-c", command)
            }
            val npmProc = ProcessBuilder(npmCmd)
                .redirectError(ProcessBuilder.Redirect.PIPE)
                .redirectOutput(ProcessBuilder.Redirect.PIPE)
                .start()
            npmProc.waitFor(4, TimeUnit.SECONDS)
            return npmProc.inputStream.bufferedReader().readLine()
        }

        private val log = logger<Npm>()

        fun pathFor(command: String): Path? {
            val binary = when {
                SystemInfo.isWindows -> "$command.cmd"
                else -> command
            }
            val localCommand = Path.of(localBinPath, binary)
            if (localCommand.exists()) return localCommand
            
            val globalCommand = Path.of(globalBinPath, binary)
            if (globalCommand.exists()) return globalCommand
            
            if (log.isDebugEnabled) log.debug("$command is not found")
            return null
        }
    }
}<commit_msg>Remove explicit use of default value<commit_after>package org.purescript.ide.purs

import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.util.SystemInfo
import com.intellij.util.io.exists
import java.nio.file.Path
import java.util.concurrent.TimeUnit


class Npm {
    companion object {
        private val localBinPath: String by lazy { run("npm bin") }

        private val globalBinPath: String by lazy { run("npm -g bin") }

        private fun run(command: String): String {
            val npmCmd = when {
                SystemInfo.isWindows -> listOf("cmd", "/c", command)
                else -> listOf("/usr/bin/env", "bash", "-c", command)
            }
            val npmProc = ProcessBuilder(npmCmd).start()
            npmProc.waitFor(4, TimeUnit.SECONDS)
            return npmProc.inputStream.bufferedReader().readLine()
        }

        private val log = logger<Npm>()

        fun pathFor(command: String): Path? {
            val binary = when {
                SystemInfo.isWindows -> "$command.cmd"
                else -> command
            }
            val localCommand = Path.of(localBinPath, binary)
            if (localCommand.exists()) return localCommand
            
            val globalCommand = Path.of(globalBinPath, binary)
            if (globalCommand.exists()) return globalCommand
            
            if (log.isDebugEnabled) log.debug("$command is not found")
            return null
        }
    }
}
{'fraction_non_alphanumeric': 0.10258085592943482, 'fraction_numerical': 0.0006533812479581836, 'mean_word_length': 1.9699321047526672, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '3623214', 'n_tokens_mistral': 848, 'n_tokens_neox': 809, 'n_words': 200}