Program: 34895
Project: 34895
Buggy source:
public void updateEntity(){
  super.updateEntity();
  if (worldObj.isRemote)   return;
  if (data.moved) {
    data.afterMoveCheck(worldObj);
    worldObj.scheduleBlockUpdate(xCoord,yCoord,zCoord,worldObj.getBlock(xCoord,yCoord,zCoord),80);
  }
  sync();
  if (valve && upgrades.getUpgrades().contains(EnumMachineUpgrades.AUTO_OUTPUT)) {
    if (master == null)     findMaster();
    if (master == null)     return;
    for (    ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
      Location location=new Location(this).move(direction);
      TileEntity entity=location.getTileEntity();
      if (entity != null && entity instanceof IFluidHandler && !(entity instanceof TileRefinery)) {
        IFluidHandler tank=(IFluidHandler)entity;
        master.drain(direction,tank.fill(direction.getOpposite(),new FluidStack(master.output.getFluidType(),100),true),true);
      }
    }
  }
  if (!data.isMaster)   return;
  if (input.getFluid() != null && input.getFluid().amount <= 0)   input.setFluid(null);
  if (output.getFluid() != null && output.getFluid().amount <= 0)   output.setFluid(null);
  if (input.getFluid() == null)   updateRecipe();
  updateHeat();
  energyCost=(input.getFluid() == null || isCooling || energy < (int)(50 + (50 * ((double)currentHeat / 100)))) ? 0 : (int)(50 + (50 * ((double)currentHeat / 100)));
  energy-=energyCost;
  if (currentHeat < requiredHeat) {
    return;
  }
  if (energyCost == 0 || input.isEmpty() || output.isFull() || !input.getFluid().isFluidEqual(inputFluidStack) || input.getFluidAmount() < inputFluidStack.amount || (!output.isEmpty() && !output.getFluid().isFluidEqual(outputFluidStack)) || output.getCapacity() - output.getFluidAmount() < outputFluidStack.amount)   return;
  input.drain(inputFluidStack.amount,true);
  output.fill(outputFluidStack,true);
}

Fixed version (ground truth):
public void updateEntity(){
  super.updateEntity();
  if (worldObj.isRemote)   return;
  if (data.moved) {
    data.afterMoveCheck(worldObj);
    worldObj.scheduleBlockUpdate(xCoord,yCoord,zCoord,worldObj.getBlock(xCoord,yCoord,zCoord),80);
  }
  sync();
  if (valve && upgrades.getUpgrades().contains(EnumMachineUpgrades.AUTO_OUTPUT)) {
    if (master == null)     findMaster();
    if (master == null)     return;
    for (    ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
      Location location=new Location(this).move(direction);
      TileEntity entity=location.getTileEntity();
      if (entity != null && entity instanceof IFluidHandler && !(entity instanceof TileRefinery) && master.output.getFluidType() != null) {
        IFluidHandler tank=(IFluidHandler)entity;
        int drain=tank.fill(direction.getOpposite(),new FluidStack(master.output.getFluidType(),100),false);
        FluidStack stack=master.drain(direction,drain,true);
        tank.fill(direction.getOpposite(),stack,true);
      }
    }
  }
  if (!data.isMaster)   return;
  if (input.getFluid() != null && input.getFluid().amount <= 0)   input.setFluid(null);
  if (output.getFluid() != null && output.getFluid().amount <= 0)   output.setFluid(null);
  if (input.getFluid() == null)   updateRecipe();
  updateHeat();
  energyCost=(input.getFluid() == null || isCooling || energy < (int)(50 + (50 * ((double)currentHeat / 100)))) ? 0 : (int)(50 + (50 * ((double)currentHeat / 100)));
  energy-=energyCost;
  if (currentHeat < requiredHeat) {
    return;
  }
  if (energyCost == 0 || input.isEmpty() || output.isFull() || !input.getFluid().isFluidEqual(inputFluidStack) || input.getFluidAmount() < inputFluidStack.amount || (!output.isEmpty() && !output.getFluid().isFluidEqual(outputFluidStack)) || output.getCapacity() - output.getFluidAmount() < outputFluidStack.amount)   return;
  input.drain(inputFluidStack.amount,true);
  output.fill(outputFluidStack,true);
}