<commit_before>import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class ConnectionManager {

    private static final int timout = 3000;
    private static final int port = 6880;
    private static final boolean whileConnected = true; 

    public static void main (String args[]){
        try {
            ServerSocket input = new ServerSocket(port);
            System.out.println("Starting server...");
            while (whileConnected){
                try (
                    Socket connectionSocket = input.accept();
                    BufferedReader iptFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));
                    DataOutputStream optToClient = new DataOutputStream(connectionSocket.getOutputStream());
                ) {
                    String tcpClientMess = iptFromClient.readLine();
                    System.out.println("Sending message: " + tcpClientMess);
                    optToClient.writeBytes(tcpClientMess);
                }
                catch (Exception e) {
                    System.out.println("Error sending message: " + e);
                }
            }            
        }
        catch (Exception e){
            System.out.println("Error: " + e);
        }
    }
}<commit_msg>better connection manager succesfully getting messages from PrintOps<commit_after>import java.io.BufferedInputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.io.InputStream;

public class ConnectionManager {

    private static final int timout = 3000;
    private static final int port = 9100;
    private static final boolean whileConnected = true; 
    private static final int bufferSize = 1024;
    private static InputStream inputStream = null;

    public static void main (String args[]){
        try {
            ServerSocket input = new ServerSocket(port);
            System.out.println("Starting server...");

            while (whileConnected){
                try { 
                    Socket connectionSocket = input.accept();
                    inputStream = new BufferedInputStream(connectionSocket.getInputStream());
                    int read;
                    if (connectionSocket.isConnected()){
                        System.out.println("Socket is connected!");
                    }
                    byte[] buffer = new byte[bufferSize];
                    while((read = inputStream.read(buffer)) != -1){
                        String message = new String(buffer, "ASCII").trim();
                        System.out.println(message);
                    }
                }
                catch (Exception e) {
                    System.out.println("Error sending message: " + e);
                }
                finally {
                    inputStream.close();
                }
            }            
        }
        catch (Exception e){
            System.out.println("Error: " + e);
        }
        finally {
            inputStream.close();
        }
    }
}
{'fraction_non_alphanumeric': 0.088348271446863, 'fraction_numerical': 0.006722151088348271, 'mean_word_length': 1.650551314673452, 'pattern_counts': {'":': 0, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5862647', 'n_tokens_mistral': 756, 'n_tokens_neox': 691, 'n_words': 183}