<commit_before>package net.glowstone.net.query;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.channel.socket.DatagramPacket;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Level;
import net.glowstone.GlowServer;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;

/**
 * Class for handling UDP packets according to the minecraft server query protocol.
 *
 * @see QueryServer
 * @see <a href="http://wiki.vg/Query">Protocol Specifications</a>
 */
public class QueryHandler extends SimpleChannelInboundHandler<DatagramPacket> {

    private static final byte ACTION_HANDSHAKE = 9;
    private static final byte ACTION_STATS = 0;

    /**
     * The {@link QueryServer} this handler belongs to.
     */
    private QueryServer queryServer;

    /**
     * Whether the a plugin list should be included in responses.
     */
    private boolean showPlugins;

    public QueryHandler(QueryServer queryServer, boolean showPlugins) {
        this.queryServer = queryServer;
        this.showPlugins = showPlugins;
    }

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        GlowServer.logger.log(Level.SEVERE, "Error in query handling", cause);
    }
<commit_msg>Fix CheckStyle issues in net/query/QueryHandler.java (#681)<commit_after>package net.glowstone.net.query;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.channel.socket.DatagramPacket;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Level;
import net.glowstone.GlowServer;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;

/**
 * Class for handling UDP packets according to the minecraft server query protocol.
 *
 * @see QueryServer
 * @see <a href="http://wiki.vg/Query">Protocol Specifications</a>
 */
public class QueryHandler extends SimpleChannelInboundHandler<DatagramPacket> {

    private static final byte ACTION_HANDSHAKE = 9;
    private static final byte ACTION_STATS = 0;

    /**
     * The {@link QueryServer} this handler belongs to.
     */
    private QueryServer queryServer;

    /**
     * Whether the plugin list should be included in responses.
     */
    private boolean showPlugins;

    public QueryHandler(QueryServer queryServer, boolean showPlugins) {
        this.queryServer = queryServer;
        this.showPlugins = showPlugins;
    }

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        GlowServer.logger.log(Level.SEVERE, "Error in query handling", cause);
    }

{'fraction_non_alphanumeric': 0.09206989247311828, 'fraction_numerical': 0.0023521505376344087, 'mean_word_length': 4.080204778156997, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7586261', 'n_tokens_mistral': 866, 'n_tokens_neox': 839, 'n_words': 224}