Program: 30818
Project: 30818
Buggy source:
public void doAction(EntityPlayerMP player,InventoryAction action,int slot,IAEItemStack slotItem){
  if (slot >= 0 && slot < inventorySlots.size()) {
    Slot s=getSlot(slot);
    if (s instanceof SlotCraftingTerm) {
switch (action) {
case CRAFT_SHIFT:
case CRAFT_ITEM:
case CRAFT_STACK:
        ((SlotCraftingTerm)s).doClick(action,player);
default :
    }
  }
  if (s instanceof SlotFake) {
    ItemStack hand=player.inventory.getItemStack();
switch (action) {
case PICKUP_OR_SETDOWN:
      if (hand == null)       s.putStack(null);
 else       s.putStack(hand.copy());
    break;
case SPLIT_OR_PLACESINGLE:
  ItemStack is=s.getStack();
if (is != null) {
  if (hand == null)   is.stackSize--;
 else   if (hand.isItemEqual(is))   is.stackSize=Math.min(is.getMaxStackSize(),is.stackSize + 1);
 else {
    is=hand.copy();
    is.stackSize=1;
  }
  s.putStack(is);
}
 else if (hand != null) {
  is=hand.copy();
  is.stackSize=1;
  s.putStack(is);
}
break;
case CREATIVE_DUPLICATE:
case MOVE_REGION:
case SHIFT_CLICK:
default :
break;
}
}
return;
}
switch (action) {
case SHIFT_CLICK:
if (powerSrc == null || cellInv == null) return;
if (slotItem != null) {
IAEItemStack ais=slotItem.copy();
ItemStack myItem=ais.getItemStack();
ais.setStackSize(myItem.getMaxStackSize());
InventoryAdaptor adp=InventoryAdaptor.getAdaptor(player.inventory,ForgeDirection.UNKNOWN);
myItem.stackSize=(int)ais.getStackSize();
myItem=adp.simulateAdd(myItem);
if (myItem != null) ais.setStackSize(ais.getStackSize() - myItem.stackSize);
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
if (ais != null) adp.addItems(ais.getItemStack());
}
break;
case PICKUP_SINGLE:
if (powerSrc == null || cellInv == null) return;
if (slotItem != null) {
int liftQty=1;
ItemStack isg=player.inventory.getItemStack();
if (isg != null) {
if (isg.stackSize >= isg.getMaxStackSize()) liftQty=0;
if (!Platform.isSameItem(slotItem.getItemStack(),isg)) liftQty=0;
}
if (liftQty > 0) {
IAEItemStack ais=slotItem.copy();
ais.setStackSize(1);
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
InventoryAdaptor ia=new AdaptorPlayerHand(player);
ItemStack fail=ia.addItems(ais.getItemStack());
if (fail != null) cellInv.injectItems(ais,Actionable.MODULATE,mySrc);
player.updateHeldItem();
}
}
break;
case PICKUP_OR_SETDOWN:
if (powerSrc == null || cellInv == null) return;
if (player.inventory.getItemStack() == null) {
if (slotItem != null) {
IAEItemStack ais=slotItem.copy();
ais.setStackSize(ais.getItemStack().getMaxStackSize());
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
if (ais != null) player.inventory.setItemStack(ais.getItemStack());
 else player.inventory.setItemStack(null);
player.updateHeldItem();
}
}
 else {
IAEItemStack ais=AEApi.instance().storage().createItemStack(player.inventory.getItemStack());
ais=Platform.poweredInsert(powerSrc,cellInv,ais,mySrc);
if (ais != null) player.inventory.setItemStack(ais.getItemStack());
 else player.inventory.setItemStack(null);
player.updateHeldItem();
}
break;
case SPLIT_OR_PLACESINGLE:
if (powerSrc == null || cellInv == null) return;
if (player.inventory.getItemStack() == null) {
if (slotItem != null) {
IAEItemStack ais=slotItem.copy();
long stackSize=Math.min(ais.getItemStack().getMaxStackSize(),ais.getStackSize());
ais.setStackSize((stackSize + 1) >> 1);
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
if (ais != null) player.inventory.setItemStack(ais.getItemStack());
 else player.inventory.setItemStack(null);
player.updateHeldItem();
}
}
 else {
IAEItemStack ais=AEApi.instance().storage().createItemStack(player.inventory.getItemStack());
ais.setStackSize(1);
ais=Platform.poweredInsert(powerSrc,cellInv,ais,mySrc);
if (ais == null) {
ItemStack is=player.inventory.getItemStack();
is.stackSize--;
if (is.stackSize <= 0) player.inventory.setItemStack(null);
player.updateHeldItem();
}
}
break;
case CREATIVE_DUPLICATE:
if (player.capabilities.isCreativeMode && slotItem != null) {
ItemStack is=slotItem.getItemStack();
is.stackSize=is.getMaxStackSize();
player.inventory.setItemStack(is);
player.updateHeldItem();
}
break;
case MOVE_REGION:
break;
default :
break;
}
}

Fixed version (ground truth):
public void doAction(EntityPlayerMP player,InventoryAction action,int slot,IAEItemStack slotItem){
  if (slot >= 0 && slot < inventorySlots.size()) {
    Slot s=getSlot(slot);
    if (s instanceof SlotCraftingTerm) {
switch (action) {
case CRAFT_SHIFT:
case CRAFT_ITEM:
case CRAFT_STACK:
        ((SlotCraftingTerm)s).doClick(action,player);
default :
    }
  }
  if (s instanceof SlotFake) {
    ItemStack hand=player.inventory.getItemStack();
switch (action) {
case PICKUP_OR_SETDOWN:
      if (hand == null)       s.putStack(null);
 else       s.putStack(hand.copy());
    break;
case SPLIT_OR_PLACESINGLE:
  ItemStack is=s.getStack();
if (is != null) {
  if (hand == null)   is.stackSize--;
 else   if (hand.isItemEqual(is))   is.stackSize=Math.min(is.getMaxStackSize(),is.stackSize + 1);
 else {
    is=hand.copy();
    is.stackSize=1;
  }
  s.putStack(is);
}
 else if (hand != null) {
  is=hand.copy();
  is.stackSize=1;
  s.putStack(is);
}
break;
case CREATIVE_DUPLICATE:
case MOVE_REGION:
case SHIFT_CLICK:
default :
break;
}
}
return;
}
switch (action) {
case SHIFT_CLICK:
if (powerSrc == null || cellInv == null) return;
if (slotItem != null) {
IAEItemStack ais=slotItem.copy();
ItemStack myItem=ais.getItemStack();
ais.setStackSize(myItem.getMaxStackSize());
InventoryAdaptor adp=InventoryAdaptor.getAdaptor(player.inventory,ForgeDirection.UNKNOWN);
myItem.stackSize=(int)ais.getStackSize();
myItem=adp.simulateAdd(myItem);
if (myItem != null) ais.setStackSize(ais.getStackSize() - myItem.stackSize);
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
if (ais != null) adp.addItems(ais.getItemStack());
}
break;
case PICKUP_SINGLE:
if (powerSrc == null || cellInv == null) return;
if (slotItem != null) {
int liftQty=1;
ItemStack isg=player.inventory.getItemStack();
if (isg != null) {
if (isg.stackSize >= isg.getMaxStackSize()) liftQty=0;
if (!Platform.isSameItem(slotItem.getItemStack(),isg)) liftQty=0;
}
if (liftQty > 0) {
IAEItemStack ais=slotItem.copy();
ais.setStackSize(1);
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
InventoryAdaptor ia=new AdaptorPlayerHand(player);
ItemStack fail=ia.addItems(ais.getItemStack());
if (fail != null) cellInv.injectItems(ais,Actionable.MODULATE,mySrc);
updateHeld(player);
}
}
break;
case PICKUP_OR_SETDOWN:
if (powerSrc == null || cellInv == null) return;
if (player.inventory.getItemStack() == null) {
if (slotItem != null) {
IAEItemStack ais=slotItem.copy();
ais.setStackSize(ais.getItemStack().getMaxStackSize());
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
if (ais != null) player.inventory.setItemStack(ais.getItemStack());
 else player.inventory.setItemStack(null);
updateHeld(player);
}
}
 else {
IAEItemStack ais=AEApi.instance().storage().createItemStack(player.inventory.getItemStack());
ais=Platform.poweredInsert(powerSrc,cellInv,ais,mySrc);
if (ais != null) player.inventory.setItemStack(ais.getItemStack());
 else player.inventory.setItemStack(null);
updateHeld(player);
}
break;
case SPLIT_OR_PLACESINGLE:
if (powerSrc == null || cellInv == null) return;
if (player.inventory.getItemStack() == null) {
if (slotItem != null) {
IAEItemStack ais=slotItem.copy();
long stackSize=Math.min(ais.getItemStack().getMaxStackSize(),ais.getStackSize());
ais.setStackSize((stackSize + 1) >> 1);
ais=Platform.poweredExtraction(powerSrc,cellInv,ais,mySrc);
if (ais != null) player.inventory.setItemStack(ais.getItemStack());
 else player.inventory.setItemStack(null);
updateHeld(player);
}
}
 else {
IAEItemStack ais=AEApi.instance().storage().createItemStack(player.inventory.getItemStack());
ais.setStackSize(1);
ais=Platform.poweredInsert(powerSrc,cellInv,ais,mySrc);
if (ais == null) {
ItemStack is=player.inventory.getItemStack();
is.stackSize--;
if (is.stackSize <= 0) player.inventory.setItemStack(null);
updateHeld(player);
}
}
break;
case CREATIVE_DUPLICATE:
if (player.capabilities.isCreativeMode && slotItem != null) {
ItemStack is=slotItem.getItemStack();
is.stackSize=is.getMaxStackSize();
player.inventory.setItemStack(is);
updateHeld(player);
}
break;
case MOVE_REGION:
break;
default :
break;
}
}