<commit_before>/*
 * Java Mysql Proxy
 * Main binary. Just listen for connections and pass them over
 * to the proxy module
 */

import java.io.*;
import java.util.*;
import java.net.ServerSocket;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class JMP {
    public static void main(String[] args) throws IOException {
        String mysqlHost = System.getProperty("mysqlHost");
        int mysqlPort = Integer.parseInt(System.getProperty("mysqlPort"));
        int port = Integer.parseInt(System.getProperty("port"));
        boolean listening = true;
        ServerSocket listener = null;
        ArrayList<Proxy_Plugin> plugins = new ArrayList<Proxy_Plugin>();
        
        Logger logger = Logger.getLogger("JMP");
        PropertyConfigurator.configure(System.getProperty("logConf"));
        
        try {
            listener = new ServerSocket(port);
        }
        catch (IOException e) {
            logger.fatal("Could not listen on port "+port);
            System.exit(-1);
        }
        
        String[] ps = System.getProperty("plugins").split(",");
        
        while (listening) {
            for (String p: ps) {
                try {
                    plugins.add((Proxy_Plugin) Proxy_Plugin.class.getClassLoader().loadClass(p).newInstance());
                    logger.info("Loaded plugin "+p);
                }
                catch (java.lang.ClassNotFoundException e) {
                    logger.error("Failed to load plugin "+p);
                    continue;
                }
                catch (java.lang.InstantiationException e) {
                    logger.error("Failed to load plugin "+p);
                    continue;
                }
                catch (java.lang.IllegalAccessException e) {
                    logger.error("Failed to load plugin "+p);
                    continue;
                }
            }
            new Proxy(listener.accept(), mysqlHost, mysqlPort, plugins).start();
            plugins.clear();
        }
 
        listener.close();
    }
}<commit_msg>Fix an issue with the plugins getting muddled with<commit_after>/*
 * Java Mysql Proxy
 * Main binary. Just listen for connections and pass them over
 * to the proxy module
 */

import java.io.*;
import java.util.*;
import java.net.ServerSocket;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class JMP {
    public static void main(String[] args) throws IOException {
        String mysqlHost = System.getProperty("mysqlHost");
        int mysqlPort = Integer.parseInt(System.getProperty("mysqlPort"));
        int port = Integer.parseInt(System.getProperty("port"));
        boolean listening = true;
        ServerSocket listener = null;
        ArrayList<Proxy_Plugin> plugins = new ArrayList<Proxy_Plugin>();
        
        Logger logger = Logger.getLogger("JMP");
        PropertyConfigurator.configure(System.getProperty("logConf"));
        
        try {
            listener = new ServerSocket(port);
        }
        catch (IOException e) {
            logger.fatal("Could not listen on port "+port);
            System.exit(-1);
        }
        
        String[] ps = System.getProperty("plugins").split(",");
        
        while (listening) {
            plugins = new ArrayList<Proxy_Plugin>();
            for (String p: ps) {
                try {
                    plugins.add((Proxy_Plugin) Proxy_Plugin.class.getClassLoader().loadClass(p).newInstance());
                    logger.info("Loaded plugin "+p);
                }
                catch (java.lang.ClassNotFoundException e) {
                    logger.error("Failed to load plugin "+p);
                    continue;
                }
                catch (java.lang.InstantiationException e) {
                    logger.error("Failed to load plugin "+p);
                    continue;
                }
                catch (java.lang.IllegalAccessException e) {
                    logger.error("Failed to load plugin "+p);
                    continue;
                }
            }
            new Proxy(listener.accept(), mysqlHost, mysqlPort, plugins).start();
        }
 
        listener.close();
    }
}
{'fraction_non_alphanumeric': 0.10725253957004488, 'fraction_numerical': 0.001417434443656981, 'mean_word_length': 1.7836949375410913, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '7097296', 'n_tokens_mistral': 1050, 'n_tokens_neox': 1025, 'n_words': 258}