<commit_before>package me.exec;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * An entry executable classes dispatcher.
 * 
 * Run as: mvn exec:java -Dexec.mainClass="me.exec.Dispatcher" -Dexec.args="entry path/to/config.properties"
 * Run as: java -jar pandora-box.jar entry configs/file.properties
 *
 * @author <NAME>
 */
public class Dispatcher {

    // Eecutable entries map
    private static final Map<String, Class<?>> entries;

    static {
        // Setting up entries
        entries = new HashMap<String, Class<?>>();

        entries.put("extract", Extractor.class);
        entries.put("sample", Sampler.class);
        entries.put("cluster", Clusterer.class);
        entries.put("build", Builder.class);
        entries.put("project", Projector.class);
        entries.put("reduce", Reducer.class);
    }

    public static void main(String[] args) throws Exception {
        if (args.length == 2) {
            final Class<?> entry = entries.get(args[0]);

            if (entry != null) {
                // Run the choosen entry given the rest of the arguments
                final Object arguments = Arrays.copyOfRange(args, 1, args.length);

                // Making sure all entries implement a main static method
                entry.getMethod("main", String[].class).invoke(null, arguments);
            } else {
                System.out.println("Unable to run, entry '" + args[0] + "' not found");
                System.out.println("Please run available entries as: ");

                for (String key : entries.keySet()) {
                    System.out.println(" java -jar pandora-box.jar " + key + " configs/file");
                }

                System.exit(1);
            }
        } else {
            System.out.println("Unable to run, no or too many arguments found");
            System.out.println("Please run available entries as: ");

            for (String key : entries.keySet()) {
                System.out.println(" java -jar pandora-box.jar " + key + " configs/file");
            }

            System.exit(1);
        }
    }
}<commit_msg>Working on minor documentations and error handling within the dispatcher.<commit_after>package me.exec;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * An entry executable classes dispatcher.
 *
 * Run as: mvn exec:java -Dexec.mainClass="me.exec.Dispatcher" -Dexec.args="entry path/to/config.properties"
 * Run as: java -jar pandora-box.jar entry configs/file.properties
 *
 * @author <NAME>
 */
public class Dispatcher {

    // Eecutable entries map
    private static final Map<String, Class<?>> entries;

    static {
        // Setting up entries
        entries = new HashMap<String, Class<?>>();

        entries.put("extract", Extractor.class);
        entries.put("sample", Sampler.class);
        entries.put("cluster", Clusterer.class);
        entries.put("build", Builder.class);
        entries.put("project", Projector.class);
        entries.put("reduce", Reducer.class);
    }

    public static void main(String[] args) throws Exception {
        if (args.length == 1 && args[0].equalsIgnoreCase("help")) {
            System.out.println("Pandora Box Help");
            System.out.println("Please run available entries as: ");

            for (String key : entries.keySet()) {
                System.out.println(" java -jar pandora-box.jar '" + key + "' 'configs/file'");
            }

            System.exit(1);
        } else if (args.length == 2) {
            final Class<?> entry = entries.get(args[0]);

            if (entry != null) {
                // Run the choosen entry given the rest of the arguments
                final Object arguments = Arrays.copyOfRange(args, 1, args.length);

                // Making sure all entries implement a main static method
                entry.getMethod("main", String[].class).invoke(null, arguments);
            } else {
                System.out.println("Unable to run, entry '" + args[0] + "' not found");
                System.out.println("Please run help as: ");
                System.out.println(" java -jar pandora-box.jar help");

                System.exit(1);
            }
        } else {
            System.out.println("Unable to run, no or too many arguments found");
            System.out.println("Please run help as: ");
            System.out.println(" java -jar pandora-box.jar help");

            System.exit(1);
        }
    }
}
{'fraction_non_alphanumeric': 0.1318363717207648, 'fraction_numerical': 0.003334815473543797, 'mean_word_length': 2.0984848484848486, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5092454', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1205, 'n_words': 333}