<commit_before>
import data.DataBaseHelper;
import data.Log;
import data.SerialConnector;
import server.RBLSocketServer;
import server.RBLWebSocketServer;
import util.Config;
import util.NetworkUtil;

import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.security.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Enumeration;
import java.util.List;

/**
 * Created by <NAME>.
 *
 * Main class for the RaspberryLife server application.
 */
public class RaspberryLife {

    public static final String DEBUG_TAG = RaspberryLife.class.getSimpleName();
    public static Thread serverThread = null;
    public static Thread webServerThread = null;


    public static void main(String[] args){
        Log.printLogHeader();
        Config.readConfig();
        //Config.dumpConfig();
        NetworkUtil.listIPAddresses();
        // RaspberryHome WebSocketServer
        webServerThread = new Thread(new Runnable() {
            public void run() {
                Log.add(DEBUG_TAG,
                        "Starting WebSocketServer");
                RBLWebSocketServer webServer = new RBLWebSocketServer();
                webServer.start();
            }
        });

        // RaspberryHome Application Server
        serverThread = new Thread(new Runnable() {
                public void run() {
                Log.add(DEBUG_TAG, "Starting Java socket server");
                RBLSocketServer server = new RBLSocketServer();
                server.start(Config.get().getInt("socket.java_port"));
            }
        });

        // Start threads
        webServerThread.start();
        serverThread.start();

        // Initialize the serial connector for module communication
        SerialConnector.init();

        // Initialize database
        DataBaseHelper.setUpInitial();

    }
<commit_msg>split main initilization and add debug setup<commit_after>
import data.DataBaseHelper;
import data.Log;
import data.SerialConnector;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory;
import server.RBLSocketServer;
import server.RBLWebSocketServer;
import util.Config;
import util.NetworkUtil;

/**
 * Created by <NAME>hin.
 *
 * Main class for the RaspberryLife server application.
 */
public class RaspberryLife {

    public static final String DEBUG_TAG = RaspberryLife.class.getSimpleName();
    public static Thread serverThread = null;
    public static Thread webServerThread = null;

    public static boolean runDebugSetup = false;

    //----------------------------------------------------------------------------------------------
    //                                      MAIN
    //----------------------------------------------------------------------------------------------

    public static void main(String[] args){
        Log.printLogHeader();
        Config.readConfig();
        //Config.dumpConfig();
        NetworkUtil.listIPAddresses();
        startSocketServer();
        startWebSocketServer();
        initSerialConnection();
        initDatabase();
        if(runDebugSetup){
            initScheduler();
        }
    }

    //----------------------------------------------------------------------------------------------
    //                                      STARTUP
    //----------------------------------------------------------------------------------------------

    public static void startSocketServer(){
        serverThread = new Thread(new Runnable() {
            public void run() {
                Log.add(DEBUG_TAG, "Starting Java socket server");
                RBLSocketServer server = new RBLSocketServer();
                server.start(Config.get().getInt("socket.java_port"));
            }
        });
        serverThread.start();
    }

    public static void startWebSocketServer(){
        webServerThread = new Thread(new Runnable() {
            public void run() {
                Log.add(DEBUG_TAG,
                        "Starting WebSocketServer");
                RBLWebSocketServer webServer = new RBLWebSocketServer();
                webServer.start();
            }
        });
        webServerThread.start();
    }

    // Initialize the serial connector for module communication
    public static void initSerialConnection(){
        SerialConnector.init();
    }

    public static void initDatabase(){
        Log.add(DEBUG_TAG, "Initializing database");
        DataBaseHelper.setUpInitial();
    }

    public static void initScheduler(){
        Log.add(DEBUG_TAG, "Initializing scheduler");
        Scheduler scheduler = null;
        try {
            scheduler = StdSchedulerFactory.getDefaultScheduler();
        } catch (SchedulerException e) {
            Log.add(DEBUG_TAG, "Unable to create scheduler");
        }
        if(scheduler != null){
            try {
                scheduler.start();
            } catch (SchedulerException e) {
                Log.add(DEBUG_TAG, "Unable to start scheduler");
            }
        }

    }

{'fraction_non_alphanumeric': 0.1606126055370116, 'fraction_numerical': 0.0, 'mean_word_length': 1.7342995169082125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6253332', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1169, 'n_words': 294}