Program: 177463
Project: 177463
Buggy source:
public static SpoutChunk loadChunk(SpoutRegion r,int x,int y,int z,InputStream dis){
  SpoutChunk chunk=null;
  NBTInputStream is=null;
  try {
    if (dis == null) {
      return chunk;
    }
    is=new NBTInputStream(dis,false);
    CompoundTag chunkTag=(CompoundTag)is.readTag();
    CompoundMap map=chunkTag.getValue();
    int cx=(r.getX() << Region.REGION_SIZE_BITS) + x;
    int cy=(r.getY() << Region.REGION_SIZE_BITS) + y;
    int cz=(r.getZ() << Region.REGION_SIZE_BITS) + z;
    boolean populated=((ByteTag)map.get("String_Node_Str")).getBooleanValue();
    short[] blocks=(short[])map.get("String_Node_Str").getValue();
    short[] data=(short[])map.get("String_Node_Str").getValue();
    byte[] skyLight=(byte[])map.get("String_Node_Str").getValue();
    byte[] blockLight=(byte[])map.get("String_Node_Str").getValue();
    byte[] extraData=(byte[])map.get("String_Node_Str").getValue();
    BiomeManager manager=null;
    if (map.containsKey("String_Node_Str")) {
      try {
        String biomeManagerClass=(String)map.get("String_Node_Str").getValue();
        byte[] biomes=(byte[])map.get("String_Node_Str").getValue();
        @SuppressWarnings("String_Node_Str") Class<? extends BiomeManager> clazz=(Class<? extends BiomeManager>)Class.forName(biomeManagerClass);
        Class<?>[] params={int.class,int.class,int.class};
        manager=clazz.getConstructor(params).newInstance(cx,cy,cz);
        manager.deserialize(biomes);
      }
 catch (      Exception e) {
        Spout.getLogger().severe("String_Node_Str");
        e.printStackTrace();
      }
    }
    if (manager == null) {
      manager=new EmptyBiomeManager(cx,cy,cz);
    }
    SpoutWorld world=r.getWorld();
    StringMap global=((SpoutEngine)Spout.getEngine()).getEngineItemMap();
    StringMap itemMap=world.getItemMap();
    for (int i=0; i < blocks.length; i++) {
      blocks[i]=(short)itemMap.convertTo(global,blocks[i]);
    }
    DatatableMap extraDataMap=new GenericDatatableMap();
    extraDataMap.decompress(extraData);
    chunk=new FilteredChunk(r.getWorld(),r,cx,cy,cz,populated,blocks,data,skyLight,blockLight,manager,extraDataMap);
    loadEntities(r,(CompoundMap)map.get("String_Node_Str").getValue());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    if (is != null) {
      try {
        is.close();
      }
 catch (      IOException ignore) {
      }
    }
  }
  return chunk;
}

Fixed version (ground truth):
public static SpoutChunk loadChunk(SpoutRegion r,int x,int y,int z,InputStream dis,List<SpoutEntity> loadedEntities){
  SpoutChunk chunk=null;
  NBTInputStream is=null;
  try {
    if (dis == null) {
      return chunk;
    }
    is=new NBTInputStream(dis,false);
    CompoundTag chunkTag=(CompoundTag)is.readTag();
    CompoundMap map=chunkTag.getValue();
    int cx=(r.getX() << Region.REGION_SIZE_BITS) + x;
    int cy=(r.getY() << Region.REGION_SIZE_BITS) + y;
    int cz=(r.getZ() << Region.REGION_SIZE_BITS) + z;
    boolean populated=((ByteTag)map.get("String_Node_Str")).getBooleanValue();
    short[] blocks=(short[])map.get("String_Node_Str").getValue();
    short[] data=(short[])map.get("String_Node_Str").getValue();
    byte[] skyLight=(byte[])map.get("String_Node_Str").getValue();
    byte[] blockLight=(byte[])map.get("String_Node_Str").getValue();
    byte[] extraData=(byte[])map.get("String_Node_Str").getValue();
    BiomeManager manager=null;
    if (map.containsKey("String_Node_Str")) {
      try {
        String biomeManagerClass=(String)map.get("String_Node_Str").getValue();
        byte[] biomes=(byte[])map.get("String_Node_Str").getValue();
        @SuppressWarnings("String_Node_Str") Class<? extends BiomeManager> clazz=(Class<? extends BiomeManager>)Class.forName(biomeManagerClass);
        Class<?>[] params={int.class,int.class,int.class};
        manager=clazz.getConstructor(params).newInstance(cx,cy,cz);
        manager.deserialize(biomes);
      }
 catch (      Exception e) {
        Spout.getLogger().severe("String_Node_Str");
        e.printStackTrace();
      }
    }
    if (manager == null) {
      manager=new EmptyBiomeManager(cx,cy,cz);
    }
    SpoutWorld world=r.getWorld();
    StringMap global=((SpoutEngine)Spout.getEngine()).getEngineItemMap();
    StringMap itemMap=world.getItemMap();
    for (int i=0; i < blocks.length; i++) {
      blocks[i]=(short)itemMap.convertTo(global,blocks[i]);
    }
    DatatableMap extraDataMap=new GenericDatatableMap();
    extraDataMap.decompress(extraData);
    chunk=new FilteredChunk(r.getWorld(),r,cx,cy,cz,populated,blocks,data,skyLight,blockLight,manager,extraDataMap);
    loadEntities(r,(CompoundMap)map.get("String_Node_Str").getValue(),loadedEntities);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    if (is != null) {
      try {
        is.close();
      }
 catch (      IOException ignore) {
      }
    }
  }
  return chunk;
}