<commit_before>package io.mangoo.enums;

import java.util.Collections;
import java.util.Locale;
import java.util.Map;

import com.google.common.collect.Maps;

/**
 *
 * @author svenkubiak
 *
 */
public enum Binding {
    AUTHENTICATION("io.mangoo.routing.bindings.Authentication"),
    BODY("io.mangoo.routing.bindings.Body"),
    DOUBLE("java.lang.Double"),
    DOUBLE_PRIMITIVE("double"),    
    FLASH("io.mangoo.routing.bindings.Flash"),
    FLOAT("java.lang.Float"),
    FLOAT_PRIMITIVE("float"),
    FORM("io.mangoo.routing.bindings.Form"),
    INT_PRIMITIVE("int"),
    INTEGER("java.lang.Integer"),
    LOCALDATE("java.time.LocalDate"),
    LOCALDATETIME("java.time.LocalDateTime"),
    LONG("java.lang.Long"),
    LONG_PRIMITIVE("long"),
    OPTIONAL("java.util.Optional"),
    REQUEST("io.mangoo.routing.bindings.Request"),
    SESSION("io.mangoo.routing.bindings.Session"),
    STRING("java.lang.String"),
    UNDEFINED("undefined");

    private final String value;
    private static Map<String, Binding> values;
    
    public static Binding fromString(String value) {
        return values.get(value.toLowerCase(Locale.ENGLISH));
    }
    
    static {
        Map<String, Binding> bindings = Maps.newHashMapWithExpectedSize(Binding.values().length);
        for (Binding binding : Binding.values()) {
            bindings.put(binding.toString().toLowerCase(Locale.ENGLISH), binding);
        }
        
        values = Collections.unmodifiableMap(bindings);
    }
    
    Binding (String value) {
        this.value = value;
    }
    
    @Override
    public String toString() {
        return this.value;
    }
}<commit_msg>Sonar refactorings<commit_after>package io.mangoo.enums;

import java.util.Collections;
import java.util.Locale;
import java.util.Map;

import com.google.common.collect.Maps;

/**
 *
 * @author svenkubiak
 *
 */
public enum Binding {
    AUTHENTICATION("io.mangoo.routing.bindings.Authentication"),
    BODY("io.mangoo.routing.bindings.Body"),
    DOUBLE("java.lang.Double"),
    DOUBLE_PRIMITIVE("double"),    
    FLASH("io.mangoo.routing.bindings.Flash"),
    FLOAT("java.lang.Float"),
    FLOAT_PRIMITIVE("float"),
    FORM("io.mangoo.routing.bindings.Form"),
    INT_PRIMITIVE("int"),
    INTEGER("java.lang.Integer"),
    LOCALDATE("java.time.LocalDate"),
    LOCALDATETIME("java.time.LocalDateTime"),
    LONG("java.lang.Long"),
    LONG_PRIMITIVE("long"),
    OPTIONAL("java.util.Optional"),
    REQUEST("io.mangoo.routing.bindings.Request"),
    SESSION("io.mangoo.routing.bindings.Session"),
    STRING("java.lang.String"),
    UNDEFINED("undefined");

    private final String value;
    private static Map<String, Binding> values;
    
    Binding (String value) {
        this.value = value;
    }
    
    public static Binding fromString(String value) {
        return values.get(value.toLowerCase(Locale.ENGLISH));
    }
    
    static {
        Map<String, Binding> bindings = Maps.newHashMapWithExpectedSize(Binding.values().length);
        for (Binding binding : Binding.values()) {
            bindings.put(binding.toString().toLowerCase(Locale.ENGLISH), binding);
        }
        
        values = Collections.unmodifiableMap(bindings);
    }
    
    @Override
    public String toString() {
        return this.value;
    }
}
{'fraction_non_alphanumeric': 0.14307365868444982, 'fraction_numerical': 0.0, 'mean_word_length': 3.2091836734693877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1689550', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1057, 'n_words': 149}