Program: 156989
Project: 156989
Buggy source:
@Override public void updateEntity(){
  if (internalPlayer == null) {
    internalInventoryCrafting=new InternalInventoryCrafting();
    internalPlayer=new InternalPlayer();
    craftSlot=new SlotCrafting(internalPlayer,internalInventoryCrafting,craftResult,0,0,0);
    updateCraftingResults();
  }
  if (!CoreProxy.proxy.isSimulating(worldObj))   return;
  tick++;
  tick=tick % recentEnergy.length;
  recentEnergy[tick]=0.0f;
  while (storedEnergy >= getRequiredEnergy() && craftResult.getStackInSlot(0) != null) {
    ItemStack[] tempStorage=Arrays.copyOf(storageSlots,storageSlots.length);
    internalInventoryCrafting.tempStacks=tempStorage;
    internalInventoryCrafting.hitCount=new int[27];
    for (int j=0; j < craftingSlots.getSizeInventory(); j++) {
      if (craftingSlots.getStackInSlot(j) == null) {
        internalInventoryCrafting.bindings[j]=-1;
        continue;
      }
      boolean matchedStorage=false;
      for (int i=0; i < tempStorage.length; i++) {
        if (tempStorage[i] != null && craftingSlots.getStackInSlot(j).isItemEqual(tempStorage[i]) && internalInventoryCrafting.hitCount[i] < tempStorage[i].stackSize && internalInventoryCrafting.hitCount[i] < tempStorage[i].getMaxStackSize()) {
          internalInventoryCrafting.bindings[j]=i;
          internalInventoryCrafting.hitCount[i]++;
          matchedStorage=true;
          break;
        }
      }
      if (!matchedStorage) {
        craftable=false;
        internalInventoryCrafting.tempStacks=null;
        internalInventoryCrafting.hitCount=null;
        return;
      }
    }
    craftSlot.onPickupFromSlot(internalPlayer,craftResult.getStackInSlot(0));
    for (int i=0; i < tempStorage.length; i++) {
      if (tempStorage[i] != null && tempStorage[i].stackSize <= 0) {
        tempStorage[i]=null;
      }
    }
    storageSlots=tempStorage;
    storedEnergy-=getRequiredEnergy();
    List<ItemStack> outputs=Lists.newArrayList(craftResult.getStackInSlot(0).copy());
    for (int i=0; i < internalPlayer.inventory.mainInventory.length; i++) {
      if (internalPlayer.inventory.mainInventory[i] != null) {
        outputs.add(internalPlayer.inventory.mainInventory[i]);
        internalPlayer.inventory.mainInventory[i]=null;
      }
    }
    for (    ItemStack output : outputs) {
      boolean putToPipe=Utils.addToRandomPipeEntry(this,ForgeDirection.UP,output);
      if (!putToPipe) {
        for (int i=0; i < storageSlots.length; i++) {
          if (output.stackSize <= 0) {
            break;
          }
          if (storageSlots[i] != null && output.isStackable() && output.isItemEqual(storageSlots[i])) {
            storageSlots[i].stackSize+=output.stackSize;
            if (storageSlots[i].stackSize > output.getMaxStackSize()) {
              output.stackSize=storageSlots[i].stackSize - output.getMaxStackSize();
              storageSlots[i].stackSize=output.getMaxStackSize();
            }
 else {
              output.stackSize=0;
            }
          }
 else           if (storageSlots[i] == null) {
            storageSlots[i]=output.copy();
            output.stackSize=0;
          }
        }
        if (output.stackSize > 0) {
          output=Utils.addToRandomInventory(output,worldObj,xCoord,yCoord,zCoord,ForgeDirection.UNKNOWN);
        }
        if (output.stackSize > 0) {
          Utils.dropItems(worldObj,output,xCoord,yCoord,zCoord);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  if (internalPlayer == null) {
    internalInventoryCrafting=new InternalInventoryCrafting();
    internalPlayer=new InternalPlayer();
    craftSlot=new SlotCrafting(internalPlayer,internalInventoryCrafting,craftResult,0,0,0);
    updateCraftingResults();
  }
  if (!CoreProxy.proxy.isSimulating(worldObj))   return;
  updateCraftingResults();
  tick++;
  tick=tick % recentEnergy.length;
  recentEnergy[tick]=0.0f;
  while (storedEnergy >= getRequiredEnergy() && craftResult.getStackInSlot(0) != null) {
    ItemStack[] tempStorage=Arrays.copyOf(storageSlots,storageSlots.length);
    internalInventoryCrafting.tempStacks=tempStorage;
    internalInventoryCrafting.hitCount=new int[27];
    for (int j=0; j < craftingSlots.getSizeInventory(); j++) {
      if (craftingSlots.getStackInSlot(j) == null) {
        internalInventoryCrafting.bindings[j]=-1;
        continue;
      }
      boolean matchedStorage=false;
      for (int i=0; i < tempStorage.length; i++) {
        if (tempStorage[i] != null && craftingSlots.getStackInSlot(j).isItemEqual(tempStorage[i]) && internalInventoryCrafting.hitCount[i] < tempStorage[i].stackSize && internalInventoryCrafting.hitCount[i] < tempStorage[i].getMaxStackSize()) {
          internalInventoryCrafting.bindings[j]=i;
          internalInventoryCrafting.hitCount[i]++;
          matchedStorage=true;
          break;
        }
      }
      if (!matchedStorage) {
        craftable=false;
        internalInventoryCrafting.tempStacks=null;
        internalInventoryCrafting.hitCount=null;
        return;
      }
    }
    craftSlot.onPickupFromSlot(internalPlayer,craftResult.getStackInSlot(0));
    for (int i=0; i < tempStorage.length; i++) {
      if (tempStorage[i] != null && tempStorage[i].stackSize <= 0) {
        tempStorage[i]=null;
      }
    }
    storageSlots=tempStorage;
    storedEnergy-=getRequiredEnergy();
    List<ItemStack> outputs=Lists.newArrayList(craftResult.getStackInSlot(0).copy());
    for (int i=0; i < internalPlayer.inventory.mainInventory.length; i++) {
      if (internalPlayer.inventory.mainInventory[i] != null) {
        outputs.add(internalPlayer.inventory.mainInventory[i]);
        internalPlayer.inventory.mainInventory[i]=null;
      }
    }
    for (    ItemStack output : outputs) {
      boolean putToPipe=Utils.addToRandomPipeEntry(this,ForgeDirection.UP,output);
      if (!putToPipe) {
        for (int i=0; i < storageSlots.length; i++) {
          if (output.stackSize <= 0) {
            break;
          }
          if (storageSlots[i] != null && output.isStackable() && output.isItemEqual(storageSlots[i])) {
            storageSlots[i].stackSize+=output.stackSize;
            if (storageSlots[i].stackSize > output.getMaxStackSize()) {
              output.stackSize=storageSlots[i].stackSize - output.getMaxStackSize();
              storageSlots[i].stackSize=output.getMaxStackSize();
            }
 else {
              output.stackSize=0;
            }
          }
 else           if (storageSlots[i] == null) {
            storageSlots[i]=output.copy();
            output.stackSize=0;
          }
        }
        if (output.stackSize > 0) {
          output=Utils.addToRandomInventory(output,worldObj,xCoord,yCoord,zCoord,ForgeDirection.UNKNOWN);
        }
        if (output.stackSize > 0) {
          Utils.dropItems(worldObj,output,xCoord,yCoord,zCoord);
        }
      }
    }
  }
}