<commit_before>package org.kneelawk.simplecursemodpackdownloader.task

import scala.collection.mutable.HashSet
import scala.collection.mutable.Set

class TaskManifest {
  private val tasks = new HashSet[Task]

  def addTask(task: Task) = tasks += task

  def removeTask(task: Task) = tasks -= task

  def getTasks: Set[Task] = tasks

  def foreach[R](f: (Task) => R) = tasks.foreach(f)

  def pruneTasks() {
    tasks.retain((t) => t.getState.isInstanceOf[StoppedEngineState])
  }
}<commit_msg>Fix TaskManifest<commit_after>package org.kneelawk.simplecursemodpackdownloader.task

import scala.collection.mutable.HashSet
import scala.collection.mutable.Set

class TaskManifest {
  private val tasks = new HashSet[Task]

  /** Add a task to the manifest.
   *  
   */
  def addTask(task: Task) = tasks += task

  /** Remove a task from the manifest.
   *  
   */
  def removeTask(task: Task) = tasks -= task

  /** Get a list of tasks in the manifest.
   *  
   */
  def getTasks: Set[Task] = tasks

  /** Loop through every task in the manifest.
   *  
   */
  def foreach[R](f: (Task) => R) = tasks.foreach(f)

  /** Remove all stopped tasks.
   *  
   */
  def pruneTasks() {
    tasks.retain((t) => !t.getState.isInstanceOf[StoppedEngineState])
  }
}
{'fraction_non_alphanumeric': 0.12619808306709265, 'fraction_numerical': 0.0, 'mean_word_length': 3.3658536585365852, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3439928', 'n_tokens_mistral': 429, 'n_tokens_neox': 423, 'n_words': 104}