Program: 80752
Project: 80752
Buggy source:
public void mine(){
  if ((slots[1] == null) || (slots[2] == null) || (slots[3] == null))   return;
  if (currentBlock != null) {
    if (miningTime <= 0) {
      miningTime=0;
      Point2I currentPoint=spiral(currentColumn,pos.getX(),pos.getZ());
      BlockPos currentPosition=new BlockPos(currentPoint.getX(),currentYLevel,currentPoint.getY());
      if (miningWith != 4) {
        if (worldObj.getTileEntity(currentPosition) instanceof IInventory) {
          IInventory inv=(IInventory)worldObj.getTileEntity(currentPosition);
          for (int i=0; i < inv.getSizeInventory(); i++) {
            if (inv.getStackInSlot(i) != null) {
              addToInventory(inv.getStackInSlot(i));
              inv.setInventorySlotContents(i,null);
            }
          }
        }
        int silkTouch=0;
        if (miningWith != 1) {
          silkTouch=EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH,slots[miningWith]);
        }
        if (silkTouch > 0) {
          int i=0;
          Item item=Item.getItemFromBlock(currentBlock);
          if (item != null && item.getHasSubtypes())           i=currentBlock.getMetaFromState(worldObj.getBlockState(currentPosition));
          ItemStack addItem=new ItemStack(currentBlock,1,i);
          addToInventory(addItem);
        }
 else {
          int fortuneLevel=0;
          if (miningWith != 1) {
            fortuneLevel=EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE,slots[miningWith]);
          }
          List<ItemStack> items=currentBlock.getDrops(worldObj,currentPosition,worldObj.getBlockState(currentPosition),fortuneLevel);
          for (          ItemStack item : items) {
            addToInventory(item);
          }
        }
        if (miningWith != 1) {
          if (ToolHelper.damageTool(slots[miningWith],worldObj,currentPoint.getX(),currentYLevel,currentPoint.getY())) {
            destroyTool(miningWith);
          }
        }
      }
      worldObj.removeTileEntity(currentPosition);
      worldObj.setBlockState(currentPosition,Blocks.COBBLESTONE.getDefaultState());
      slots[1].stackSize--;
      if (slots[1].stackSize == 0) {
        slots[1]=null;
      }
      currentMineBlocks++;
      addPartialUpdate("String_Node_Str",currentMineBlocks);
      currentBlock=null;
    }
 else {
      miningTime--;
    }
  }
 else {
    if (!isDone()) {
      currentBlock=getNextBlock();
      if (currentBlock != null) {
        Point2I currentPoint=spiral(currentColumn,pos.getX(),pos.getZ());
        BlockPos currentPosition=new BlockPos(currentPoint.getX(),currentYLevel,currentPoint.getY());
        IBlockState currentBlockState=worldObj.getBlockState(currentPosition);
        if (miningWith == 4) {
          miningTime=1;
        }
 else {
          miningTime=(int)Math.ceil(currentBlock.getBlockHardness(currentBlockState,worldObj,currentPosition) * 1.5 * 20);
          if (miningWith != 1) {
            float miningSpeed=ToolHelper.getDigSpeed(slots[miningWith],currentBlockState);
            if (miningSpeed > 1) {
              int eff=EnchantmentHelper.getEnchantmentLevel(Enchantments.EFFICIENCY,slots[miningWith]);
              if (eff > 0) {
                for (int i=0; i < eff; i++) {
                  miningSpeed=miningSpeed * 1.3f;
                }
              }
            }
            miningTime=(int)Math.ceil(miningTime / miningSpeed);
          }
        }
      }
    }
  }
  if (isDone()) {
    scanBlocks();
    currentColumn=getRange();
  }
}

Fixed version (ground truth):
public void mine(){
  if ((slots[1] == null) || (slots[2] == null) || (slots[3] == null))   return;
  if (currentBlock != null) {
    if (elapsedDuration >= blockMineDuration) {
      Point2I currentPoint=spiral(currentColumn,pos.getX(),pos.getZ());
      BlockPos currentPosition=new BlockPos(currentPoint.getX(),currentYLevel,currentPoint.getY());
      Block testBlock=worldObj.getBlockState(currentPosition).getBlock();
      if (testBlock != currentBlock) {
        currentBlock=testBlock;
        miningWith=canMineBlock(currentPosition.getX(),currentPosition.getY(),currentPosition.getZ());
        if (miningWith == -1) {
          miningWith=2;
        }
        blockMineDuration=miningDuration(currentPosition,miningWith);
        if (elapsedDuration < blockMineDuration) {
          elapsedDuration++;
          return;
        }
      }
      if (miningWith != 4) {
        if (worldObj.getTileEntity(currentPosition) instanceof IInventory) {
          IInventory inv=(IInventory)worldObj.getTileEntity(currentPosition);
          for (int i=0; i < inv.getSizeInventory(); i++) {
            if (inv.getStackInSlot(i) != null) {
              addToInventory(inv.getStackInSlot(i));
              inv.setInventorySlotContents(i,null);
            }
          }
        }
        int silkTouch=0;
        if (miningWith != 1) {
          silkTouch=EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH,slots[miningWith]);
        }
        if (silkTouch > 0) {
          int i=0;
          Item item=Item.getItemFromBlock(currentBlock);
          if (item != null && item.getHasSubtypes())           i=currentBlock.getMetaFromState(worldObj.getBlockState(currentPosition));
          ItemStack addItem=new ItemStack(currentBlock,1,i);
          addToInventory(addItem);
        }
 else {
          int fortuneLevel=0;
          if (miningWith != 1) {
            fortuneLevel=EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE,slots[miningWith]);
          }
          List<ItemStack> items=currentBlock.getDrops(worldObj,currentPosition,worldObj.getBlockState(currentPosition),fortuneLevel);
          for (          ItemStack item : items) {
            addToInventory(item);
          }
        }
        if (miningWith != 1) {
          if (ToolHelper.damageTool(slots[miningWith],worldObj,currentPoint.getX(),currentYLevel,currentPoint.getY())) {
            destroyTool(miningWith);
          }
        }
      }
      worldObj.removeTileEntity(currentPosition);
      worldObj.setBlockState(currentPosition,Blocks.COBBLESTONE.getDefaultState());
      slots[1].stackSize--;
      if (slots[1].stackSize == 0) {
        slots[1]=null;
      }
      currentMineBlocks++;
      addPartialUpdate("String_Node_Str",currentMineBlocks);
      currentBlock=null;
      elapsedDuration=0;
    }
 else {
      elapsedDuration++;
    }
  }
 else {
    if (!isDone()) {
      currentBlock=getNextBlock();
      if (currentBlock != null) {
        Point2I currentPoint=spiral(currentColumn,pos.getX(),pos.getZ());
        BlockPos currentPosition=new BlockPos(currentPoint.getX(),currentYLevel,currentPoint.getY());
        blockMineDuration=miningDuration(currentPosition,miningWith);
      }
    }
  }
  if (isDone()) {
    scanBlocks();
    currentColumn=getRange();
  }
}