<commit_before>package eventdetection.common;

import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.sql.SQLException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Supplier;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * A simple class that holds threading related constants and methods for the rest of the classes in this project.
 * 
 * @author <NAME>
 */
public class ThreadingUtils {
	/**
	 * A work stealing pool for use by all classes in this program.
	 */
	public static final ExecutorService pool = Executors.newWorkStealingPool();
	
	private static final Logger logger = LoggerFactory.getLogger("ThreadingUtils");
	private static final ReentrantLock lock = new ReentrantLock();
	private static final Path active = Paths.get(System.getProperty("user.home"), ".event-detection-active");
	private static FileLock fsLock = null;
	private static FileChannel chan = null;
	
	static {
		if (!Files.exists(active))<commit_msg>Imports fix.<commit_after>package eventdetection.common;

import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.sql.SQLException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.ReentrantLock;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * A simple class that holds threading related constants and methods for the rest of the classes in this project.
 * 
 * @author <NAME>ipstone
 */
public class ThreadingUtils {
	/**
	 * A work stealing pool for use by all classes in this program.
	 */
	public static final ExecutorService pool = Executors.newWorkStealingPool();
	
	private static final Logger logger = LoggerFactory.getLogger("ThreadingUtils");
	private static final ReentrantLock lock = new ReentrantLock();
	private static final Path active = Paths.get(System.getProperty("user.home"), ".event-detection-active");
	private static FileLock fsLock = null;
	private static FileChannel chan = null;
	
	static {
		if (!Files.exists(active))
{'fraction_non_alphanumeric': 0.0981270358306189, 'fraction_numerical': 0.0016286644951140066, 'mean_word_length': 5.1425, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2226532', 'n_tokens_mistral': 716, 'n_tokens_neox': 693, 'n_words': 208}