<commit_before>/* NEST (New Scala Test)
 * Copyright 2007-2009 LAMP/EPFL
 * @author <NAME>
 */

// $Id$

package scala.tools.partest.nest

import java.io.{File, PrintStream, FileOutputStream, BufferedReader,
                InputStreamReader, StringWriter, PrintWriter}
import java.util.StringTokenizer

import scala.actors.Actor._

trait DirectRunner {

  def fileManager: FileManager

  private val numActors = Integer.parseInt(System.getProperty("scalatest.actors", "8"))

  if ((System.getProperty("partest.debug", "false") equals "true") ||
      (System.getProperty("scalatest.debug", "false") equals "true"))
    scala.actors.Debug.level = 3

  private val coreProp = try {
    System.getProperty("actors.corePoolSize")
  } catch {
    case ace: java.security.AccessControlException =>
      null
  }
  if (coreProp == null) {
    scala.actors.Debug.info("actors.corePoolSize not defined")
    System.setProperty("actors.corePoolSize", "16")
  }

  def runTestsForFiles(kindFiles: List[File], kind: String): (Int, Int) = {
    val len = kindFiles.length
    val (testsEach, lastFrag) = (len/numActors, len%numActors)
    val last = numActors-1<commit_msg>Fixed partest build problem.<commit_after>/* NEST (New Scala Test)
 * Copyright 2007-2009 LAMP/EPFL
 * @author <NAME>
 */

// $Id$

package scala.tools.partest.nest

import java.io.{File, PrintStream, FileOutputStream, BufferedReader,
                InputStreamReader, StringWriter, PrintWriter}
import java.util.StringTokenizer

import scala.actors.Actor._
import scala.actors.Scheduler

trait DirectRunner {

  def fileManager: FileManager

  private val numActors = Integer.parseInt(System.getProperty("scalatest.actors", "8"))

  if ((System.getProperty("partest.debug", "false") equals "true") ||
      (System.getProperty("scalatest.debug", "false") equals "true"))
    scala.actors.Debug.level = 3

  private val coreProp = try {
    System.getProperty("actors.corePoolSize")
  } catch {
    case ace: java.security.AccessControlException =>
      null
  }
  if (coreProp == null) {
    scala.actors.Debug.info("actors.corePoolSize not defined")
    System.setProperty("actors.corePoolSize", "16")
  }

  def runTestsForFiles(kindFiles: List[File], kind: String): (Int, Int) = {
    val len = kindFiles.length
    val (testsEach, lastFrag) = (len/numActors, len%numActors)
    val last = numActors-1

    // make sure Actor Scheduler is up and running
    Scheduler.restart()

{'fraction_non_alphanumeric': 0.12755519215044972, 'fraction_numerical': 0.01062959934587081, 'mean_word_length': 3.9136546184738954, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1073919', 'n_tokens_mistral': 806, 'n_tokens_neox': 762, 'n_words': 177}