Program: 81782
Project: 81782
Buggy source:
public void tick(World parWorld){
  if (!parWorld.isRemote) {
    if (parWorld.getTotalWorldTime() % queueProcessRate == 0) {
      Iterator<BlockUpdateSnapshot> it=listBlockUpdateQueue.values().iterator();
      int count=0;
      int entityCreateStaggerRate=3;
      Random rand=new Random();
      while (it.hasNext()) {
        BlockUpdateSnapshot snapshot=it.next();
        World world=DimensionManager.getWorld(snapshot.getDimID());
        if (world != null) {
          if (ConfigTornado.Storm_Tornado_grabbedBlocksRepairOverTime && UtilMining.canConvertToRepairingBlock(world,snapshot.statePrev)) {
            TileEntityRepairingBlock.replaceBlockAndBackup(world,snapshot.getPos());
          }
 else {
            CULog.dbg("String_Node_Str" + snapshot.statePrev);
            world.setBlockState(snapshot.getPos(),snapshot.getState(),3);
          }
          if (snapshot.getState().getBlock() == Blocks.AIR) {
            if (snapshot.isCreateEntityForBlockRemoval()) {
              EntityMovingBlock mBlock=new EntityMovingBlock(parWorld,snapshot.getPos().getX(),snapshot.getPos().getY(),snapshot.getPos().getZ(),snapshot.statePrev.getBlock(),storm);
              double speed=1D;
              mBlock.motionX+=(rand.nextDouble() - rand.nextDouble()) * speed;
              mBlock.motionZ+=(rand.nextDouble() - rand.nextDouble()) * speed;
              mBlock.motionY=1D;
              parWorld.spawnEntity(mBlock);
            }
          }
        }
        count++;
      }
      listBlockUpdateQueue.clear();
    }
  }
  if (storm == null)   return;
  boolean seesLight=false;
  tickGrabCount=0;
  removeCount=0;
  tryRipCount=0;
  int tryRipMax=300;
  int firesPerTickMax=1;
  if (storm.isFirenado) {
  }
  tornadoBaseSize=getTornadoBaseSize();
  if (storm.stormType == storm.TYPE_WATER) {
    tornadoBaseSize*=3;
  }
  forceRotate(parWorld);
  Random rand=new Random();
  int spawnYOffset=(int)storm.posBaseFormationPos.yCoord;
  if (!parWorld.isRemote && (ConfigTornado.Storm_Tornado_grabBlocks || storm.isFirenado)) {
    int yStart=00;
    int yEnd=(int)storm.pos.yCoord;
    int yInc=1;
    Biome bgb=parWorld.getBiome(new BlockPos(MathHelper.floor(storm.pos.xCoord),0,MathHelper.floor(storm.pos.zCoord)));
    if (bgb != null && (bgb.getBaseHeight() <= 0.7 || storm.isFirenado)) {
      for (int i=yStart; i < yEnd; i+=yInc) {
        int YRand=i;
        int ii=YRand / 4;
        if (i > 20 && rand.nextInt(2) != 0) {
          continue;
        }
        if (tryRipCount > tryRipMax) {
          break;
        }
        int extraTry=(int)((storm.levelCurIntensityStage + 1 - storm.levelStormIntensityFormingStartVal) * 5);
        int loopAmount=5 + ii + extraTry;
        if (storm.stormType == StormObject.TYPE_WATER) {
          loopAmount=1 + ii / 2;
        }
        for (int k=0; k < loopAmount; k++) {
          if (tryRipCount > tryRipMax) {
            break;
          }
          int tryY=(int)(spawnYOffset + YRand - 1.5D);
          if (tryY > 255) {
            tryY=255;
          }
          int tryX=(int)storm.pos.xCoord + rand.nextInt(tornadoBaseSize + (ii)) - ((tornadoBaseSize / 2) + (ii / 2));
          int tryZ=(int)storm.pos.zCoord + rand.nextInt(tornadoBaseSize + (ii)) - ((tornadoBaseSize / 2) + (ii / 2));
          double d0=storm.pos.xCoord - tryX;
          double d2=storm.pos.zCoord - tryZ;
          double dist=(double)MathHelper.sqrt(d0 * d0 + d2 * d2);
          BlockPos pos=new BlockPos(tryX,tryY,tryZ);
          if (dist < tornadoBaseSize / 2 + ii / 2 && tryRipCount < tryRipMax) {
            IBlockState state=parWorld.getBlockState(pos);
            Block blockID=state.getBlock();
            boolean performed=false;
            if (canGrab(parWorld,state,pos)) {
              tryRipCount++;
              seesLight=tryRip(parWorld,tryX,tryY,tryZ);
              performed=seesLight;
            }
            if (!performed && ConfigTornado.Storm_Tornado_RefinedGrabRules) {
              if (blockID == Blocks.GRASS && canGrab(parWorld,state,pos)) {
                if (!listBlockUpdateQueue.containsKey(pos)) {
                  listBlockUpdateQueue.put(pos,new BlockUpdateSnapshot(parWorld.provider.getDimension(),Blocks.DIRT.getDefaultState(),state,pos,false));
                }
              }
            }
          }
        }
      }
      for (int k=0; k < 10; k++) {
        int randSize=40;
        randSize=10;
        int tryX=(int)storm.pos.xCoord + rand.nextInt(randSize) - randSize / 2;
        int tryY=(int)spawnYOffset - 2 + rand.nextInt(8);
        int tryZ=(int)storm.pos.zCoord + rand.nextInt(randSize) - randSize / 2;
        double d0=storm.pos.xCoord - tryX;
        double d2=storm.pos.zCoord - tryZ;
        double dist=(double)MathHelper.sqrt(d0 * d0 + d2 * d2);
        if (dist < tornadoBaseSize / 2 + randSize / 2 && tryRipCount < tryRipMax) {
          BlockPos pos=new BlockPos(tryX,tryY,tryZ);
          IBlockState state=parWorld.getBlockState(pos);
          Block blockID=state.getBlock();
          if (canGrab(parWorld,state,pos)) {
            tryRipCount++;
            tryRip(parWorld,tryX,tryY,tryZ);
          }
        }
      }
    }
  }
 else {
    seesLight=true;
  }
  if (Math.abs((spawnYOffset - storm.pos.yCoord)) > 5) {
    seesLight=true;
  }
  if (!parWorld.isRemote && storm.isFirenado) {
    if (storm.levelCurIntensityStage >= storm.STATE_STAGE1)     for (int i=0; i < firesPerTickMax; i++) {
      BlockPos posUp=new BlockPos(storm.posGround.xCoord,storm.posGround.yCoord + rand.nextInt(30),storm.posGround.zCoord);
      IBlockState state=parWorld.getBlockState(posUp);
      if (CoroUtilBlock.isAir(state.getBlock())) {
        EntityMovingBlock mBlock=new EntityMovingBlock(parWorld,posUp.getX(),posUp.getY(),posUp.getZ(),Blocks.FIRE,storm);
        mBlock.metadata=15;
        double speed=2D;
        mBlock.motionX+=(rand.nextDouble() - rand.nextDouble()) * speed;
        mBlock.motionZ+=(rand.nextDouble() - rand.nextDouble()) * speed;
        mBlock.motionY=1D;
        mBlock.mode=0;
        parWorld.spawnEntity(mBlock);
      }
    }
    int randSize=10;
    int tryX=(int)storm.pos.xCoord + rand.nextInt(randSize) - randSize / 2;
    int tryZ=(int)storm.pos.zCoord + rand.nextInt(randSize) - randSize / 2;
    int tryY=parWorld.getHeight(tryX,tryZ) - 1;
    double d0=storm.pos.xCoord - tryX;
    double d2=storm.pos.zCoord - tryZ;
    double dist=(double)MathHelper.sqrt(d0 * d0 + d2 * d2);
    if (dist < tornadoBaseSize / 2 + randSize / 2 && tryRipCount < tryRipMax) {
      BlockPos pos=new BlockPos(tryX,tryY,tryZ);
      Block block=parWorld.getBlockState(pos).getBlock();
      BlockPos posUp=new BlockPos(tryX,tryY + 1,tryZ);
      Block blockUp=parWorld.getBlockState(posUp).getBlock();
      if (!CoroUtilBlock.isAir(block) && CoroUtilBlock.isAir(blockUp)) {
        parWorld.setBlockState(posUp,Blocks.FIRE.getDefaultState());
      }
    }
  }
}

Fixed version (ground truth):
public void tick(World parWorld){
  if (!parWorld.isRemote) {
    if (parWorld.getTotalWorldTime() % queueProcessRate == 0) {
      Iterator<BlockUpdateSnapshot> it=listBlockUpdateQueue.values().iterator();
      int count=0;
      int entityCreateStaggerRate=3;
      Random rand=new Random();
      while (it.hasNext()) {
        BlockUpdateSnapshot snapshot=it.next();
        World world=DimensionManager.getWorld(snapshot.getDimID());
        if (world != null) {
          if (ConfigTornado.Storm_Tornado_grabbedBlocksRepairOverTime && UtilMining.canConvertToRepairingBlock(world,snapshot.statePrev)) {
            TileEntityRepairingBlock.replaceBlockAndBackup(world,snapshot.getPos(),ConfigTornado.Storm_Tornado_TicksToRepairBlock);
          }
 else {
            CULog.dbg("String_Node_Str" + snapshot.statePrev);
            world.setBlockState(snapshot.getPos(),snapshot.getState(),3);
          }
          if (snapshot.getState().getBlock() == Blocks.AIR) {
            if (snapshot.isCreateEntityForBlockRemoval()) {
              EntityMovingBlock mBlock=new EntityMovingBlock(parWorld,snapshot.getPos().getX(),snapshot.getPos().getY(),snapshot.getPos().getZ(),snapshot.statePrev,storm);
              double speed=1D;
              mBlock.motionX+=(rand.nextDouble() - rand.nextDouble()) * speed;
              mBlock.motionZ+=(rand.nextDouble() - rand.nextDouble()) * speed;
              mBlock.motionY=1D;
              parWorld.spawnEntity(mBlock);
            }
          }
        }
        count++;
      }
      listBlockUpdateQueue.clear();
    }
  }
  if (storm == null)   return;
  boolean seesLight=false;
  tickGrabCount=0;
  removeCount=0;
  tryRipCount=0;
  int tryRipMax=300;
  int firesPerTickMax=1;
  if (storm.isFirenado) {
  }
  tornadoBaseSize=getTornadoBaseSize();
  if (storm.stormType == storm.TYPE_WATER) {
    tornadoBaseSize*=3;
  }
  forceRotate(parWorld);
  Random rand=new Random();
  int spawnYOffset=(int)storm.posBaseFormationPos.yCoord;
  if (!parWorld.isRemote && (ConfigTornado.Storm_Tornado_grabBlocks || storm.isFirenado)) {
    int yStart=00;
    int yEnd=(int)storm.pos.yCoord;
    int yInc=1;
    Biome bgb=parWorld.getBiome(new BlockPos(MathHelper.floor(storm.pos.xCoord),0,MathHelper.floor(storm.pos.zCoord)));
    if (bgb != null && (bgb.getBaseHeight() <= 0.7 || storm.isFirenado)) {
      for (int i=yStart; i < yEnd; i+=yInc) {
        int YRand=i;
        int ii=YRand / 4;
        if (i > 20 && rand.nextInt(2) != 0) {
          continue;
        }
        if (tryRipCount > tryRipMax) {
          break;
        }
        int extraTry=(int)((storm.levelCurIntensityStage + 1 - storm.levelStormIntensityFormingStartVal) * 5);
        int loopAmount=5 + ii + extraTry;
        if (storm.stormType == StormObject.TYPE_WATER) {
          loopAmount=1 + ii / 2;
        }
        for (int k=0; k < loopAmount; k++) {
          if (tryRipCount > tryRipMax) {
            break;
          }
          int tryY=(int)(spawnYOffset + YRand - 1.5D);
          if (tryY > 255) {
            tryY=255;
          }
          int tryX=(int)storm.pos.xCoord + rand.nextInt(tornadoBaseSize + (ii)) - ((tornadoBaseSize / 2) + (ii / 2));
          int tryZ=(int)storm.pos.zCoord + rand.nextInt(tornadoBaseSize + (ii)) - ((tornadoBaseSize / 2) + (ii / 2));
          double d0=storm.pos.xCoord - tryX;
          double d2=storm.pos.zCoord - tryZ;
          double dist=(double)MathHelper.sqrt(d0 * d0 + d2 * d2);
          BlockPos pos=new BlockPos(tryX,tryY,tryZ);
          if (dist < tornadoBaseSize / 2 + ii / 2 && tryRipCount < tryRipMax) {
            IBlockState state=parWorld.getBlockState(pos);
            Block blockID=state.getBlock();
            boolean performed=false;
            if (canGrab(parWorld,state,pos)) {
              tryRipCount++;
              seesLight=tryRip(parWorld,tryX,tryY,tryZ);
              performed=seesLight;
            }
            if (!performed && ConfigTornado.Storm_Tornado_RefinedGrabRules) {
              if (blockID == Blocks.GRASS && canGrab(parWorld,state,pos)) {
                if (!listBlockUpdateQueue.containsKey(pos)) {
                  listBlockUpdateQueue.put(pos,new BlockUpdateSnapshot(parWorld.provider.getDimension(),Blocks.DIRT.getDefaultState(),state,pos,false));
                }
              }
            }
          }
        }
      }
      for (int k=0; k < 10; k++) {
        int randSize=40;
        randSize=10;
        int tryX=(int)storm.pos.xCoord + rand.nextInt(randSize) - randSize / 2;
        int tryY=(int)spawnYOffset - 2 + rand.nextInt(8);
        int tryZ=(int)storm.pos.zCoord + rand.nextInt(randSize) - randSize / 2;
        double d0=storm.pos.xCoord - tryX;
        double d2=storm.pos.zCoord - tryZ;
        double dist=(double)MathHelper.sqrt(d0 * d0 + d2 * d2);
        if (dist < tornadoBaseSize / 2 + randSize / 2 && tryRipCount < tryRipMax) {
          BlockPos pos=new BlockPos(tryX,tryY,tryZ);
          IBlockState state=parWorld.getBlockState(pos);
          Block blockID=state.getBlock();
          if (canGrab(parWorld,state,pos)) {
            tryRipCount++;
            tryRip(parWorld,tryX,tryY,tryZ);
          }
        }
      }
    }
  }
 else {
    seesLight=true;
  }
  if (Math.abs((spawnYOffset - storm.pos.yCoord)) > 5) {
    seesLight=true;
  }
  if (!parWorld.isRemote && storm.isFirenado) {
    if (storm.levelCurIntensityStage >= storm.STATE_STAGE1)     for (int i=0; i < firesPerTickMax; i++) {
      BlockPos posUp=new BlockPos(storm.posGround.xCoord,storm.posGround.yCoord + rand.nextInt(30),storm.posGround.zCoord);
      IBlockState state=parWorld.getBlockState(posUp);
      if (CoroUtilBlock.isAir(state.getBlock())) {
        EntityMovingBlock mBlock=new EntityMovingBlock(parWorld,posUp.getX(),posUp.getY(),posUp.getZ(),Blocks.FIRE.getDefaultState(),storm);
        mBlock.metadata=15;
        double speed=2D;
        mBlock.motionX+=(rand.nextDouble() - rand.nextDouble()) * speed;
        mBlock.motionZ+=(rand.nextDouble() - rand.nextDouble()) * speed;
        mBlock.motionY=1D;
        mBlock.mode=0;
        parWorld.spawnEntity(mBlock);
      }
    }
    int randSize=10;
    int tryX=(int)storm.pos.xCoord + rand.nextInt(randSize) - randSize / 2;
    int tryZ=(int)storm.pos.zCoord + rand.nextInt(randSize) - randSize / 2;
    int tryY=parWorld.getHeight(tryX,tryZ) - 1;
    double d0=storm.pos.xCoord - tryX;
    double d2=storm.pos.zCoord - tryZ;
    double dist=(double)MathHelper.sqrt(d0 * d0 + d2 * d2);
    if (dist < tornadoBaseSize / 2 + randSize / 2 && tryRipCount < tryRipMax) {
      BlockPos pos=new BlockPos(tryX,tryY,tryZ);
      Block block=parWorld.getBlockState(pos).getBlock();
      BlockPos posUp=new BlockPos(tryX,tryY + 1,tryZ);
      Block blockUp=parWorld.getBlockState(posUp).getBlock();
      if (!CoroUtilBlock.isAir(block) && CoroUtilBlock.isAir(blockUp)) {
        parWorld.setBlockState(posUp,Blocks.FIRE.getDefaultState());
      }
    }
  }
}