<commit_before>package com.home;

import java.util.concurrent.ThreadLocalRandom;

public class Utils {
    public static int getKthSmallest(int[] array, int k) {
        if (array == null || k >= array.length) {
            return Integer.MAX_VALUE;
        }

        int result = quickSelect(array, 0, array.length - 1, k);

        if (result == Integer.MAX_VALUE) {
            return array[k - 1];
        }

        return result;
    }

    private static int quickSelect(int[] array, int l, int h, int k) {
        if (l >= h) {
            return Integer.MAX_VALUE;
        }
<commit_msg>Rotate left bits<commit_after>package com.home;

import java.util.concurrent.ThreadLocalRandom;

public class Utils {
    public static void main(String[] args) {
        System.out.println(rotateBitsRight(32, 8, 4));
    }

    public static int rotateBitsLeft(final int bits, int n, int times) {
        return (n << times) | (n >> (bits - times));
    }

    public static int rotateBitsRight(final int bits, int n, int times) {
        return (n >> times) | (n << (bits - times));
    }

    public static int sumBitDifferences(int[] array) {
        int result = 0;

        for (int i = 0; i < 32; i++) {
            int count = 0;
            for (int j = 0; j < array.length; j++) {
                if ((array[j] & (1 << i)) > 0) {
                    count++;
                }
            }
            result += (count * (array.length - count) * 2);
        }

        return result;
    }

    public static int getKthSmallest(int[] array, int k) {
        if (array == null || k >= array.length) {
            return Integer.MAX_VALUE;
        }

        int result = quickSelect(array, 0, array.length - 1, k);

        if (result == Integer.MAX_VALUE) {
            return array[k - 1];
        }

        return result;
    }

    private static int quickSelect(int[] array, int l, int h, int k) {
        if (l >= h) {
            return Integer.MAX_VALUE;
        }

{'fraction_non_alphanumeric': 0.12468450277637556, 'fraction_numerical': 0.009591115598182737, 'mean_word_length': 1.7720279720279721, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '2451738', 'n_tokens_mistral': 625, 'n_tokens_neox': 587, 'n_words': 184}