<commit_before>package ru.nsu.ccfit.bogush;

import ru.nsu.ccfit.bogush.msg.Message;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;

public class SocketMessageStream implements MessageSender, MessageReceiver {
	private ObjectInputStream in;
	private ObjectOutputStream out;

	public SocketMessageStream(Socket socket) throws IOException {
		in = new ObjectInputStream(socket.getInputStream());
		out = new ObjectOutputStream(socket.getOutputStream());
	}

	public void sendMessage(Message message) throws IOException {
		out.writeObject(message);
	}

	public Message receiveMessage() throws IOException, ClassNotFoundException {
		return (Message) in.readObject();
	}
}<commit_msg>Flush output stream after sending message<commit_after>package ru.nsu.ccfit.bogush;

import ru.nsu.ccfit.bogush.msg.Message;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;

public class SocketMessageStream implements MessageSender, MessageReceiver {
	private ObjectInputStream in;
	private ObjectOutputStream out;

	public SocketMessageStream(Socket socket) throws IOException {
		out = new ObjectOutputStream(socket.getOutputStream());
		in = new ObjectInputStream(socket.getInputStream());
	}

	public void sendMessage(Message message) throws IOException {
		out.writeObject(message);
		out.flush();
	}

	public Message receiveMessage() throws IOException, ClassNotFoundException {
		return (Message) in.readObject();
	}
}
{'fraction_non_alphanumeric': 0.08874598070739549, 'fraction_numerical': 0.0, 'mean_word_length': 6.271028037383178, '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': '4622312', 'n_tokens_mistral': 432, 'n_tokens_neox': 415, 'n_words': 108}