<commit_before>package ops;


import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


public class OPS
{
  private List<MemoryElement> _wm = new ArrayList<MemoryElement>();
  private List<Rule> _rules = new ArrayList<Rule>();
  private List<PreparedRule> _preparedRules = new ArrayList<PreparedRule>();
  private Map<String, MemoryElement> _templates = new HashMap<String, MemoryElement>();

  ExecutorService _threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());

  private ConcurrentLinkedQueue<MemoryElement> _memoryInQueue = new ConcurrentLinkedQueue<MemoryElement>();

  private boolean _debug = true;
  private boolean _halt = false;

  public void reset()
  {
    _halt = false;
    _rules.clear();
    _templates.clear();
    _wm.clear();
  }

  public void shutdown()
  {
    _threadPool.shutdown();
  }

  public void halt()
  {
    _halt = true;
  }
<commit_msg>use cached threadpool<commit_after>package ops;


import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


public class OPS
{
  private List<MemoryElement> _wm = new ArrayList<MemoryElement>();
  private List<Rule> _rules = new ArrayList<Rule>();
  private List<PreparedRule> _preparedRules = new ArrayList<PreparedRule>();
  private Map<String, MemoryElement> _templates = new HashMap<String, MemoryElement>();

//  ExecutorService _threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
  ExecutorService _threadPool = Executors.newCachedThreadPool();

  private ConcurrentLinkedQueue<MemoryElement> _memoryInQueue = new ConcurrentLinkedQueue<MemoryElement>();

  private boolean _debug = true;
  private boolean _halt = false;

  public void reset()
  {
    _halt = false;
    _rules.clear();
    _templates.clear();
    _wm.clear();
  }

  public void shutdown()
  {
    _threadPool.shutdown();
  }

  public void halt()
  {
    _halt = true;
  }

{'fraction_non_alphanumeric': 0.10816411106506424, 'fraction_numerical': 0.0, 'mean_word_length': 5.0049751243781095, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '329065', 'n_tokens_mistral': 711, 'n_tokens_neox': 694, 'n_words': 165}