<commit_before>package org.dotwebstack.framework.backend.postgres.codec;

import io.netty.buffer.ByteBuf;
import lombok.RequiredArgsConstructor;
import org.locationtech.jts.geom.Geometry;
import org.postgis.binary.ByteGetter;
import org.postgis.jts.JtsBinaryParser;
import org.springframework.stereotype.Component;

@Component
class ByteBufGeometryParser extends JtsBinaryParser {

  public Geometry parse(ByteBuf byteBuf) {
    ByteBufByteGetter byteGetter = new ByteBufByteGetter(byteBuf);
    return parseGeometry(valueGetterForEndian(byteGetter));
  }

  @RequiredArgsConstructor
  public static class ByteBufByteGetter extends ByteGetter {

    private final ByteBuf byteBuf;

    @Override
    public int get(int i) {
      return byteBuf.getByte(i) & 255;
    }
  }
}<commit_msg>Fix bitmask<commit_after>package org.dotwebstack.framework.backend.postgres.codec;

import io.netty.buffer.ByteBuf;
import lombok.RequiredArgsConstructor;
import org.locationtech.jts.geom.Geometry;
import org.postgis.binary.ByteGetter;
import org.postgis.jts.JtsBinaryParser;
import org.springframework.stereotype.Component;

@Component
class ByteBufGeometryParser extends JtsBinaryParser {

  public Geometry parse(ByteBuf byteBuf) {
    ByteBufByteGetter byteGetter = new ByteBufByteGetter(byteBuf);
    return parseGeometry(valueGetterForEndian(byteGetter));
  }

  @RequiredArgsConstructor
  public static class ByteBufByteGetter extends ByteGetter {

    private final ByteBuf byteBuf;

    @Override
    public int get(int i) {
      return byteBuf.getByte(i) & 0xFF;
    }
  }
}
{'fraction_non_alphanumeric': 0.0789306174411203, 'fraction_numerical': 0.002546148949713558, 'mean_word_length': 5.188976377952756, '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': '1470124', 'n_tokens_mistral': 480, 'n_tokens_neox': 480, 'n_words': 97}