<commit_before>package florian_haas.lucas.util.converter;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.ConverterException;

import florian_haas.lucas.util.*;

public abstract class EnumConverter<E extends Enum<E>> extends javax.faces.convert.EnumConverter {

	public static final String MESSAGE_PREFIX = "lucas.application.";
	public static final String MESSAGE_NULL_KEY = "NULL";

	protected final Class<E> enumClass;
	protected final String messageName;

	// Better solution?
	protected EnumConverter() {
		super(Utils.getClassFromArgs(EnumConverter.class));
		this.enumClass = Utils.getClassFromArgs(EnumConverter.class);
		String enumClassName = this.enumClass.getSimpleName();
		char firstChar = enumClassName.charAt(0);
		this.messageName = this.enumClass.getSimpleName().replace(firstChar, Character.toLowerCase(firstChar));
	}

	@Override<commit_msg>Fixed crash<commit_after>package florian_haas.lucas.util.converter;

import java.lang.reflect.Field;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.ConverterException;

import florian_haas.lucas.util.*;

public abstract class EnumConverter<E extends Enum<E>> extends javax.faces.convert.EnumConverter {

	public static final String MESSAGE_PREFIX = "lucas.application.";
	public static final String MESSAGE_NULL_KEY = "NULL";

	protected final Class<E> enumClass;
	protected final String messageName;

	// Better solution?
	protected EnumConverter() throws Exception {
		this.enumClass = Utils.getClassFromArgs(this.getClass());
		try {
			Field targetClass = javax.faces.convert.EnumConverter.class.getDeclaredField("targetClass");
			targetClass.setAccessible(true);
			targetClass.set(this, enumClass);
		}
		catch (Exception e) {
			throw e;
		}
		String enumClassName = this.enumClass.getSimpleName();
		char firstChar = enumClassName.charAt(0);
		this.messageName = this.enumClass.getSimpleName().replace(firstChar, Character.toLowerCase(firstChar));
	}

	@Override
{'fraction_non_alphanumeric': 0.10296260320543954, 'fraction_numerical': 0.0009713453132588635, 'mean_word_length': 5.936026936026936, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7249914', 'n_tokens_mistral': 631, 'n_tokens_neox': 601, 'n_words': 125}