<commit_before>package me.shkschneider.skeleton.helper;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

// <https://github.com/orhanobut/rootchecker/blob/master/rootchecker/src/main/java/com/orhanobut/rootchecker/RootChecker.java>
public class RootHelper {

    @Deprecated
    public static boolean rooted() {
        final List<String> paths = new ArrayList<String>() {
            {
                add("/data/local/bin/su");
                add("/data/local/su");
                add("/data/local/xbin/su");
                add("/sbin/su");
                add("/system/bin/failsafe/su");
                add("/system/bin/su");
                add("/system/sd/xbin/su");
                add("/system/xbin/su");
            }
        };
        for (final String path : paths) {
            final File file = new File(path);
            if (file.exists() && file.isFile() && file.canExecute()) {
                return true;
            }
        }
        return false;
    }

    // TODO run()

}
<commit_msg>RootHelper.rooted()<commit_after>package me.shkschneider.skeleton.helper;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

// <https://github.com/orhanobut/rootchecker/blob/master/rootchecker/src/main/java/com/orhanobut/rootchecker/RootChecker.java>
public class RootHelper {

    private static String binary() {
        final List<String> paths = new ArrayList<String>() {
            {
                add("/sbin");
                add("/system/bin");
                add("/system/xbin");
                add("/data/local/xbin");
                add("/data/local/bin");
                add("/system/sd/xbin");
                add("/system/bin/failsafe");
                add("/data/local");
            }
        };
        for (final String path : paths) {
            final File file = new File(path + SystemProperties.property(SystemProperties.SYSTEM_PROPERTY_FILE_SEPARATOR) + "su");
            if (file.exists() && file.isFile() && file.canExecute()) {
                return file.getAbsolutePath();
            }
        }
        return null;
    }

    public static boolean rooted() {
        return (binary() != null);
    }

    // Careful
    @Deprecated
    public static void run(final String commandLine) {
        // TODO
    }

}

{'fraction_non_alphanumeric': 0.1429188255613126, 'fraction_numerical': 0.0, 'mean_word_length': 1.7550535077288942, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '830154', 'n_tokens_mistral': 688, 'n_tokens_neox': 659, 'n_words': 115}