<commit_before>package com.paritytrading.nassau.moldudp64;

import static com.paritytrading.foundation.ByteBuffers.*;
import static com.paritytrading.nassau.moldudp64.MoldUDP64.*;
import static com.paritytrading.nassau.moldudp64.MoldUDP64ClientState.*;

import com.paritytrading.nassau.MessageListener;
import com.paritytrading.nassau.time.Clock;
import java.io.Closeable;
import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.DatagramChannel;

/**
 * An implementation of a MoldUDP64 client.
 */
public class MoldUDP64Client implements Closeable {

    private static final int RX_BUFFER_LENGTH = 65535;

    private static final long REQUEST_UNTIL_SEQUENCE_NUMBER_UNKNOWN = -1;

    private static final long REQUEST_TIMEOUT_MILLIS = 1000;

    private Clock clock;

    private DatagramChannel channel;

    private DatagramChannel requestChannel;

    private SocketAddress requestAddress;

    private MessageListener listener;

    private MoldUDP64ClientStatusListener statusListener;

    private ByteBuffer rxBuffer;
    private ByteBuffer txBuffer;

    private byte[] session;

    protected long nextExpectedSequenceNumber;

    private long requestUntilSequenceNumber;

    private long requestSentMillis;

    MoldUDP64Client(Clock clock, DatagramChannel channel,
            DatagramChannel requestChannel, SocketAddress requestAddress,
            MessageListener listener, MoldUDP64ClientStatusListener statusListener,
            long requestedSequenceNumber) {
        this.clock = clock;

        this.channel = channel;

        this.requestChannel = requestChannel;

        this.requestAddress = requestAddress;

        this.listener = listener;

        this.statusListener = statusListener;

        this.rxBuffer = ByteBuffer.allocateDirect(RX_BUFFER_LENGTH);
        this.txBuffer = ByteBuffer.allocateDirect(HEADER_LENGTH);

        this.session = new byte[SESSION_LENGTH];
<commit_msg>nassau-core: Use 'final' modifier in 'MoldUDP64Client'<commit_after>package com.paritytrading.nassau.moldudp64;

import static com.paritytrading.foundation.ByteBuffers.*;
import static com.paritytrading.nassau.moldudp64.MoldUDP64.*;
import static com.paritytrading.nassau.moldudp64.MoldUDP64ClientState.*;

import com.paritytrading.nassau.MessageListener;
import com.paritytrading.nassau.time.Clock;
import java.io.Closeable;
import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.DatagramChannel;

/**
 * An implementation of a MoldUDP64 client.
 */
public class MoldUDP64Client implements Closeable {

    private static final int RX_BUFFER_LENGTH = 65535;

    private static final long REQUEST_UNTIL_SEQUENCE_NUMBER_UNKNOWN = -1;

    private static final long REQUEST_TIMEOUT_MILLIS = 1000;

    private final Clock clock;

    private final DatagramChannel channel;

    private final DatagramChannel requestChannel;

    private final SocketAddress requestAddress;

    private final MessageListener listener;

    private final MoldUDP64ClientStatusListener statusListener;

    private final ByteBuffer rxBuffer;
    private final ByteBuffer txBuffer;

    private final byte[] session;

    protected long nextExpectedSequenceNumber;

    private long requestUntilSequenceNumber;

    private long requestSentMillis;

    MoldUDP64Client(Clock clock, DatagramChannel channel,
            DatagramChannel requestChannel, SocketAddress requestAddress,
            MessageListener listener, MoldUDP64ClientStatusListener statusListener,
            long requestedSequenceNumber) {
        this.clock = clock;

        this.channel = channel;

        this.requestChannel = requestChannel;

        this.requestAddress = requestAddress;

        this.listener = listener;

        this.statusListener = statusListener;

        this.rxBuffer = ByteBuffer.allocateDirect(RX_BUFFER_LENGTH);
        this.txBuffer = ByteBuffer.allocateDirect(HEADER_LENGTH);

        this.session = new byte[SESSION_LENGTH];

{'fraction_non_alphanumeric': 0.06398046398046398, 'fraction_numerical': 0.01514041514041514, 'mean_word_length': 4.107231920199501, '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': '2280966', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1098, 'n_words': 264}