Program: 30528
Project: 30528
Buggy source:
@Override protected void handleMouseClick(Slot slot,int slotIdx,int ctrlDown,int key){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  if (slot instanceof SlotFake) {
    InventoryAction action=null;
    action=ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
    if (action != null) {
      try {
        PacketInventoryAction p=new PacketInventoryAction(action,slotIdx,0);
        NetworkHandler.instance.sendToServer(p);
      }
 catch (      IOException e) {
        AELog.error(e);
      }
    }
    return;
  }
  if (slot instanceof SlotPatternTerm) {
    if (key == 6)     return;
    try {
      NetworkHandler.instance.sendToServer(((SlotPatternTerm)slot).getRequest(key == 1));
    }
 catch (    IOException e) {
      AELog.error(e);
    }
  }
 else   if (slot instanceof SlotCraftingTerm) {
    if (key == 6)     return;
    InventoryAction action=null;
    if (key == 1)     action=InventoryAction.CRAFT_SHIFT;
 else     action=ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
    if (action != null) {
      try {
        PacketInventoryAction p=new PacketInventoryAction(action,slotIdx,0);
        NetworkHandler.instance.sendToServer(p);
      }
 catch (      IOException e) {
        AELog.error(e);
      }
    }
    return;
  }
  if (Keyboard.isKeyDown(Keyboard.KEY_SPACE)) {
    if (enableSpaceClicking()) {
      IAEItemStack stack=null;
      if (slot instanceof SlotME)       stack=((SlotME)slot).getAEStack();
      try {
        int slotNum=inventorySlots.inventorySlots.size();
        if (!(slot instanceof SlotME) && slot != null)         slotNum=slot.slotNumber;
        ((AEBaseContainer)inventorySlots).setTargetStack(stack);
        PacketInventoryAction p=new PacketInventoryAction(InventoryAction.MOVE_REGION,slotNum,0);
        NetworkHandler.instance.sendToServer(p);
      }
 catch (      IOException e) {
        AELog.error(e);
      }
      return;
    }
  }
  if (slot instanceof SlotDisconnected) {
    InventoryAction action=null;
switch (key) {
case 0:
      action=ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
    break;
case 1:
  action=ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
break;
case 3:
if (player.capabilities.isCreativeMode) {
action=InventoryAction.CREATIVE_DUPLICATE;
}
break;
default :
case 4:
case 6:
}
if (action != null) {
try {
PacketInventoryAction p=new PacketInventoryAction(action,slot.getSlotIndex(),((SlotDisconnected)slot).mySlot.id);
NetworkHandler.instance.sendToServer(p);
}
 catch (IOException e) {
AELog.error(e);
}
}
return;
}
if (slot instanceof SlotME) {
InventoryAction action=null;
IAEItemStack stack=null;
switch (key) {
case 0:
action=ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
stack=((SlotME)slot).getAEStack();
if (stack != null && action == InventoryAction.PICKUP_OR_SETDOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null) action=InventoryAction.AUTOCRAFT;
break;
case 1:
action=ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
stack=((SlotME)slot).getAEStack();
break;
case 3:
stack=((SlotME)slot).getAEStack();
if (stack != null && stack.isCraftable()) action=InventoryAction.AUTOCRAFT;
 else if (player.capabilities.isCreativeMode) {
IAEItemStack slotItem=((SlotME)slot).getAEStack();
if (slotItem != null) {
action=InventoryAction.CREATIVE_DUPLICATE;
}
}
break;
default :
case 4:
case 6:
}
if (action != null) {
try {
((AEBaseContainer)inventorySlots).setTargetStack(stack);
PacketInventoryAction p=new PacketInventoryAction(action,inventorySlots.inventorySlots.size(),0);
NetworkHandler.instance.sendToServer(p);
}
 catch (IOException e) {
AELog.error(e);
}
}
return;
}
if (disableShiftClick == false && isShiftKeyDown()) {
disableShiftClick=true;
if (dbl_whichItem == null || bl_clicked != slot || dbl_clickTimer.elapsed(TimeUnit.MILLISECONDS) > 150) {
bl_clicked=slot;
dbl_clickTimer=Stopwatch.createStarted();
if (slot != null) dbl_whichItem=slot.getHasStack() ? slot.getStack().copy() : null;
 else dbl_whichItem=null;
}
 else if (dbl_whichItem != null) {
Iterator iterator=this.inventorySlots.inventorySlots.iterator();
while (iterator.hasNext()) {
Slot targetSlot=(Slot)iterator.next();
if (targetSlot != null && targetSlot.canTakeStack(this.mc.thePlayer) && targetSlot.getHasStack() && targetSlot.inventory == slot.inventory && Container.func_94527_a(targetSlot,dbl_whichItem,true)) {
this.handleMouseClick(targetSlot,targetSlot.slotNumber,ctrlDown,1);
}
}
}
disableShiftClick=false;
}
super.handleMouseClick(slot,slotIdx,ctrlDown,key);
}

Fixed version (ground truth):
@Override protected void handleMouseClick(Slot slot,int slotIdx,int ctrlDown,int key){
  EntityPlayer player=Minecraft.getMinecraft().thePlayer;
  if (slot instanceof SlotFake) {
    InventoryAction action=null;
    action=ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
    if (drag_click.size() > 1)     return;
    if (action != null) {
      try {
        PacketInventoryAction p=new PacketInventoryAction(action,slotIdx,0);
        NetworkHandler.instance.sendToServer(p);
      }
 catch (      IOException e) {
        AELog.error(e);
      }
    }
    return;
  }
  if (slot instanceof SlotPatternTerm) {
    if (key == 6)     return;
    try {
      NetworkHandler.instance.sendToServer(((SlotPatternTerm)slot).getRequest(key == 1));
    }
 catch (    IOException e) {
      AELog.error(e);
    }
  }
 else   if (slot instanceof SlotCraftingTerm) {
    if (key == 6)     return;
    InventoryAction action=null;
    if (key == 1)     action=InventoryAction.CRAFT_SHIFT;
 else     action=ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
    if (action != null) {
      try {
        PacketInventoryAction p=new PacketInventoryAction(action,slotIdx,0);
        NetworkHandler.instance.sendToServer(p);
      }
 catch (      IOException e) {
        AELog.error(e);
      }
    }
    return;
  }
  if (Keyboard.isKeyDown(Keyboard.KEY_SPACE)) {
    if (enableSpaceClicking()) {
      IAEItemStack stack=null;
      if (slot instanceof SlotME)       stack=((SlotME)slot).getAEStack();
      try {
        int slotNum=inventorySlots.inventorySlots.size();
        if (!(slot instanceof SlotME) && slot != null)         slotNum=slot.slotNumber;
        ((AEBaseContainer)inventorySlots).setTargetStack(stack);
        PacketInventoryAction p=new PacketInventoryAction(InventoryAction.MOVE_REGION,slotNum,0);
        NetworkHandler.instance.sendToServer(p);
      }
 catch (      IOException e) {
        AELog.error(e);
      }
      return;
    }
  }
  if (slot instanceof SlotDisconnected) {
    InventoryAction action=null;
switch (key) {
case 0:
      action=ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
    break;
case 1:
  action=ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
break;
case 3:
if (player.capabilities.isCreativeMode) {
action=InventoryAction.CREATIVE_DUPLICATE;
}
break;
default :
case 4:
case 6:
}
if (action != null) {
try {
PacketInventoryAction p=new PacketInventoryAction(action,slot.getSlotIndex(),((SlotDisconnected)slot).mySlot.id);
NetworkHandler.instance.sendToServer(p);
}
 catch (IOException e) {
AELog.error(e);
}
}
return;
}
if (slot instanceof SlotME) {
InventoryAction action=null;
IAEItemStack stack=null;
switch (key) {
case 0:
action=ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
stack=((SlotME)slot).getAEStack();
if (stack != null && action == InventoryAction.PICKUP_OR_SETDOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null) action=InventoryAction.AUTOCRAFT;
break;
case 1:
action=ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
stack=((SlotME)slot).getAEStack();
break;
case 3:
stack=((SlotME)slot).getAEStack();
if (stack != null && stack.isCraftable()) action=InventoryAction.AUTOCRAFT;
 else if (player.capabilities.isCreativeMode) {
IAEItemStack slotItem=((SlotME)slot).getAEStack();
if (slotItem != null) {
action=InventoryAction.CREATIVE_DUPLICATE;
}
}
break;
default :
case 4:
case 6:
}
if (action != null) {
try {
((AEBaseContainer)inventorySlots).setTargetStack(stack);
PacketInventoryAction p=new PacketInventoryAction(action,inventorySlots.inventorySlots.size(),0);
NetworkHandler.instance.sendToServer(p);
}
 catch (IOException e) {
AELog.error(e);
}
}
return;
}
if (disableShiftClick == false && isShiftKeyDown()) {
disableShiftClick=true;
if (dbl_whichItem == null || bl_clicked != slot || dbl_clickTimer.elapsed(TimeUnit.MILLISECONDS) > 150) {
bl_clicked=slot;
dbl_clickTimer=Stopwatch.createStarted();
if (slot != null) dbl_whichItem=slot.getHasStack() ? slot.getStack().copy() : null;
 else dbl_whichItem=null;
}
 else if (dbl_whichItem != null) {
Iterator iterator=this.inventorySlots.inventorySlots.iterator();
while (iterator.hasNext()) {
Slot targetSlot=(Slot)iterator.next();
if (targetSlot != null && targetSlot.canTakeStack(this.mc.thePlayer) && targetSlot.getHasStack() && targetSlot.inventory == slot.inventory && Container.func_94527_a(targetSlot,dbl_whichItem,true)) {
this.handleMouseClick(targetSlot,targetSlot.slotNumber,ctrlDown,1);
}
}
}
disableShiftClick=false;
}
super.handleMouseClick(slot,slotIdx,ctrlDown,key);
}