<commit_before>package omnikryptec.net;

import java.net.InetAddress;
import java.net.Socket;
import java.time.Duration;
import java.time.Instant;
import java.util.HashMap;
import omnikryptec.util.logger.LogEntry.LogLevel;
import omnikryptec.util.logger.Logger;

/**
 * Client
 * @author Panzer1119
 */
public class Client extends AdvancedSocket implements InputListenerManager {
    
    private final HashMap<Long, InputEvent> waitingAnswers = new HashMap<>();
    
    public Client(Socket socket, int threadPoolSize) {
        super(socket, threadPoolSize);
    }
    
    public Client(InetAddress inetAddress, int port, int threadPoolSize) {
        super(inetAddress, port, threadPoolSize);
    }
    
    @Override
    public final synchronized void processInput(Object object, Instant timestamp) {
        if(object instanceof InputEvent) {
            final InputEvent event = (InputEvent) object;
            if((event.getInputType() == InputType.ANSWER) && waitingAnswers.containsKey(event.getID())) {
                waitingAnswers.put(event.getID(), event);
            }
            fireInputEvent(event);
        } else {
            fireInputEvent(new InputEvent(timestamp, InputType.MESSAGE_RECEIVED, object));
        }
    }

    @Override
    public final void onConnected(Instant timestamp) {
        send(InputType.CLIENT_LOGGED_IN);
    }

    @Override
    public final void onDisconnected(Instant timestamp) {
        send(InputType.CLIENT_LOGGED_OUT);
    }
    
    public final Client answer(InputEvent message, Object... answer) {
        return this.answer(message, Instant.now(), answer);
    }<commit_msg>Fixed a small issue<commit_after>package omnikryptec.net;

import java.net.InetAddress;
import java.net.Socket;
import java.time.Duration;
import java.time.Instant;
import java.util.HashMap;
import omnikryptec.util.logger.LogEntry.LogLevel;
import omnikryptec.util.logger.Logger;

/**
 * Client
 * @author Panzer1119
 */
public class Client extends AdvancedSocket implements InputListenerManager {
    
    private final HashMap<Long, InputEvent> waitingAnswers = new HashMap<>();
    
    public Client(Socket socket, int threadPoolSize) {
        super(socket, threadPoolSize);
    }
    
    public Client(InetAddress inetAddress, int port, int threadPoolSize) {
        super(inetAddress, port, threadPoolSize);
    }
    
    @Override
    public final synchronized void processInput(Object object, Instant timestamp) {
        if(object instanceof InputEvent) {
            final InputEvent event = (InputEvent) object;
            if((event.getInputType() == InputType.ANSWER) && waitingAnswers.containsKey(event.getID())) {
                waitingAnswers.put(event.getID(), event);
            } else {
                fireInputEvent(event);
            }
        } else {
            fireInputEvent(new InputEvent(timestamp, InputType.MESSAGE_RECEIVED, object));
        }
    }

    @Override
    public final void onConnected(Instant timestamp) {
        send(InputType.CLIENT_LOGGED_IN);
    }

    @Override
    public final void onDisconnected(Instant timestamp) {
        send(InputType.CLIENT_LOGGED_OUT);
    }
    
    public final Client answer(InputEvent message, Object... answer) {
        return this.answer(message, Instant.now(), answer);
    }
{'fraction_non_alphanumeric': 0.09555488358028424, 'fraction_numerical': 0.002419110976716057, 'mean_word_length': 3.0292326431181484, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4915789', 'n_tokens_mistral': 940, 'n_tokens_neox': 919, 'n_words': 210}