<commit_before>package lt.msemys.esjc.util;

public class Preconditions {

    public static <T> T checkNotNull(T reference, String errorMessage) {
        if (reference == null) {
            throw new NullPointerException(errorMessage);
        }
        return reference;
    }

    public static void checkArgument(boolean expression, String errorMessage) {
        if (!expression) {
            throw new IllegalArgumentException(errorMessage);
        }
    }

}<commit_msg>added: 'checkState' method + formatted error message support to 'checkNotNull' and  'checkArgument' methods<commit_after>package lt.msemys.esjc.util;

public class Preconditions {

    public static <T> T checkNotNull(T reference, String errorMessage) {
        if (reference == null) {
            throw new NullPointerException(errorMessage);
        }
        return reference;
    }

    public static <T> T checkNotNull(T reference, String errorMessage, Object... errorMessageArgs) {
        return checkNotNull(reference, String.format(errorMessage, errorMessageArgs));
    }

    public static void checkArgument(boolean expression, String errorMessage) {
        if (!expression) {
            throw new IllegalArgumentException(errorMessage);
        }
    }

    public static void checkArgument(boolean expression, String errorMessage, Object... errorMessageArgs) {
        checkArgument(expression, String.format(errorMessage, errorMessageArgs));
    }

    public static void checkState(boolean expression, String errorMessage) {
        if (!expression) {
            throw new IllegalStateException(errorMessage);
        }
    }

    public static void checkState(boolean expression, String errorMessage, Object... errorMessageArgs) {
        checkState(expression, String.format(errorMessage, errorMessageArgs));
    }

}
{'fraction_non_alphanumeric': 0.08356239692138538, 'fraction_numerical': 0.0, 'mean_word_length': 3.193548387096774, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '2270126', 'n_tokens_mistral': 448, 'n_tokens_neox': 433, 'n_words': 127}