<commit_before>package org.jpc.engine.provider;

import org.jpc.engine.prolog.PrologEngine;

/**
 * TODO move to interface PrologEngineProvider when Java8 is available
 * Currently used for unit testing.
 * @author sergioc
 *
 */
public class PrologEngineProviderManager {

	private static PrologEngineProvider<? extends PrologEngine> prologEngineProvider;
	
	public static synchronized PrologEngine getPrologEngine() {
		return prologEngineProvider.getPrologEngine();
	}
	
	public static synchronized void setPrologEngineProvider(PrologEngineProvider<? extends PrologEngine> prologEngineProvider) {
		PrologEngineProviderManager.prologEngineProvider = prologEngineProvider;
	}
}
<commit_msg>adding setPrologEngine method in the ProviderManager<commit_after>package org.jpc.engine.provider;

import org.jpc.engine.prolog.PrologEngine;

/**
 * TODO move to interface PrologEngineProvider when Java8 is available
 * Currently used for unit testing.
 * @author sergioc
 *
 */
public class PrologEngineProviderManager {

	private static PrologEngineProvider<? extends PrologEngine> prologEngineProvider;
	
	public static synchronized PrologEngine getPrologEngine() {
		return prologEngineProvider.getPrologEngine();
	}
	
	public static void setPrologEngine(PrologEngine prologEngine) {
		setPrologEngineProvider(new SimpleEngineProvider(prologEngine));
	}
	
	public static synchronized void setPrologEngineProvider(PrologEngineProvider<? extends PrologEngine> prologEngineProvider) {
		PrologEngineProviderManager.prologEngineProvider = prologEngineProvider;
	}
}

{'fraction_non_alphanumeric': 0.06602564102564103, 'fraction_numerical': 0.001282051282051282, 'mean_word_length': 6.614634146341463, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6890586', 'n_tokens_mistral': 430, 'n_tokens_neox': 411, 'n_words': 104}