Program: 96694
Project: 96694
Buggy source:
/** 
 * Send a single chunk to the client
 * @param chunkX The chunk X coordinate
 * @param chunkZ The chunk Z coordinate
 */
private synchronized void sendChunk(int chunkX,int chunkZ){
  try {
    if (!this.getSession().getPlayer().getWorld().getChunkAt(chunkX,chunkZ).isLoaded()) {
      this.getSession().getPlayer().getWorld().loadChunk(chunkX,chunkZ,true);
    }
    GlowChunkSnapshot chunk=this.getSession().getPlayer().getWorld().getChunkAt(chunkX,chunkZ).getChunkSnapshot();
    ByteArrayOutputStream totalData=new ByteArrayOutputStream();
    PEBinaryWriter writer=new PEBinaryWriter(totalData);
    if (writer.getEndianness() == PEBinaryUtils.BIG_ENDIAN) {
      writer.switchEndianness();
    }
    writer.writeInt(chunkX);
    writer.writeInt(chunkZ);
    for (int x=0; x < 16; x++) {
      for (int z=0; z < 16; z++) {
        for (int y=0; y < 128; y++) {
          if (chunk.getBlockTypeId(x,y,z) != 0) {
            writer.writeByte((byte)(this.getSession().getTranslator().getItemTranslator().translateToPE(chunk.getBlockTypeId(x,y,z)) & 0xFF));
          }
 else {
            writer.writeByte((byte)0x00);
          }
        }
      }
    }
    for (int x=0; x < 16; x++) {
      for (int z=0; z < 16; z++) {
        for (int y=0; y < 128; y+=2) {
          byte data=0;
          data=(byte)((chunk.getBlockData(x,y,z) & 0xF) << 4);
          data|=chunk.getBlockData(x,y + 1,z) & 0xF;
          writer.writeByte(data);
        }
      }
    }
    for (int i=0; i < 16384; i++) {
      writer.writeByte((byte)0x00);
    }
    for (int i=0; i < 16384; i++) {
      writer.writeByte((byte)0x00);
    }
    for (int i=0; i < 256; i++) {
      writer.writeByte((byte)0xFF);
    }
    for (int i=0; i < 256; i++) {
      writer.writeByte((byte)0x00);
      writer.writeByte((byte)0x85);
      writer.writeByte((byte)0xB2);
      writer.writeByte((byte)0x4A);
    }
    Deflater deflater=new Deflater(7);
    deflater.reset();
    deflater.setInput(totalData.toByteArray());
    deflater.finish();
    byte[] bufferDeflate=new byte[65536];
    int deflatedSize=deflater.deflate(bufferDeflate);
    FullChunkPacket packet=new FullChunkPacket();
    packet.compressedData=ArrayUtils.subarray(bufferDeflate,0,deflatedSize);
    this.getSession().send(packet);
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
/** 
 * Send a single chunk to the client
 * @param chunkX The chunk X coordinate
 * @param chunkZ The chunk Z coordinate
 */
private synchronized void sendChunk(int chunkX,int chunkZ){
  try {
    if (!this.getSession().getPlayer().getWorld().getChunkAt(chunkX,chunkZ).isLoaded()) {
      this.getSession().getPlayer().getWorld().loadChunk(chunkX,chunkZ,true);
    }
    GlowChunkSnapshot chunk=this.getSession().getPlayer().getWorld().getChunkAt(chunkX,chunkZ).getChunkSnapshot();
    ByteArrayOutputStream totalData=new ByteArrayOutputStream();
    PEBinaryWriter writer=new PEBinaryWriter(totalData);
    if (writer.getEndianness() == PEBinaryUtils.BIG_ENDIAN) {
      writer.switchEndianness();
    }
    for (int x=0; x < 16; x++) {
      for (int z=0; z < 16; z++) {
        for (int y=0; y < 128; y++) {
          if (chunk.getBlockTypeId(x,y,z) != 0) {
            writer.writeByte((byte)(this.getSession().getTranslator().getItemTranslator().translateToPE(chunk.getBlockTypeId(x,y,z)) & 0xFF));
          }
 else {
            writer.writeByte((byte)0x00);
          }
        }
      }
    }
    for (int x=0; x < 16; x++) {
      for (int z=0; z < 16; z++) {
        for (int y=0; y < 128; y+=2) {
          byte data=0;
          data=(byte)((chunk.getBlockData(x,y,z) & 0xF) << 4);
          data|=chunk.getBlockData(x,y + 1,z) & 0xF;
          writer.writeByte(data);
        }
      }
    }
    for (int i=0; i < 16384; i++) {
      writer.writeByte((byte)0x00);
    }
    for (int i=0; i < 16384; i++) {
      writer.writeByte((byte)0x00);
    }
    for (int i=0; i < 256; i++) {
      writer.writeByte((byte)0xFF);
    }
    for (int i=0; i < 256; i++) {
      writer.writeByte((byte)0x00);
      writer.writeByte((byte)0x85);
      writer.writeByte((byte)0xB2);
      writer.writeByte((byte)0x4A);
    }
    FullChunkPacket packet=new FullChunkPacket();
    packet.chunkX=chunkX;
    packet.chunkZ=chunkZ;
    packet.chunkData=totalData.toByteArray();
    this.getSession().send(packet);
    System.out.println("String_Node_Str" + chunkX + "String_Node_Str"+ chunkZ);
  }
 catch (  IOException e) {
  }
}