<commit_before>
package kr.jm.utils.datastructure;

import java.util.Arrays;
import java.util.Comparator;

import kr.jm.utils.helper.JMString;

/**
 * The Class JMArrays.
 */
public class JMArrays {

	/**
	 * Builds the array.
	 *
	 * @param <E>
	 *            the element type
	 * @param objects
	 *            the objects
	 * @return the e[]
	 */
	public static <E> E[]
			buildArray(@SuppressWarnings("unchecked") E... objects) {
		return objects;
	}

	/**
	 * Sort.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return the v[]
	 */
	public static <V extends Comparable<V>> V[] sort(V[] array) {
		Arrays.sort(array);
		return array;
	}

	/**
	 * Sort.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @param comparator
	 *            the comparator
	 * @return the v[]
	 */
	public static <V> V[] sort(V[] array, Comparator<? super V> comparator) {
		Arrays.sort(array, comparator);
		return array;
	}

	/**
	 * Gets the last.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return the last
	 */
	public static <V> V getLast(V[] array) {
		return JMArrays.isNullOrEmpty(array) ? null : array[array.length - 1];
	}

	/**
	 * Checks if is null or empty.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return true, if is null or empty
	 */
	public static <V> boolean isNullOrEmpty(V[] array) {
		return array == null || array.length == 0 ? true : false;
	}

	/**
	 * Checks if is not null or empty.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return true, if is not null or empty
	 */
	public static <V> boolean isNotNullOrEmpty(V[] array) {
		return !isNullOrEmpty(array);
	}

	/**
	 * Builds the array from csv.
	 *
	 * @param csvString
	 *            the csv string
	 * @return the string[]
	 */
	public static String[] buildArrayFromCsv(String csvString) {
		return csvString.split(JMString.COMMA);
	}

	/**
	 * Builds the array with delimeter.
	 *
	 * @param stringWithDelimeter
	 *            the string with delimeter
	 * @param delimeter
	 *            the delimeter
	 * @return the string[]
	 */
	public static String[] buildArrayWithDelimeter(String stringWithDelimeter,
			String delimeter) {
		return stringWithDelimeter.split(delimeter);
	}

}
<commit_msg>refactoring buildArrayWithDelimeter<commit_after>
package kr.jm.utils.datastructure;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

import kr.jm.utils.helper.JMString;

/**
 * The Class JMArrays.
 */
public class JMArrays {

	/**
	 * Builds the array.
	 *
	 * @param <E>
	 *            the element type
	 * @param objects
	 *            the objects
	 * @return the e[]
	 */
	public static <E> E[]
			buildArray(@SuppressWarnings("unchecked") E... objects) {
		return objects;
	}

	/**
	 * Sort.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return the v[]
	 */
	public static <V extends Comparable<V>> V[] sort(V[] array) {
		Arrays.sort(array);
		return array;
	}

	/**
	 * Sort.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @param comparator
	 *            the comparator
	 * @return the v[]
	 */
	public static <V> V[] sort(V[] array, Comparator<? super V> comparator) {
		Arrays.sort(array, comparator);
		return array;
	}

	/**
	 * Gets the last.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return the last
	 */
	public static <V> V getLast(V[] array) {
		return JMArrays.isNullOrEmpty(array) ? null : array[array.length - 1];
	}

	/**
	 * Checks if is null or empty.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return true, if is null or empty
	 */
	public static <V> boolean isNullOrEmpty(V[] array) {
		return array == null || array.length == 0 ? true : false;
	}

	/**
	 * Checks if is not null or empty.
	 *
	 * @param <V>
	 *            the value type
	 * @param array
	 *            the array
	 * @return true, if is not null or empty
	 */
	public static <V> boolean isNotNullOrEmpty(V[] array) {
		return !isNullOrEmpty(array);
	}

	/**
	 * Builds the array from csv.
	 *
	 * @param csvString
	 *            the csv string
	 * @return the string[]
	 */
	public static String[] buildArrayFromCsv(String csvString) {
		return csvString.split(JMString.COMMA);
	}

	/**
	 * Builds the array with delimeter.
	 *
	 * @param stringWithDelimeter
	 *            the string with delimeter
	 * @param delimeter
	 *            the delimeter
	 * @return the string[]
	 */
	public static String[] buildArrayWithDelimeter(String stringWithDelimeter,
			String delimeter) {
		List<String> stringList = JMCollections
				.buildListWithDelimeter(stringWithDelimeter, delimeter);
		return stringList.toArray(new String[stringList.size()]);
	}

}

{'fraction_non_alphanumeric': 0.12462432378280906, 'fraction_numerical': 0.0008014425966740132, 'mean_word_length': 2.269155206286837, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, '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': '5522460', 'n_tokens_mistral': 1752, 'n_tokens_neox': 1557, 'n_words': 477}