<commit_before>package fr.lteconsulting.pomexplorer;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import fr.lteconsulting.pomexplorer.commands.*;
import org.jgrapht.DirectedGraph;

import com.google.gson.Gson;

import fr.lteconsulting.pomexplorer.graph.relation.Relation;
import fr.lteconsulting.pomexplorer.webserver.Message;
import fr.lteconsulting.pomexplorer.webserver.MessageFactory;
import fr.lteconsulting.pomexplorer.webserver.WebServer;
import fr.lteconsulting.pomexplorer.webserver.XWebServer;
import org.reflections.Reflections;
import sun.reflect.Reflection;

public class AppFactory
{
	private static final AppFactory INSTANCE = new AppFactory();

	private AppFactory()
	{
	}

	public static AppFactory get()
	{
		return INSTANCE;
	}

	private final List<WorkingSession> sessions = new ArrayList<>();

	private Commands commands;

	private ApplicationSettings settings;

	private WebServer webServer;

	public List<WorkingSession> sessions()
	{
		return sessions;
	}

	public Commands commands() {
		if( commands == null )
		{
			commands = new Commands();

			final Reflections reflections = new Reflections();
			final Set<Class<?>> commandClasses = reflections.getTypesAnnotatedWith(Command.class);<commit_msg>configure guava for classpath scanning of Command annotated classes<commit_after>package fr.lteconsulting.pomexplorer;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import fr.lteconsulting.pomexplorer.commands.*;
import org.jgrapht.DirectedGraph;

import com.google.gson.Gson;

import fr.lteconsulting.pomexplorer.graph.relation.Relation;
import fr.lteconsulting.pomexplorer.webserver.Message;
import fr.lteconsulting.pomexplorer.webserver.MessageFactory;
import fr.lteconsulting.pomexplorer.webserver.WebServer;
import fr.lteconsulting.pomexplorer.webserver.XWebServer;
import org.reflections.Reflections;
import org.reflections.scanners.ResourcesScanner;
import org.reflections.scanners.TypeAnnotationsScanner;
import org.reflections.util.ClasspathHelper;
import org.reflections.util.ConfigurationBuilder;
import sun.reflect.Reflection;

public class AppFactory
{
	private static final AppFactory INSTANCE = new AppFactory();

	private AppFactory()
	{
	}

	public static AppFactory get()
	{
		return INSTANCE;
	}

	private final List<WorkingSession> sessions = new ArrayList<>();

	private Commands commands;

	private ApplicationSettings settings;

	private WebServer webServer;

	public List<WorkingSession> sessions()
	{
		return sessions;
	}

	public Commands commands() {
		if( commands == null )
		{
			commands = new Commands();

			final Reflections reflections = new Reflections(new ConfigurationBuilder()
																	.addUrls(ClasspathHelper.forJavaClassPath()));
			final Set<Class<?>> commandClasses = reflections.getTypesAnnotatedWith(Command.class);
{'fraction_non_alphanumeric': 0.09219126246990024, 'fraction_numerical': 0.0, 'mean_word_length': 5.669724770642202, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2654920', 'n_tokens_mistral': 951, 'n_tokens_neox': 900, 'n_words': 189}