<commit_before>package jp.gr.java_conf.neko_daisuki.nexec_x;

import jp.gr.java_conf.neko_daisuki.android.nexec.client.util.NexecClient;

public class SettingsBuilder {

    public static NexecClient.Settings build(String host, int port,
                                             String[] args, String homeDir,
                                             String tmpDir, int width,
                                             int height) {
        NexecClient.Settings settings = new NexecClient.Settings();
        settings.host = host;
        settings.port = port;
        settings.args = args;
        settings.addLink(homeDir, "/home/fsyscall");
        settings.addLink(tmpDir, "/tmp");
        settings.addEnvironment("DISPLAY",":0");

        // If you want to see debug output of dbus-launch, enable DBUS_VERBOSE.
        settings.addEnvironment("DBUS_VERBOSE","1");

        // If you want to use your own system dbus-daemon, give the path.
        /*
        settings.addEnvironment("DBUS_SYSTEM_BUS_ADDRESS",
                                "unix:path=/path/to/system_bus_socket");
                                */

        // For glib debugging
        settings.addEnvironment("G_DBUS_DEBUG","all");
        settings.addEnvironment("G_MAIN_POLL_DEBUG","1");

        settings.files = new String[] {
            String.format("%s/**", homeDir),
            tmpDir,
            String.format("%s/**", tmpDir)
        };
        settings.x = true;
        settings.xWidth = width;
        settings.xHeight = height;

        return settings;
    }
}<commit_msg>Enclosed the debugging code into one method.<commit_after>package jp.gr.java_conf.neko_daisuki.nexec_x;

import jp.gr.java_conf.neko_daisuki.android.nexec.client.util.NexecClient;

public class SettingsBuilder {

    private static final boolean DEBUGGING = false;

    public static NexecClient.Settings build(String host, int port,
                                             String[] args, String homeDir,
                                             String tmpDir, int width,
                                             int height) {
        NexecClient.Settings settings = new NexecClient.Settings();
        settings.host = host;
        settings.port = port;
        settings.args = args;
        settings.addLink(homeDir, "/home/fsyscall");
        settings.addLink(tmpDir, "/tmp");
        settings.addEnvironment("DISPLAY",":0");
        settings.files = new String[] {
            String.format("%s/**", homeDir),
            tmpDir,
            String.format("%s/**", tmpDir)
        };
        settings.x = true;
        settings.xWidth = width;
        settings.xHeight = height;

        if (DEBUGGING) {
            enableDebugging(settings);
        }

        return settings;
    }

    private static void enableDebugging(NexecClient.Settings settings) {
        /*
         * If you want to see debug output of dbus-launch, enable DBUS_VERBOSE.
         */
        //settings.addEnvironment("DBUS_VERBOSE", "1");

        /*
         * If you want to use your own system dbus-daemon, give the path.
         */
        /*
        settings.addEnvironment("DBUS_SYSTEM_BUS_ADDRESS",
                                "unix:path=/path/to/system_bus_socket");
                                */

        /*
         * For glib debugging
         */
        /*
        settings.addEnvironment("G_DBUS_DEBUG", "all");
        settings.addEnvironment("G_MAIN_POLL_DEBUG", "1");
        */
    }
}
{'fraction_non_alphanumeric': 0.1061084026383711, 'fraction_numerical': 0.0017206767995411529, 'mean_word_length': 1.6789554531490016, 'pattern_counts': {'":': 2, '<': 3, '<?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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6745980', 'n_tokens_mistral': 940, 'n_tokens_neox': 912, 'n_words': 195}