Buggy code:
public class TileTradeStation extends TileEntity implements IInventory , ISidedInventory { private ItemStack [ ] inventory = new ItemStack [ 4 ] ; public static final int itemInputSlot = 0 ; public static final int itemOutputSlot = 1 ; public static final int itemCardSlot = 2 ; public static final int itemCoinSlot = 3 ; private static final int [ ] multiplier = new int [ ] { 1 , 9 , 81 , 729 , 6561 } ; private static final Item [ ] coins = new Item [ ] { proxy . itemCoin , proxy . itemSmallCoinStack , proxy . itemLargeCoinStack , proxy . itemSmallCoinBag , proxy . itemLargeCoinBag } ; public int coinSum = 0 ; public int itemPrice = 0 ; public boolean buyButtonActive = false ; public boolean sellButtonActive = false ; public boolean coinButtonActive = false ; public boolean isSStackButtonActive = false ; public boolean isLStackButtonActive = false ; public boolean isSBagButtonActive = false ; public boolean isLBagButtonActive = false ; public boolean autoModeButtonActive = UniversalCoins . autoModeEnabled ; private static final int [ ] slots_top = new int [ ] { 0 , 1 , 2 , 3 } ; private static final int [ ] slots_bottom = new int [ ] { 0 , 1 , 2 , 3 } ; private static final int [ ] slots_sides = new int [ ] { 0 , 1 , 2 , 3 } ; public int autoMode = 0 ; private int lastAutoMode = 0 ; public int coinMode = 0 ; private int lastCoinMode = 0 ; public String customName ; private boolean inUse ; public TileTradeStation ( ) { } @ Override public void updateEntity ( ) { } private void activateBuySellButtons ( ) { } private void activateRetrieveButtons ( ) { } public void onSellPressed ( ) { } public void onSellPressed ( int amount ) { } public void onSellMaxPressed ( ) { } public void onBuyPressed ( ) { } public void onBuyPressed ( int amount ) { } public void onBuyMaxPressed ( ) { } public void onAutoModeButtonPressed ( ) { } public void onCoinModeButtonPressed ( ) { } public void runAutoMode ( ) { } public void runCoinMode ( ) { } public void onRetrieveButtonsPressed ( int buttonClickedID , boolean shiftPressed ) { } @ Override public void readFromNBT ( NBTTagCompound tagCompound ) { } @ Override public void writeToNBT ( NBTTagCompound tagCompound ) { } public void updateTE ( ) { } @ Override public Packet getDescriptionPacket ( ) { } public void sendPacket ( int button , boolean shiftPressed ) { } @ Override public void openInventory ( ) { } @ Override public void closeInventory ( ) { } @ Override public int getSizeInventory ( ) { } public String getInventoryName ( ) { } public void setInventoryName ( String name ) { } public boolean isInventoryNameLocalized ( ) { } @ Override public boolean hasCustomInventoryName ( ) { } @ Override public int getInventoryStackLimit ( ) { } @ Override public ItemStack getStackInSlot ( int i ) { } @ Override public ItemStack decrStackSize ( int slot , int size ) { } @ Override public ItemStack getStackInSlotOnClosing ( int i ) { } @ Override public void setInventorySlotContents ( int slot , ItemStack stack ) { inventory [ slot ] = stack ; if ( stack != null ) { if ( ( slot == ( TileTradeStation . itemCoinSlot ) ) || ( slot == ( TileTradeStation . itemInputSlot ) ) ) { int coinType = getCoinType ( stack . getItem ( ) ) ; if ( coinType != ( - 1 ) ) { int itemValue = TileTradeStation . multiplier [ coinType ] ; int depositAmount = Math . min ( stack . stackSize , ( ( ( Integer . MAX_VALUE ) - ( coinSum ) ) // itemValue ) ) ; <START_BUG> if ( ( ( inventory [ TileTradeStation . itemCardSlot ] . getItem ( ) ) == ( proxy . itemEnderCard ) ) && ( ( ( getAccountBalance ( ) ) + ( ( itemPrice ) * depositAmount ) ) < ( Integer . MAX_VALUE ) ) ) { <END_BUG> creditAccount ( ( depositAmount * itemValue ) ) ; } else { coinSum += depositAmount * itemValue ; } inventory [ slot ] . stackSize -= depositAmount ; if ( ( inventory [ slot ] . stackSize ) == 0 ) { inventory [ slot ] = null ; } } } } } private int getCoinType ( Item item ) { } @ Override public boolean isUseableByPlayer ( EntityPlayer entityplayer ) { } @ Override public boolean isItemValidForSlot ( int slot , ItemStack itemstack ) { } @ Override public int [ ] getAccessibleSlotsFromSide ( int var1 ) { } @ Override public boolean canInsertItem ( int var1 , ItemStack var2 , int var3 ) { } @ Override public boolean canExtractItem ( int var1 , ItemStack var2 , int var3 ) { } public int getAccountBalance ( ) { } public void debitAccount ( int amount ) { } public void creditAccount ( int amount ) { } private void setWorldData ( String tag , int data ) { } private int getWorldInt ( String tag ) { } private String getWorldString ( String tag ) { } }

Fix:
if ( ( ( ( inventory [ TileTradeStation . itemCardSlot ] ) != null ) && ( ( inventory [ TileTradeStation . itemCardSlot ] . getItem ( ) ) == ( proxy . itemEnderCard ) ) ) && ( ( ( getAccountBalance ( ) ) + ( ( itemPrice ) * depositAmount ) ) < ( Integer . MAX_VALUE ) ) ) {