<commit_before>/*
 * *
 *    Copyright 2011 <NAME> & <NAME>
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 *
 */

package ch.eiafr.cojac;

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;

import ch.eiafr.cojac.models.ReactionType;

import java.util.EnumMap;
import java.util.Map;

public final class Args {
    private final Options options = Arg.createOptions();
    private final Map<Arg, ArgValue> values = new EnumMap<>(Arg.class);

    static final String DEFAULT_LOG_FILE_NAME = "COJAC_Report.log";
    static final String DEFAULT_JMX_HOST = "localhost";
    static final String DEFAULT_JMX_PORT = "5217";
    static final String DEFAULT_JMX_NAME = "COJAC";
    static final String DEFAULT_STABILITY_THRESHOLD = "0.0001";

    private static String USAGE =
             "java -javaagent:cojac.jar=\"[OPTIONS]\" YourApp [appArgs]\n"
           + "(version 1.4 - 2015 Sep 22)";
    private static String HEADER =
            "\nTwo nice tools to enrich Java arithmetic capabilities, on-the-fly:"
            +"\n - Numerical Problem Sniffer: detects and signals arithmetic poisons like "
            +"integer overflows, smearing and catastrophic cancellation, NaN or infinite results."
            +"\n - Enriching Wrapper for float/double: wraps every double/float in richer objects. Current "
            +"models include BigDecimal (you choose the precision), "
            +"interval computation, discrete stochastic arithmetic, and even automatic differentiation."
            +"\n----------------- OPTIONS -----------------\n";
    private static String FOOTER =
            "\n------> https://github.com/frederic-bapst/Cojac <------";

    public Args() {
        super();

        for (Arg arg : Arg.values()) {
            values.put(arg, new ArgValue(false, ""));<commit_msg>date in -help<commit_after>/*
 * *
 *    Copyright 2011 <NAME> & <NAME>
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 *
 */

package ch.eiafr.cojac;

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;

import ch.eiafr.cojac.models.ReactionType;

import java.util.EnumMap;
import java.util.Map;

public final class Args {
    private final Options options = Arg.createOptions();
    private final Map<Arg, ArgValue> values = new EnumMap<>(Arg.class);

    static final String DEFAULT_LOG_FILE_NAME = "COJAC_Report.log";
    static final String DEFAULT_JMX_HOST = "localhost";
    static final String DEFAULT_JMX_PORT = "5217";
    static final String DEFAULT_JMX_NAME = "COJAC";
    static final String DEFAULT_STABILITY_THRESHOLD = "0.0001";

    private static String USAGE =
             "java -javaagent:cojac.jar=\"[OPTIONS]\" YourApp [appArgs]\n"
           + "(version 1.4 - 2015 Oct 21)";
    private static String HEADER =
            "\nTwo nice tools to enrich Java arithmetic capabilities, on-the-fly:"
            +"\n - Numerical Problem Sniffer: detects and signals arithmetic poisons like "
            +"integer overflows, smearing and catastrophic cancellation, NaN or infinite results."
            +"\n - Enriching Wrapper for float/double: wraps every double/float in richer objects. Current "
            +"models include BigDecimal (you choose the precision), "
            +"interval computation, discrete stochastic arithmetic, and even automatic differentiation."
            +"\n----------------- OPTIONS -----------------\n";
    private static String FOOTER =
            "\n------> https://github.com/frederic-bapst/Cojac <------";

    public Args() {
        super();

        for (Arg arg : Arg.values()) {
            values.put(arg, new ArgValue(false, ""));
{'fraction_non_alphanumeric': 0.11362725450901803, 'fraction_numerical': 0.01002004008016032, 'mean_word_length': 2.8274539877300615, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5549169', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1339, 'n_words': 472}