Buggy code:
if ( ( secondSlot != null ) && ( ( secondSlot . stackSize ) > ( secondSlot . getMaxStackSize ( ) ) ) ) return ; ItemStack container = this . inventory . getStackInSlot ( 0 ) ; if ( container == null ) doNextFill = false ; if ( ! ( GasUtil . isGasContainer ( container ) ) ) return ; if ( ( this . monitor ) == null ) return ; GasStack gasStack = GasUtil . getGasFromContainer ( container ) ; container = container . copy ( ) ; container . stackSize = 1 ; if ( ( GasUtil . isEmpty ( container ) ) || ( ( ( ( gasStack . amount ) < ( GasUtil . getCapacity ( container ) ) ) && ( ( GasUtil . getFluidStack ( gasStack ) . getFluid ( ) ) == ( this . selectedFluid ) ) ) && ( doNextFill ) ) ) { if ( ( this . selectedFluid ) == null ) return ; int capacity = GasUtil . getCapacity ( container ) ; IAEFluidStack result = this . monitor . extractItems ( FluidUtil . createAEFluidStack ( this . selectedFluid , capacity ) , SIMULATE , new appeng . api . networking . security . PlayerSource ( this . player , null ) ) ; int proposedAmount = ( result == null ) ? 0 : gasStack == null ? ( ( int ) ( Math . min ( capacity , result . getStackSize ( ) ) ) ) : ( ( int ) ( Math . min ( ( capacity - ( gasStack . amount ) ) , result . getStackSize ( ) ) ) ) ; MutablePair < Integer , ItemStack > filledContainer = GasUtil . fillStack ( container , GasUtil . getGasStack ( new net . minecraftforge . fluids . FluidStack ( this . selectedFluid , proposedAmount ) ) ) ; GasStack gasStack2 = GasUtil . getGasFromContainer ( filledContainer . getRight ( ) ) ; if ( ( ( container . stackSize ) == 1 ) && ( ( gasStack2 . amount ) < ( GasUtil . getCapacity ( filledContainer . getRight ( ) ) ) ) ) { this . inventory . setInventorySlotContents ( 0 , filledContainer . getRight ( ) ) ; monitor . extractItems ( FluidUtil . createAEFluidStack ( this . selectedFluid , filledContainer . getLeft ( ) ) , MODULATE , new appeng . api . networking . security . PlayerSource ( this . player , null ) ) ; doNextFill = true ; } else if ( fillSecondSlot ( filledContainer . getRight ( ) ) ) { monitor . extractItems ( FluidUtil . createAEFluidStack ( this . selectedFluid , filledContainer . getLeft ( ) ) , MODULATE , new appeng . api . networking . security . PlayerSource ( this . player , null ) ) ; decreaseFirstSlot ( ) ; doNextFill = false ; } } else if ( GasUtil . isFilled ( container ) ) { GasStack containerGas = GasUtil . getGasFromContainer ( container ) ; MutablePair < Integer , ItemStack > drainedContainer = GasUtil . drainStack ( container . copy ( ) , containerGas ) ; GasStack gasStack1 = containerGas . copy ( ) ; gasStack1 . amount = drainedContainer . getLeft ( ) ; IAEFluidStack notInjected = this . monitor . injectItems ( GasUtil . createAEFluidStack ( gasStack1 ) , SIMULATE , new appeng . api . networking . security . PlayerSource ( this . player , null ) ) ; if ( notInjected != null ) return ; if ( ( this . handler ) != null ) { if ( ! ( this . handler . hasPower ( this . player , 20.0 , this . player . getCurrentEquippedItem ( ) ) ) ) { return ; } this . handler . usePower ( this . player , 20.0 , this . player . getCurrentEquippedItem ( ) ) ; } else if ( ( this . storageCell ) != null ) { if ( ! ( this . storageCell . hasPower ( this . player , 20.0 , this . player . getCurrentEquippedItem ( ) ) ) ) { return ; } this . storageCell . usePower ( this . player , 20.0 , this . player . getCurrentEquippedItem ( ) ) ; } ItemStack emptyContainer = drainedContainer . getRight ( ) ; if ( ( ( emptyContainer != null ) && ( ( GasUtil . getGasFromContainer ( emptyContainer ) ) != null ) ) && ( ( emptyContainer . stackSize ) == 1 ) ) { <START_BUG> monitor . injectItems ( GasUtil . createAEFluidStack ( gasStack ) , MODULATE , new appeng . api . networking . security . PlayerSource ( this . player , null ) ) ; <END_BUG> this . inventory . setInventorySlotContents ( 0 , emptyContainer ) ; } if ( ( emptyContainer == null ) || ( fillSecondSlot ( drainedContainer . getRight ( ) ) ) ) { monitor . injectItems ( GasUtil . createAEFluidStack ( containerGas ) , MODULATE , new appeng . api . networking . security . PlayerSource ( this . player , null ) ) ; decreaseFirstSlot ( ) ; } } } public boolean fillSecondSlot ( ItemStack itemStack ) { } public void forceFluidUpdate ( ) { } public IItemList < IAEFluidStack > getFluidStackList ( ) { } public EntityPlayer getPlayer ( ) { } public Fluid getSelectedFluid ( ) { } public IAEFluidStack getSelectedFluidStack ( ) { } public boolean hasWirelessTermHandler ( ) { } @ Override public boolean isValid ( Object verificationToken ) { } @ Override public void onContainerClosed ( EntityPlayer entityPlayer ) { } @ Override public void onInventoryChanged ( ) { } @ Override public void onListUpdate ( ) { } @ Override public void postChange ( IBaseMonitor < IAEFluidStack > monitor , Iterable < IAEFluidStack > change , BaseActionSource actionSource ) { }

Fix:
monitor . injectItems ( GasUtil . createAEFluidStack ( gasStack1 ) , MODULATE , new appeng . api . networking . security . PlayerSource ( this . player , null ) ) ;