<commit_before>public class Program {
	public static void main(String[] args) {
		int[] sorted = { 1, 2, 4, 6, 9, 9 };

		int[] array = { 9, 6, 2, 9, 1, 4 };
		int[] mergedArray = mergeSort(array);

		for (int i = 0; i < mergedArray.length; i++) {
			assert mergedArray[i] == sorted[i];
		}

		System.out.println("Tests passed");
	}

	public static int[] mergeSort(int[] array) {
	    if (array.length <= 1)
	        return array;

	    int middle = array.length / 2;
	    int[] left = new int[middle];
	    int[] right = new int[middle + array.length % 2];

	    for (int i = 0; i < left.length; i++) {
	    	left[i] = array[i];
	    }
	    for (int i = 0; i < right.length; i++) {
	    	right[i] = array[i + left.length];
	    }

	    left = mergeSort(left);
	    right = mergeSort(right);

	    return merge(left, right);
	}

	public static int[] merge(int[] left, int[] right) {
		int[] result = new int[left.length + right.length];
		int leftIndex = 0;
		int rightIndex = 0;
		int resultIndex = 0;
	    while (leftIndex < left.length || rightIndex < right.length) {
	        if (leftIndex < left.length && rightIndex < right.length) {
	            if (left[leftIndex] <= right[rightIndex]) {
	            	result[resultIndex++] = left[leftIndex++];
	            } else {
	            	result[resultIndex++] = right[rightIndex++];
	            }
	        } else if (leftIndex < left.length) {
	        	result[resultIndex++] = left[leftIndex++];
	        } else if (rightIndex < right.length) {
	        	result[resultIndex++] = right[rightIndex++];
	        }
		}
	    return result;
	}
}
<commit_msg>Remove unnecessary modulo<commit_after>public class Program {
	public static void main(String[] args) {
		int[] sorted = { 1, 2, 4, 6, 9, 9 };

		int[] array = { 9, 6, 2, 9, 1, 4 };
		int[] mergedArray = mergeSort(array);

		for (int i = 0; i < mergedArray.length; i++) {
			assert mergedArray[i] == sorted[i];
		}

		System.out.println("Tests passed");
	}

	public static int[] mergeSort(int[] array) {
	    if (array.length <= 1)
	        return array;

	    int middle = array.length / 2;
	    int[] left = new int[middle];
	    int[] right = new int[array.length - middle];

	    for (int i = 0; i < left.length; i++) {
	    	left[i] = array[i];
	    }
	    for (int i = 0; i < right.length; i++) {
	    	right[i] = array[i + left.length];
	    }

	    left = mergeSort(left);
	    right = mergeSort(right);

	    return merge(left, right);
	}

	public static int[] merge(int[] left, int[] right) {
		int[] result = new int[left.length + right.length];
		int leftIndex = 0;
		int rightIndex = 0;
		int resultIndex = 0;
	    while (leftIndex < left.length || rightIndex < right.length) {
	        if (leftIndex < left.length && rightIndex < right.length) {
	            if (left[leftIndex] <= right[rightIndex]) {
	            	result[resultIndex++] = left[leftIndex++];
	            } else {
	            	result[resultIndex++] = right[rightIndex++];
	            }
	        } else if (leftIndex < left.length) {
	        	result[resultIndex++] = left[leftIndex++];
	        } else if (rightIndex < right.length) {
	        	result[resultIndex++] = right[rightIndex++];
	        }
		}
	    return result;
	}
}

{'fraction_non_alphanumeric': 0.15869565217391304, 'fraction_numerical': 0.012732919254658385, 'mean_word_length': 2.355208333333333, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 3, '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': '4217518', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1032, 'n_words': 285}