<commit_before>package com.github.joschi.jadconfig;

import com.github.joschi.jadconfig.converters.*;

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

/**
 * {@link ConverterFactory} for holding the default {@link Converter} classes.
 *
 * Supported {@link Converter} types are:
 * <ul>
 *     <li>{@link String} through {@link StringConverter}</li>
 *     <li>{@link Byte} and {@literal byte} through {@link ByteConverter}</li>
 *     <li>{@link Short} and {@literal short} through {@link ByteConverter}</li>
 *     <li>{@link Integer} and {@literal int} through {@link ByteConverter}</li>
 *     <li>{@link Long} and {@literal long} through {@link ByteConverter}</li>
 *     <li>{@link Boolean} and {@literal boolean} through {@link ByteConverter}</li>
 *     <li>{@link Float} and {@literal float} through {@link ByteConverter}</li>
 *     <li>{@link Double} and {@literal double} through {@link ByteConverter}</li>
 *     <li>{@link URI} through {@link URIConverter}</li>
 *     <li>{@link File} through {@link FileConverter}</li>
 * </ul>
 *
 * @author jschalanda
 */
public class DefaultConverterFactory implements ConverterFactory {

    private static Map<Class, Class<? extends Converter<?>>> defaultConverters;

    static {
        defaultConverters = new HashMap<Class, Class<? extends Converter<?>>>();
        defaultConverters.put(String.class, StringConverter.class);
        defaultConverters.put(Byte.class, ByteConverter.class);
        defaultConverters.put(byte.class, ByteConverter.class);
        defaultConverters.put(Short.class, ShortConverter.class);
        defaultConverters.put(short.class, ShortConverter.class);
        defaultConverters.put(Integer.class, IntegerConverter.class);
        defaultConverters.put(int.class, IntegerConverter.class);
        defaultConverters.put(Long.class, LongConverter.class);
        defaultConverters.put(long.class, LongConverter.class);
        defaultConverters.put(Boolean.class, BooleanConverter.class);
        defaultConverters.put(boolean.class, BooleanConverter.class);
        defaultConverters.put(Float.class, FloatConverter.class);
        defaultConverters.put(float.class, FloatConverter.class);
        defaultConverters.put(Double.class, DoubleConverter.class);
        defaultConverters.put(double.class, DoubleConverter.class);
        defaultConverters.put(URI.class, URIConverter.class);
        defaultConverters.put(File.class, FileConverter.class);
    }

    /**
     * Finds and returns a {@link Converter} for the provided {@literal classType}.
     *
     * @param classType The class type for which to find and return a {@link Converter}
     * @return A {@link Converter} for the requested class type
     */
    public Class<? extends Converter<?>> getConverter(Class classType) {
        return defaultConverters.get(classType);
    }
}

<commit_msg>Converted defaultConverters class variable to constant<commit_after>package com.github.joschi.jadconfig;

import com.github.joschi.jadconfig.converters.*;

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

/**
 * {@link ConverterFactory} for holding the default {@link Converter} classes.
 *
 * Supported {@link Converter} types are:
 * <ul>
 *     <li>{@link String} through {@link StringConverter}</li>
 *     <li>{@link Byte} and {@literal byte} through {@link ByteConverter}</li>
 *     <li>{@link Short} and {@literal short} through {@link ByteConverter}</li>
 *     <li>{@link Integer} and {@literal int} through {@link ByteConverter}</li>
 *     <li>{@link Long} and {@literal long} through {@link ByteConverter}</li>
 *     <li>{@link Boolean} and {@literal boolean} through {@link ByteConverter}</li>
 *     <li>{@link Float} and {@literal float} through {@link ByteConverter}</li>
 *     <li>{@link Double} and {@literal double} through {@link ByteConverter}</li>
 *     <li>{@link URI} through {@link URIConverter}</li>
 *     <li>{@link File} through {@link FileConverter}</li>
 * </ul>
 *
 * @author jschalanda
 */
public class DefaultConverterFactory implements ConverterFactory {

    private static final Map<Class, Class<? extends Converter<?>>> DEFAULT_CONVERTERS;

    static {
        DEFAULT_CONVERTERS = new HashMap<Class, Class<? extends Converter<?>>>();
        DEFAULT_CONVERTERS.put(String.class, StringConverter.class);
        DEFAULT_CONVERTERS.put(Byte.class, ByteConverter.class);
        DEFAULT_CONVERTERS.put(byte.class, ByteConverter.class);
        DEFAULT_CONVERTERS.put(Short.class, ShortConverter.class);
        DEFAULT_CONVERTERS.put(short.class, ShortConverter.class);
        DEFAULT_CONVERTERS.put(Integer.class, IntegerConverter.class);
        DEFAULT_CONVERTERS.put(int.class, IntegerConverter.class);
        DEFAULT_CONVERTERS.put(Long.class, LongConverter.class);
        DEFAULT_CONVERTERS.put(long.class, LongConverter.class);
        DEFAULT_CONVERTERS.put(Boolean.class, BooleanConverter.class);
        DEFAULT_CONVERTERS.put(boolean.class, BooleanConverter.class);
        DEFAULT_CONVERTERS.put(Float.class, FloatConverter.class);
        DEFAULT_CONVERTERS.put(float.class, FloatConverter.class);
        DEFAULT_CONVERTERS.put(Double.class, DoubleConverter.class);
        DEFAULT_CONVERTERS.put(double.class, DoubleConverter.class);
        DEFAULT_CONVERTERS.put(URI.class, URIConverter.class);
        DEFAULT_CONVERTERS.put(File.class, FileConverter.class);
    }

    /**
     * Finds and returns a {@link Converter} for the provided {@literal classType}.
     *
     * @param classType The class type for which to find and return a {@link Converter}
     * @return A {@link Converter} for the requested class type
     */
    public Class<? extends Converter<?>> getConverter(Class classType) {
        return DEFAULT_CONVERTERS.get(classType);
    }
}


{'fraction_non_alphanumeric': 0.12980358667805295, 'fraction_numerical': 0.0, 'mean_word_length': 4.026609442060086, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '6721748', 'n_tokens_mistral': 1665, 'n_tokens_neox': 1679, 'n_words': 398}