<commit_before>package io.reactors
package debugger



import io.reactors.common.UnrolledRing



class BreakpointDebugger(val system: ReactorSystem, val deltaDebugger: DeltaDebugger)
extends DebugApi {
  private val monitor = system.monitor

  def isEnabled = true

  def eventSent[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def eventDelivered[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def reactorStarted(r: Reactor[_]) {
  }

  def reactorScheduled(r: Reactor[_]) {
  }

  def reactorPreempted(r: Reactor[_]) {
  }

  def reactorDied(r: Reactor[_]) {
  }

  def reactorTerminated(r: Reactor[_]) {
  }

  def connectorOpened[T](c: Connector[T]) {
  }

  def connectorSealed[T](c: Connector[T]) {
  }

  def log(x: Any) {
  }
}<commit_msg>Add breakpoint-related methods to debugger<commit_after>package io.reactors
package debugger



import io.reactors.common.UnrolledRing
import java.util.concurrent.atomic.AtomicLong
import scala.collection._



class BreakpointDebugger(val system: ReactorSystem, val deltaDebugger: DeltaDebugger)
extends DebugApi {
  import BreakpointDebugger.Breakpoint

  private val monitor = system.monitor
  private val bidCounter = new AtomicLong
  private val breakpoints = mutable.Map[Long, Breakpoint]()

  def isEnabled = true

  def eventSent[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def eventDelivered[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def reactorStarted(r: Reactor[_]) {
  }

  def reactorScheduled(r: Reactor[_]) {
  }

  def reactorPreempted(r: Reactor[_]) {
  }

  def reactorDied(r: Reactor[_]) {
  }

  def reactorTerminated(r: Reactor[_]) {
  }

  def connectorOpened[T](c: Connector[T]) {
  }

  def connectorSealed[T](c: Connector[T]) {
  }

  def log(x: Any) {
  }

  def breakpointAdd(pattern: String, tpe: String): Long =
    monitor.synchronized {
      val bid = bidCounter.getAndIncrement()
      val b = new Breakpoint(bid)
      breakpoints(bid) = b
      bid
    }

  def breakpointList(): List[Breakpoint] = monitor.synchronized {
    breakpoints.values.toList
  }

  def breakpointRemove(bid: Long): Option[Breakpoint] = monitor.synchronized {
    breakpoints.remove(bid)
  }
}


object BreakpointDebugger {
  class Breakpoint(val bid: Long, val pattern: String, val tpes: String)
}
{'fraction_non_alphanumeric': 0.12267013437364542, 'fraction_numerical': 0.0, 'mean_word_length': 4.028322440087146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6963904', 'n_tokens_mistral': 832, 'n_tokens_neox': 784, 'n_words': 184}