<commit_before>package io.github.benas.randombeans.util;

import java.lang.reflect.Array;
import java.util.*;

/**
 * Utility methods on collections.
 *
 * @author <NAME> (<EMAIL>)
 */
public class CollectionUtils {

    public static Object emptyArray(final Class type) {
        return Array.newInstance(type.getComponentType(), 0);
    }

    public static Object emptyCollection(final Class type) {
        Object collection = null;
        if (List.class.isAssignableFrom(type)) {
            collection = Collections.emptyList();
        } else if (NavigableSet.class.isAssignableFrom(type)) {
            collection = new TreeSet();
        } else if (SortedSet.class.isAssignableFrom(type)) {
            collection = new TreeSet();
        } else if (Set.class.isAssignableFrom(type)) {
            collection = Collections.emptySet();
        } else if (Deque.class.isAssignableFrom(type)) {
            collection = new ArrayDeque();
        } else if (Queue.class.isAssignableFrom(type)) {
            collection = new ArrayDeque();
        } else if (NavigableMap.class.isAssignableFrom(type)) {
            collection = new TreeMap();
        } else if (SortedMap.class.isAssignableFrom(type)) {
            collection = new TreeMap();
        } else if (Map.class.isAssignableFrom(type)) {
            collection = Collections.emptyMap();
        } else if (Collection.class.isAssignableFrom(type)) {
            collection = Collections.emptyList();
        }<commit_msg>make utility class abstract<commit_after>package io.github.benas.randombeans.util;

import java.lang.reflect.Array;
import java.util.*;

/**
 * Utility methods on collections.
 *
 * @author <NAME> (<EMAIL>)
 */
public abstract class CollectionUtils {

    public static Object emptyArray(final Class type) {
        return Array.newInstance(type.getComponentType(), 0);
    }

    public static Object emptyCollection(final Class type) {
        Object collection = null;
        if (List.class.isAssignableFrom(type)) {
            collection = Collections.emptyList();
        } else if (NavigableSet.class.isAssignableFrom(type)) {
            collection = new TreeSet();
        } else if (SortedSet.class.isAssignableFrom(type)) {
            collection = new TreeSet();
        } else if (Set.class.isAssignableFrom(type)) {
            collection = Collections.emptySet();
        } else if (Deque.class.isAssignableFrom(type)) {
            collection = new ArrayDeque();
        } else if (Queue.class.isAssignableFrom(type)) {
            collection = new ArrayDeque();
        } else if (NavigableMap.class.isAssignableFrom(type)) {
            collection = new TreeMap();
        } else if (SortedMap.class.isAssignableFrom(type)) {
            collection = new TreeMap();
        } else if (Map.class.isAssignableFrom(type)) {
            collection = Collections.emptyMap();
        } else if (Collection.class.isAssignableFrom(type)) {
            collection = Collections.emptyList();
        }
{'fraction_non_alphanumeric': 0.11611611611611612, 'fraction_numerical': 0.000667334000667334, 'mean_word_length': 2.633939393939394, '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': '4444847', 'n_tokens_mistral': 819, 'n_tokens_neox': 801, 'n_words': 182}