Program: 57940
Project: 57940
Buggy source:
/** 
 * This should be overridden by any specialized queues
 * @param pc
 */
@Override public void execute(PlotChunk<Chunk> pc){
  FastChunk_1_9 fs=(FastChunk_1_9)pc;
  Chunk chunk=pc.getChunk();
  final World world=chunk.getWorld();
  ChunkWrapper wrapper=pc.getChunkWrapper();
  if (!toUpdate.containsKey(wrapper)) {
    toUpdate.put(wrapper,chunk);
  }
  chunk.load(true);
  try {
    final boolean flag=world.getEnvironment() == Environment.NORMAL;
    final Method getHandele=chunk.getClass().getDeclaredMethod("String_Node_Str");
    final Object c=getHandele.invoke(chunk);
    final Class<? extends Object> clazz=c.getClass();
    final Field sf=clazz.getDeclaredField("String_Node_Str");
    sf.setAccessible(true);
    final Field tf=clazz.getDeclaredField("String_Node_Str");
    final Field ef=clazz.getDeclaredField("String_Node_Str");
    final Object[] sections=(Object[])sf.get(c);
    final HashMap<?,?> tiles=(HashMap<?,?>)tf.get(c);
    final List<?>[] entities=(List<?>[])ef.get(c);
    Method xm=null;
    Method ym=null;
    Method zm=null;
    final Set<Entry<?,?>> entryset=(Set<Entry<?,?>>)(Set<?>)tiles.entrySet();
    final Iterator<Entry<?,?>> iter=entryset.iterator();
    while (iter.hasNext()) {
      final Entry<?,?> tile=iter.next();
      final Object pos=tile.getKey();
      if (xm == null) {
        final Class<? extends Object> clazz2=pos.getClass().getSuperclass();
        xm=clazz2.getDeclaredMethod("String_Node_Str");
        ym=clazz2.getDeclaredMethod("String_Node_Str");
        zm=clazz2.getDeclaredMethod("String_Node_Str");
      }
      final int lx=(int)xm.invoke(pos) & 15;
      final int ly=(int)ym.invoke(pos);
      final int lz=(int)zm.invoke(pos) & 15;
      final int j=MainUtil.CACHE_I[ly][lx][lz];
      final int k=MainUtil.CACHE_J[ly][lx][lz];
      final int[] array=fs.getIdArray(j);
      if (array == null) {
        continue;
      }
      if (array[k] != 0) {
        iter.remove();
      }
    }
    for (int i=0; i < 16; i++) {
      if ((entities[i] != null) && (fs.getCount(i) >= 4096)) {
        entities[i].clear();
      }
    }
    for (int j=0; j < sections.length; j++) {
      if (fs.getCount(j) == 0) {
        continue;
      }
      final int[] newArray=fs.getIdArray(j);
      if (newArray == null) {
        continue;
      }
      Object section=sections[j];
      if ((section == null) || (fs.getCount(j) >= 4096)) {
        char[] array=new char[4096];
        for (int i=0; i < newArray.length; i++) {
          int combined=newArray[i];
          int id=combined & 4095;
          int data=combined >> 12;
          array[i]=(char)((id << 4) + data);
        }
        section=sections[j]=newChunkSection(j << 4,flag,array);
        continue;
      }
      final Object currentArray=getBlocks(section);
      RefExecutor setType=methodSetType.of(section);
      boolean fill=true;
      for (int k=0; k < newArray.length; k++) {
        final int n=newArray[k];
switch (n) {
case 0:
          fill=false;
        continue;
case -1:
{
        fill=false;
        int x=MainUtil.x_loc[j][k];
        int y=MainUtil.y_loc[j][k];
        int z=MainUtil.z_loc[j][k];
        setType.call(x,y & 15,z,air);
        continue;
      }
default :
{
      int x=MainUtil.x_loc[j][k];
      int y=MainUtil.y_loc[j][k];
      int z=MainUtil.z_loc[j][k];
      int id=(int)n;
      Object iblock=methodGetByCombinedId.call((int)n);
      setType.call(x,y & 15,z,iblock);
      continue;
    }
}
}
if (fill) {
fs.setCount(j,Short.MAX_VALUE);
}
}
}
 catch (IllegalAccessException|IllegalArgumentException|NoSuchMethodException|SecurityException|InvocationTargetException|NoSuchFieldException e) {
e.printStackTrace();
}
int[][] biomes=fs.biomes;
Biome[] values=Biome.values();
if (biomes != null) {
for (int x=0; x < 16; x++) {
int[] array=biomes[x];
if (array == null) {
continue;
}
for (int z=0; z < 16; z++) {
int biome=array[z];
if (biome == 0) {
  continue;
}
chunk.getBlock(x,0,z).setBiome(values[biome]);
}
}
}
}

Fixed version (ground truth):
/** 
 * This should be overridden by any specialized queues
 * @param pc
 */
@Override public void execute(PlotChunk<Chunk> pc){
  FastChunk_1_9 fs=(FastChunk_1_9)pc;
  Chunk chunk=pc.getChunk();
  final World world=chunk.getWorld();
  ChunkWrapper wrapper=pc.getChunkWrapper();
  if (!toUpdate.containsKey(wrapper)) {
    toUpdate.put(wrapper,chunk);
  }
  chunk.load(true);
  try {
    final boolean flag=world.getEnvironment() == Environment.NORMAL;
    final Method getHandele=chunk.getClass().getDeclaredMethod("String_Node_Str");
    final Object c=getHandele.invoke(chunk);
    final Class<? extends Object> clazz=c.getClass();
    final Field sf=clazz.getDeclaredField("String_Node_Str");
    sf.setAccessible(true);
    final Field tf=clazz.getDeclaredField("String_Node_Str");
    final Field entitySlices=clazz.getDeclaredField("String_Node_Str");
    final Object[] sections=(Object[])sf.get(c);
    final HashMap<?,?> tiles=(HashMap<?,?>)tf.get(c);
    final AbstractSet<?>[] entities=(AbstractSet<?>[])entitySlices.get(c);
    Method xm=null;
    Method ym=null;
    Method zm=null;
    final Set<Entry<?,?>> entryset=(Set<Entry<?,?>>)(Set<?>)tiles.entrySet();
    final Iterator<Entry<?,?>> iter=entryset.iterator();
    while (iter.hasNext()) {
      final Entry<?,?> tile=iter.next();
      final Object pos=tile.getKey();
      if (xm == null) {
        final Class<? extends Object> clazz2=pos.getClass().getSuperclass();
        xm=clazz2.getDeclaredMethod("String_Node_Str");
        ym=clazz2.getDeclaredMethod("String_Node_Str");
        zm=clazz2.getDeclaredMethod("String_Node_Str");
      }
      final int lx=(int)xm.invoke(pos) & 15;
      final int ly=(int)ym.invoke(pos);
      final int lz=(int)zm.invoke(pos) & 15;
      final int j=MainUtil.CACHE_I[ly][lx][lz];
      final int k=MainUtil.CACHE_J[ly][lx][lz];
      final int[] array=fs.getIdArray(j);
      if (array == null) {
        continue;
      }
      if (array[k] != 0) {
        iter.remove();
      }
    }
    for (int i=0; i < 16; i++) {
      if ((entities[i] != null) && (fs.getCount(i) >= 4096)) {
        entities[i].clear();
      }
    }
    for (int j=0; j < sections.length; j++) {
      if (fs.getCount(j) == 0) {
        continue;
      }
      final int[] newArray=fs.getIdArray(j);
      if (newArray == null) {
        continue;
      }
      Object section=sections[j];
      if ((section == null) || (fs.getCount(j) >= 4096)) {
        char[] array=new char[4096];
        for (int i=0; i < newArray.length; i++) {
          int combined=newArray[i];
          int id=combined & 4095;
          int data=combined >> 12;
          array[i]=(char)((id << 4) + data);
        }
        section=sections[j]=newChunkSection(j << 4,flag,array);
        continue;
      }
      final Object currentArray=getBlocks(section);
      RefExecutor setType=methodSetType.of(section);
      boolean fill=true;
      for (int k=0; k < newArray.length; k++) {
        final int n=newArray[k];
switch (n) {
case 0:
          fill=false;
        continue;
case -1:
{
        fill=false;
        int x=MainUtil.x_loc[j][k];
        int y=MainUtil.y_loc[j][k];
        int z=MainUtil.z_loc[j][k];
        setType.call(x,y & 15,z,air);
        continue;
      }
default :
{
      int x=MainUtil.x_loc[j][k];
      int y=MainUtil.y_loc[j][k];
      int z=MainUtil.z_loc[j][k];
      int id=n;
      Object iblock=methodGetByCombinedId.call((int)n);
      setType.call(x,y & 15,z,iblock);
      continue;
    }
}
}
if (fill) {
fs.setCount(j,Short.MAX_VALUE);
}
}
}
 catch (IllegalAccessException|IllegalArgumentException|NoSuchMethodException|SecurityException|InvocationTargetException|NoSuchFieldException e) {
e.printStackTrace();
}
int[][] biomes=fs.biomes;
Biome[] values=Biome.values();
if (biomes != null) {
for (int x=0; x < 16; x++) {
int[] array=biomes[x];
if (array == null) {
continue;
}
for (int z=0; z < 16; z++) {
int biome=array[z];
if (biome == 0) {
  continue;
}
chunk.getBlock(x,0,z).setBiome(values[biome]);
}
}
}
}