Program: 57975
Project: 57975
Buggy source:
/** 
 * Clearing the plot needs to only consider removing the blocks - This implementation has used the setCuboidAsync function, as it is fast, and uses NMS code - It also makes use of the fact that deleting chunks is a lot faster than block updates This code is very messy, but you don't need to do something quite as complex unless you happen to have 512x512 sized plots
 */
@Override public boolean clearPlot(final PlotWorld plotworld,final Plot plot,final boolean isDelete,final Runnable whenDone){
  final String world=plotworld.worldname;
  final HybridPlotWorld dpw=((HybridPlotWorld)plotworld);
  final Location pos1=MainUtil.getPlotBottomLocAbs(world,plot.id).add(1,0,1);
  final Location pos2=MainUtil.getPlotTopLocAbs(world,plot.id);
  final boolean canRegen=plotworld.TYPE == 0 && plotworld.TERRAIN == 0;
  final PlotBlock[] plotfloor=dpw.TOP_BLOCK;
  final PlotBlock[] filling=dpw.MAIN_BLOCK;
  final PlotBlock[] bedrock=(dpw.PLOT_BEDROCK ? new PlotBlock[]{new PlotBlock((short)7,(byte)0)} : filling);
  final PlotBlock air=new PlotBlock((short)0,(byte)0);
  setWallFilling(dpw,plot.id,new PlotBlock[]{dpw.WALL_FILLING});
  ChunkManager.chunkTask(pos1,pos2,new RunnableVal<int[]>(){
    @Override public void run(){
      if (canRegen && value[6] == 0) {
        ChunkManager.manager.regenerateChunk(world,new ChunkLoc(value[0],value[1]));
        return;
      }
      MainUtil.setBiome(world,value[2],value[3],value[4],value[5],dpw.PLOT_BIOME);
      Location bot=new Location(world,value[2],0,value[3]);
      Location top=new Location(world,value[4] + 1,1,value[5] + 1);
      MainUtil.setCuboidAsync(world,bot,top,bedrock);
      bot.setY(1);
      top.setY(dpw.PLOT_HEIGHT);
      MainUtil.setCuboidAsync(world,bot,top,filling);
      bot.setY(dpw.PLOT_HEIGHT);
      top.setY(dpw.PLOT_HEIGHT + 1);
      MainUtil.setCuboidAsync(world,bot,top,plotfloor);
      bot.setY(dpw.PLOT_HEIGHT + 1);
      top.setY(256);
      MainUtil.setSimpleCuboidAsync(world,bot,top,air);
      pastePlotSchematic(dpw,bot,top);
    }
  }
,new Runnable(){
    @Override public void run(){
      final PlotBlock wall=isDelete ? dpw.WALL_BLOCK : dpw.CLAIMED_WALL_BLOCK;
      setWall(dpw,plot.id,new PlotBlock[]{wall});
      SetBlockQueue.addNotify(whenDone);
    }
  }
,5);
  return true;
}

Fixed version (ground truth):
/** 
 * Clearing the plot needs to only consider removing the blocks - This implementation has used the setCuboidAsync function, as it is fast, and uses NMS code - It also makes use of the fact that deleting chunks is a lot faster than block updates This code is very messy, but you don't need to do something quite as complex unless you happen to have 512x512 sized plots
 */
@Override public boolean clearPlot(final PlotWorld plotworld,final Plot plot,final boolean isDelete,final Runnable whenDone){
  final String world=plotworld.worldname;
  final HybridPlotWorld dpw=((HybridPlotWorld)plotworld);
  final Location pos1=MainUtil.getPlotBottomLocAbs(world,plot.id).add(1,0,1);
  final Location pos2=MainUtil.getPlotTopLocAbs(world,plot.id);
  final boolean canRegen=plotworld.TYPE == 0 && plotworld.TERRAIN == 0;
  final PlotBlock[] plotfloor=dpw.TOP_BLOCK;
  final PlotBlock[] filling=dpw.MAIN_BLOCK;
  final PlotBlock[] bedrock=(dpw.PLOT_BEDROCK ? new PlotBlock[]{new PlotBlock((short)7,(byte)0)} : filling);
  final PlotBlock air=new PlotBlock((short)0,(byte)0);
  setWallFilling(dpw,plot.id,new PlotBlock[]{dpw.WALL_FILLING});
  ChunkManager.chunkTask(pos1,pos2,new RunnableVal<int[]>(){
    @Override public void run(){
      if (canRegen && value[6] == 0) {
        ChunkManager.manager.regenerateChunk(world,new ChunkLoc(value[0],value[1]));
        return;
      }
      MainUtil.setBiome(world,value[2],value[3],value[4],value[5],dpw.PLOT_BIOME);
      Location bot=new Location(world,value[2],0,value[3]);
      Location top=new Location(world,value[4] + 1,1,value[5] + 1);
      MainUtil.setCuboidAsync(world,bot,top,bedrock);
      bot.setY(1);
      top.setY(dpw.PLOT_HEIGHT);
      MainUtil.setCuboidAsync(world,bot,top,filling);
      bot.setY(dpw.PLOT_HEIGHT);
      top.setY(dpw.PLOT_HEIGHT + 1);
      MainUtil.setCuboidAsync(world,bot,top,plotfloor);
      bot.setY(dpw.PLOT_HEIGHT + 1);
      top.setY(256);
      MainUtil.setSimpleCuboidAsync(world,bot,top,air);
      pastePlotSchematic(dpw,bot,top);
    }
  }
,new Runnable(){
    @Override public void run(){
      final PlotBlock wall=isDelete ? dpw.WALL_BLOCK : dpw.CLAIMED_WALL_BLOCK;
      if (wall.id != 0 || !dpw.WALL_BLOCK.equals(dpw.CLAIMED_WALL_BLOCK)) {
        setWall(dpw,plot.id,new PlotBlock[]{wall});
      }
      SetBlockQueue.addNotify(whenDone);
    }
  }
,5);
  return true;
}