<commit_before>package pl.grzeslowski.jsupla.protocol.decoders;

import pl.grzeslowski.jsupla.protocol.structs.TSuplaDataPacket;
import pl.grzeslowski.jsupla.protocol.structs.ds.TDS_SuplaDeviceChannel_B;

import static java.util.Arrays.copyOfRange;
import static pl.grzeslowski.jsupla.protocol.consts.JavaConsts.BYTE_SIZE;
import static pl.grzeslowski.jsupla.protocol.consts.JavaConsts.INT_SIZE;
import static pl.grzeslowski.jsupla.protocol.consts.ProtoConsts.SUPLA_CHANNELVALUE_SIZE;
import static pl.grzeslowski.jsupla.protocol.decoders.PrimitiveParser.parseInt;
import static pl.grzeslowski.jsupla.protocol.decoders.PrimitiveParser.parseUnsignedByte;

public class TDS_SuplaDeviceChannel_BDecoder implements Decoder<TDS_SuplaDeviceChannel_B> {
    @Override
    public TDS_SuplaDeviceChannel_B decode(TSuplaDataPacket dataPacket) {
        byte[] bytes = dataPacket.data;
        int offset = 0;
        final short number = parseUnsignedByte(bytes, offset);
        offset += BYTE_SIZE;

        final int type = parseInt(bytes, offset);
        offset += INT_SIZE;

        final int funcList = parseInt(bytes, offset);
        offset += INT_SIZE;

        final int default_ = parseInt(bytes, offset);
        offset += INT_SIZE;

        final byte[] value = copyOfRange(bytes, offset, offset + SUPLA_CHANNELVALUE_SIZE);
        offset += SUPLA_CHANNELVALUE_SIZE;

        return new TDS_SuplaDeviceChannel_B(number, type, funcList, default_, value);
    }
}
<commit_msg>`Local variable name 'default_' must match pattern '^[a-z]([a-z0-9][a-zA-Z0-9]*)?$'.`<commit_after>package pl.grzeslowski.jsupla.protocol.decoders;

import pl.grzeslowski.jsupla.protocol.structs.TSuplaDataPacket;
import pl.grzeslowski.jsupla.protocol.structs.ds.TDS_SuplaDeviceChannel_B;

import static java.util.Arrays.copyOfRange;
import static pl.grzeslowski.jsupla.protocol.consts.JavaConsts.BYTE_SIZE;
import static pl.grzeslowski.jsupla.protocol.consts.JavaConsts.INT_SIZE;
import static pl.grzeslowski.jsupla.protocol.consts.ProtoConsts.SUPLA_CHANNELVALUE_SIZE;
import static pl.grzeslowski.jsupla.protocol.decoders.PrimitiveParser.parseInt;
import static pl.grzeslowski.jsupla.protocol.decoders.PrimitiveParser.parseUnsignedByte;

public class TDS_SuplaDeviceChannel_BDecoder implements Decoder<TDS_SuplaDeviceChannel_B> {
    @Override
    public TDS_SuplaDeviceChannel_B decode(TSuplaDataPacket dataPacket) {
        byte[] bytes = dataPacket.data;
        int offset = 0;
        final short number = parseUnsignedByte(bytes, offset);
        offset += BYTE_SIZE;

        final int type = parseInt(bytes, offset);
        offset += INT_SIZE;

        final int funcList = parseInt(bytes, offset);
        offset += INT_SIZE;

        final int defaultField = parseInt(bytes, offset);
        offset += INT_SIZE;

        final byte[] value = copyOfRange(bytes, offset, offset + SUPLA_CHANNELVALUE_SIZE);
        offset += SUPLA_CHANNELVALUE_SIZE;

        return new TDS_SuplaDeviceChannel_B(number, type, funcList, defaultField, value);
    }
}

{'fraction_non_alphanumeric': 0.09189723320158102, 'fraction_numerical': 0.001976284584980237, 'mean_word_length': 4.394316163410302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4760564', 'n_tokens_mistral': 1010, 'n_tokens_neox': 1006, 'n_words': 175}