<commit_before>package consulting.cochez.accounting.expense.csv;

import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer;
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.ParsePosition;
import java.util.Locale;

import static org.apache.commons.lang3.StringUtils.*;

public class IntegerDeserializer extends FromStringDeserializer<Integer> {
    public IntegerDeserializer() {
        super(Integer.class);
    }

    @Override
    protected Integer _deserialize(String value, DeserializationContext ctxt) throws IOException {
        String cleanedInt = trim(value).replace("%", "").replace("-", "");

        if (isBlank(cleanedInt)) {
            return null;
        }

        return Integer.parseInt(cleanedInt);
    }
}
<commit_msg>quick hack<commit_after>package consulting.cochez.accounting.expense.csv;

import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer;
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.ParsePosition;
import java.util.Locale;

import static org.apache.commons.lang3.StringUtils.*;

public class IntegerDeserializer extends FromStringDeserializer<Integer> {
    public IntegerDeserializer() {
        super(Integer.class);
    }

    @Override
    protected Integer _deserialize(String value, DeserializationContext ctxt) throws IOException {
        String cleanedInt = trim(value).replace("%", "").replace("-", "").replace("0,00", "0");

        if (isBlank(cleanedInt)) {
            return null;
        }

        return Integer.parseInt(cleanedInt);
    }
}

{'fraction_non_alphanumeric': 0.10989583333333333, 'fraction_numerical': 0.004166666666666667, 'mean_word_length': 4.306629834254144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5047926', 'n_tokens_mistral': 563, 'n_tokens_neox': 540, 'n_words': 103}