<commit_before>package ru.ematveev;

import java.io.InputStream;
import java.io.OutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.util.Scanner;

/**
 * Class Client for query answers from the server.
 */
public class Client {
    private static final int PORT = 7667;
    private static final String IP = "127.0.0.1";
    private final Socket socket;

    private Client(Socket socket) {
        this.socket = socket;
    }

    /**
     * The method for send the request for server.
      */
    private void clientBot() {
        try {
            InputStream sin = socket.getInputStream();
            OutputStream sout = socket.getOutputStream();
            DataInputStream in = new DataInputStream(sin);
            DataOutputStream out = new DataOutputStream(sout);
            Scanner console = new Scanner(System.in);

            String str;
            String cons;
            do {
                cons = console.next();
                out.writeUTF(cons);
                out.flush();
                do {
                    str = in.readUTF();
                    System.out.println(str);
                } while (!str.equals(""));
            } while (!cons.equals("exit"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    /**
     * The method for start the Client.
     * @param args String argements.
     * @throws IOException exception
     */
    public static void main(String[] args) throws IOException {
        try (Socket socket = new Socket(InetAddress.getByName(IP), PORT)) {
            new Client(socket).clientBot();
        }
    }
}

<commit_msg>Client - add try resurce<commit_after>package ru.ematveev;

import java.io.InputStream;
import java.io.OutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.util.Scanner;

/**
 * Class Client for query answers from the server.
 */
public class Client {
    private static final int PORT = 7667;
    private static final String IP = "127.0.0.1";
    private final Socket socket;

    private Client(Socket socket) {
        this.socket = socket;
    }

    /**
     * The method for send the request for server.
      */
    private void clientBot() {
        try (InputStream sin = socket.getInputStream();
             OutputStream sout = socket.getOutputStream();
             DataInputStream in = new DataInputStream(sin);
             DataOutputStream out = new DataOutputStream(sout)) {

            Scanner console = new Scanner(System.in);

            String str;
            String cons;
            do {
                cons = console.next();
                out.writeUTF(cons);
                out.flush();
                do {
                    str = in.readUTF();
                    System.out.println(str);
                } while (!str.equals(""));
            } while (!cons.equals("exit"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    /**
     * The method for start the Client.
     * @param args String argements.
     * @throws IOException exception
     */
    public static void main(String[] args) throws IOException {
        try (Socket socket = new Socket(InetAddress.getByName(IP), PORT)) {
            new Client(socket).clientBot();
        }
    }
}


//package ru.ematveev;
//
//        import java.io.InputStream;
//        import java.io.OutputStream;
//        import java.io.DataInputStream;
//        import java.io.DataOutputStream;
//        import java.io.IOException;
//        import java.net.InetAddress;
//        import java.net.Socket;
//        import java.util.Scanner;
//
///**
// * Class Client for query answers from the server.
// */
//public class Client {
//    private static final int PORT = 7667;
//    private static final String IP = "127.0.0.1";
//    private final Socket socket;
//
//    private Client(Socket socket) {
//        this.socket = socket;
//    }
//
//    /**
//     * The method for send the request for server.
//     */
//    private void clientBot() {
//        try {
//            InputStream sin = socket.getInputStream();
//            OutputStream sout = socket.getOutputStream();
//            DataInputStream in = new DataInputStream(sin);
//            DataOutputStream out = new DataOutputStream(sout);
//            Scanner console = new Scanner(System.in);
//
//            String str;
//            String cons;
//            do {
//                cons = console.next();
//                out.writeUTF(cons);
//                out.flush();
//                do {
//                    str = in.readUTF();
//                    System.out.println(str);
//                } while (!str.equals(""));
//            } while (!cons.equals("exit"));
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }
//    /**
//     * The method for start the Client.
//     * @param args String argements.
//     * @throws IOException exception
//     */
//    public static void main(String[] args) throws IOException {
//        try (Socket socket = new Socket(InetAddress.getByName(IP), PORT)) {
//            new Client(socket).clientBot();
//        }
//    }
//}
{'fraction_non_alphanumeric': 0.12300260126347083, 'fraction_numerical': 0.005574136008918618, 'mean_word_length': 1.7311009639776762, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '5100888', 'n_tokens_mistral': 1444, 'n_tokens_neox': 1397, 'n_words': 390}