Buggy code:
public class AnyKeyboardView extends AnyKeyboardBaseView { private static final int DELAY_BEFORE_POPPING_UP_EXTENSION_KBD = 35 ; private static final String TAG = "AnyKeyboardView" ; private boolean mExtensionVisible = false ; private final int mExtensionKeyboardYActivationPoint ; private final int mExtensionKeyboardPopupOffset ; private final int mExtensionKeyboardYDismissPoint ; private Key mExtensionKey ; private Key mUtilityKey ; private Key mSpaceBarKey = null ; private Point mFirstTouchPoint = new Point ( 0 , 0 ) ; private boolean mIsFirstDownEventInsideSpaceBar = false ; private Animation mInAnimation ; private TextView mPreviewText ; private float mGesturePreviewTextSize ; private int mGesturePreviewTextColor ; private int mGesturePreviewTextColorRed ; private int mGesturePreviewTextColorGreen ; private int mGesturePreviewTextColorBlue ; public AnyKeyboardView ( Context context , AttributeSet attrs ) { } public AnyKeyboardView ( Context context , AttributeSet attrs , int defStyle ) { } @ Override protected ViewGroup inflatePreviewWindowLayout ( LayoutInflater inflate ) { } @ Override protected KeyDetector createKeyDetector ( final float slide ) { } public void setKeyboardSwitcher ( KeyboardSwitcher switcher ) { } @ Override public void setKeyboard ( AnyKeyboard newKeyboard , float verticalCorrection ) { } @ Override public boolean setValueFromTheme ( TypedArray remoteTypedArray , int [ ] padding , int localAttrId , int remoteTypedArrayIndex ) { } @ Override protected int getKeyboardStyleResId ( KeyboardTheme theme ) { } @ Override protected final boolean isFirstDownEventInsideSpaceBar ( ) { } private boolean invokeOnKey ( int primaryCode , Key key , int multiTapIndex ) { } public boolean setShiftLocked ( boolean shiftLocked ) { } @ Override protected boolean onLongPress ( Context packageContext , Key key , boolean isSticky , boolean requireSlideInto ) { if ( ( key != null ) && ( key instanceof AnyKey ) ) { AnyKey anyKey = ( ( AnyKey ) ( key ) ) ; if ( ( anyKey . longPressCode ) != 0 ) { invokeOnKey ( anyKey . longPressCode , anyKey , 0 ) ; return true ; } else if ( ( anyKey . codes [ 0 ] ) == ( KeyCodes . QUICK_TEXT ) ) { <START_BUG> invokeOnKey ( QUICK_TEXT_POPUP , null , 0 ) ; <END_BUG> return true ; } } if ( ( mAnimationLevel ) == ( AnimationsLevel . None ) ) { mMiniKeyboardPopup . setAnimationStyle ( 0 ) ; } else if ( ( mExtensionVisible ) && ( ( mMiniKeyboardPopup . getAnimationStyle ( ) ) != ( style . ExtensionKeyboardAnimation ) ) ) { Log . d ( AnyKeyboardView . TAG , "Switching<seq2seq4repair_space>mini-keyboard<seq2seq4repair_space>animation<seq2seq4repair_space>to<seq2seq4repair_space>ExtensionKeyboardAnimation" ) ; mMiniKeyboardPopup . setAnimationStyle ( ExtensionKeyboardAnimation ) ; } else if ( ( ! ( mExtensionVisible ) ) && ( ( mMiniKeyboardPopup . getAnimationStyle ( ) ) != ( style . MiniKeyboardAnimation ) ) ) { Log . d ( AnyKeyboardView . TAG , "Switching<seq2seq4repair_space>mini-keyboard<seq2seq4repair_space>animation<seq2seq4repair_space>to<seq2seq4repair_space>MiniKeyboardAnimation" ) ; mMiniKeyboardPopup . setAnimationStyle ( MiniKeyboardAnimation ) ; } return super . onLongPress ( packageContext , key , isSticky , requireSlideInto ) ; } private long mExtensionKeyboardAreaEntranceTime = - 1 ; @ Override public boolean onTouchEvent ( @ NonNull MotionEvent me ) { } private static final int SLIDE_RATIO_FOR_GESTURE = 250 ; private void setGesturePreviewText ( KeyboardSwitcher switcher , MotionEvent me ) { } private static final int DIRECTION_UP = 256 ; private static final int DIRECTION_DOWN = 512 ; private static final int DIRECTION_LEFT = 1024 ; private static final int DIRECTION_RIGHT = 2048 ; private int getSlideDistance ( MotionEvent me ) { } @ Override protected void onUpEvent ( PointerTracker tracker , int x , int y , long eventTime ) { } protected void onCancelEvent ( PointerTracker tracker , int x , int y , long eventTime ) { } @ Override public boolean dismissPopupKeyboard ( ) { } public void openUtilityKeyboard ( ) { } public void requestInAnimation ( Animation animation ) { } @ Override public void onDraw ( Canvas canvas ) { } private static float getPopOutAnimationInterpolator ( float input ) { } private CharSequence mPopOutText = null ; private long mPopOutTime = 0 ; private final Point mPopOutStartPoint = new Point ( ) ; public void popTextOutOfKey ( CharSequence text ) { } }

Fix:
invokeOnKey ( QUICK_TEXT_POPUP , anyKey , 0 ) ;