<commit_before>package com.matthewtamlin.spyglass.library.supplier;

public class SupplierInstantiator {
	@SuppressWarnings("TryWithIdenticalCatches") // Can't be collapsed before API 19
	public static <T> Supplier<T> instantiateSupplier(final Class<? extends Supplier<T>> clazz) {
		try {
			return clazz.newInstance();

		} catch (final InstantiationException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);

		} catch (final IllegalAccessException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);
		}
	}

	@SuppressWarnings("TryWithIdenticalCatches") // Can't be collapsed before API 19
	public static Supplier<?> instantiateWildcardSupplier(
			final Class<? extends Supplier<?>> clazz) {

		try {
			return clazz.newInstance();

		} catch (final InstantiationException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);

		} catch (final IllegalAccessException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);<commit_msg>Moved warning suppression to class level<commit_after>package com.matthewtamlin.spyglass.library.supplier;

@SuppressWarnings("TryWithIdenticalCatches") // Can't be collapsed before API 19
public class SupplierInstantiator {
	public static <T> Supplier<T> instantiateSupplier(final Class<? extends Supplier<T>> clazz) {
		try {
			return clazz.newInstance();

		} catch (final InstantiationException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);

		} catch (final IllegalAccessException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);
		}
	}

	public static Supplier<?> instantiateWildcardSupplier(
			final Class<? extends Supplier<?>> clazz) {

		try {
			return clazz.newInstance();

		} catch (final InstantiationException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);

		} catch (final IllegalAccessException e) {
			final String message = "Unable to instantiate supplier of type %1$s. Is it a concrete" +
					" class with a public no-arg constructor?";

			throw new SupplierInstantiationException(String.format(message, clazz), e);
{'fraction_non_alphanumeric': 0.09532710280373832, 'fraction_numerical': 0.004361370716510903, 'mean_word_length': 4.555363321799308, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '987691', 'n_tokens_mistral': 1039, 'n_tokens_neox': 904, 'n_words': 315}