<commit_before>package adf.launcher;

import adf.launcher.option.*;
import rescuecore2.config.Config;
import rescuecore2.config.ConfigException;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class ConfigInitializer {

    public static final File DEFAULT_PATH = new File(System.getProperty("user.dir"), "config");
    
    public static Config getConfig(String... args) {
        Config commandLine = analysis(args);
        try {
            if(DEFAULT_PATH.exists()) {
                Config config = new Config(DEFAULT_PATH);
                config.merge(commandLine);
                return config;
            }
        }
        catch (ConfigException e) {
            e.printStackTrace();
        }
        return commandLine;
    }
    
    public static Config analysis(String... args) {
		if(args.length > 0) {
            Config config = new Config();
            //set load target
            config.setValue(ConfigKey.KEY_LOADER_CLASS, args[0]);
            //set option
            Map<String, Option> options = initOption();
            for (int i = 1; i < args.length; i++) {
                String[] strArray = args[i].split(":");
                Option option = options.get(strArray[0]);
                if (option != null) {
                    option.setValue(config, strArray);
                }
            }
            return config;
        }
        else {
            throw new ArrayIndexOutOfBoundsException("input Loader Class!!");
        }
    }
    
    private static Map<String, Option> initOption() {
		Map<String, Option> options = new HashMap<>();
		registerOption(options, new OptionServer());
		registerOption(options, new OptionHost());
		registerOption(options, new OptionPrecompute());
        registerOption(options, new OptionModuleConfig());
		registerOption(options, new OptionTeam());
		registerOption(options, new OptionAmbulanceTeam());
		registerOption(options, new OptionFireBrigade());
		registerOption(options, new OptionPoliceForce());
		registerOption(options, new OptionAmbulanceCentre());
		registerOption(options, new OptionFireStation());
		registerOption(options, new OptionPoliceOffice());
		return options;
	}
<commit_msg>Update ConfigInitializer.java<commit_after>package adf.launcher;

import adf.launcher.option.*;
import rescuecore2.config.Config;
import rescuecore2.config.ConfigException;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class ConfigInitializer {

    public static final File DEFAULT_PATH = new File(System.getProperty("user.dir"), "config");
    
    public static Config getConfig(String... args) {
        Config commandLine = analysis(args);
        try {
            if(DEFAULT_PATH.exists()) {
                Config config = new Config(DEFAULT_PATH);
                config.merge(commandLine);
                return config;
            }
        }
        catch (ConfigException e) {
            e.printStackTrace();
        }
        return commandLine;
    }
    
    public static Config analysis(String... args) {
		if(args.length > 0) {
            Config config = new Config();
            //set load target
            config.setValue(ConfigKey.KEY_LOADER_CLASS, args[0]);
            //set option
            Map<String, Option> options = initOption();
            for (int i = 1; i < args.length; i++) {
                String[] strArray = args[i].split(":");
                Option option = options.get(strArray[0]);
                if (option != null) {
                    option.setValue(config, strArray);
                }
            }
            return config;
        }
        else {
            throw new ArrayIndexOutOfBoundsException("input Loader Class!!");
        }
    }
    
    private static Map<String, Option> initOption() {
		Map<String, Option> options = new HashMap<>();
		registerOption(options, new OptionServer());
		registerOption(options, new OptionHost());
		registerOption(options, new OptionPrecompute());
		registerOption(options, new OptionModuleConfig());
		registerOption(options, new OptionDebug());
		registerOption(options, new OptionTeam());
		registerOption(options, new OptionAmbulanceTeam());
		registerOption(options, new OptionFireBrigade());
		registerOption(options, new OptionPoliceForce());
		registerOption(options, new OptionAmbulanceCentre());
		registerOption(options, new OptionFireStation());
		registerOption(options, new OptionPoliceOffice());
		return options;
	}

{'fraction_non_alphanumeric': 0.11163101604278075, 'fraction_numerical': 0.00267379679144385, 'mean_word_length': 2.523547880690738, 'pattern_counts': {'":': 2, '<': 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': '3101214', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1144, 'n_words': 286}