return packets;
}
private static Packet decodeNextPacket(final ByteBuf buffer) throws IOException {
Packet packet;
if (isDelimiter(buffer, buffer.readerIndex())) {
<BUG>CharSequence packetCharsCountString = decodePacketLength(buffer);
final Integer packetCharsCount = Integer
.valueOf(packetCharsCountString.toString());</BUG>
final int packetStartIndex = buffer.readerIndex()
<BUG>+ DELIMITER_BYTES_SIZE + packetCharsCountString.length()
+ DELIMITER_BYTES_SIZE;
final int packetBytesCount = getUtf8ByteCountByCharCount(buffer,

packetStartIndex, packetCharsCount);</BUG>
ByteBuf frame = buffer.slice(packetStartIndex, packetBytesCount);

return packets;
}
private static Packet decodeNextPacket(final ByteBuf buffer) throws IOException {
Packet packet;
if (isDelimiter(buffer, buffer.readerIndex())) {
CharSequence packetCharsCountString = decodePacketLength(buffer);
final Integer packetCharsCount = Integer.valueOf(packetCharsCountString.toString());
final int packetStartIndex = buffer.readerIndex()
+ DELIMITER_BYTES_SIZE
+ packetCharsCountString.length()
+ DELIMITER_BYTES_SIZE;
final int packetBytesCount = getUtf8ByteCountByCharCount(buffer, packetStartIndex, packetCharsCount);
ByteBuf frame = buffer.slice(packetStartIndex, packetBytesCount);
