Buggy code:
public class FindToolbar extends LinearLayout implements TabWebContentsDelegateAndroid . FindMatchRectsListener , TabWebContentsDelegateAndroid . FindResultListener { private static final long ACCESSIBLE_ANNOUNCEMENT_DELAY_MILLIS = 500 ; private TextView mFindStatus ; protected FindToolbar . FindQuery mFindQuery ; protected TintedImageButton mCloseFindButton ; protected TintedImageButton mFindPrevButton ; protected TintedImageButton mFindNextButton ; private FindResultBar mResultBar = null ; private TabModelSelector mTabModelSelector ; private final TabModelSelectorObserver mTabModelSelectorObserver ; private final TabModelObserver mTabModelObserver ; private Tab mCurrentTab ; private final TabObserver mTabObserver ; private WindowAndroid mWindowAndroid ; private FindInPageBridge mFindInPageBridge ; private FindToolbarObserver mObserver ; private String mLastUserSearch = "" ; private boolean mSettingFindTextProgrammatically = false ; private boolean mSearchKeyShouldTriggerSearch = false ; private boolean mActive = false ; private Handler mHandler = new Handler ( ) ; private Runnable mAccessibleAnnouncementRunnable ; private boolean mAccessibilityDidActivateResult ; @ SuppressLint ( "Instantiatable" ) static class FindQuery extends VerticallyFixedEditText { private FindToolbar mFindToolbar ; public FindQuery ( Context context , AttributeSet attrs ) { } void setFindToolbar ( FindToolbar findToolbar ) { } @ Override public boolean onKeyPreIme ( int keyCode , KeyEvent event ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } @ Override public boolean onTextContextMenuItem ( int id ) { } } public FindToolbar ( Context context , AttributeSet attrs ) { } @ Override public void onFinishInflate ( ) { super . onFinishInflate ( ) ; setOrientation ( HORIZONTAL ) ; setGravity ( CENTER_VERTICAL ) ; mFindQuery = ( ( FindToolbar . FindQuery ) ( findViewById ( find_query ) ) ) ; mFindQuery . setFindToolbar ( this ) ; <START_BUG> mFindQuery . setInputType ( TYPE_TEXT_VARIATION_FILTER ) ; <END_BUG> mFindQuery . setSelectAllOnFocus ( true ) ; mFindQuery . setOnFocusChangeListener ( new View . OnFocusChangeListener ( ) { @ Override public void onFocusChange ( View v , boolean hasFocus ) { mAccessibilityDidActivateResult = false ; if ( ! hasFocus ) { if ( ( mFindQuery . getText ( ) . length ( ) ) > 0 ) { mSearchKeyShouldTriggerSearch = true ; } UiUtils . hideKeyboard ( mFindQuery ) ; } } } ) ; mFindQuery . addTextChangedListener ( new TextWatcher ( ) { @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { if ( ( mFindInPageBridge ) == null ) return ; mAccessibilityDidActivateResult = false ; setPrevNextEnabled ( ( ( s . length ( ) ) > 0 ) ) ; if ( mSettingFindTextProgrammatically ) return ; assert ( mCurrentTab ) != null ; assert ( mCurrentTab . getContentViewCore ( ) ) != null ; if ( ( mCurrentTab . getContentViewCore ( ) ) == null ) return ; if ( ( s . length ( ) ) > 0 ) { mSearchKeyShouldTriggerSearch = false ; mFindInPageBridge . startFinding ( s . toString ( ) , true , false ) ; } else { clearResults ( ) ; mFindInPageBridge . stopFinding ( true ) ; } if ( ! ( mCurrentTab . isIncognito ( ) ) ) { mLastUserSearch = s . toString ( ) ; } } @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void afterTextChanged ( Editable s ) { } } ) ; mFindQuery . setOnEditorActionListener ( new TextView . OnEditorActionListener ( ) { @ Override public boolean onEditorAction ( TextView v , int actionId , KeyEvent event ) { if ( ( event != null ) && ( ( event . getAction ( ) ) == ( KeyEvent . ACTION_UP ) ) ) return false ; if ( ( mFindInPageBridge ) == null ) return false ; if ( mSearchKeyShouldTriggerSearch ) { mSearchKeyShouldTriggerSearch = false ; hideKeyboardAndStartFinding ( true ) ; } else { UiUtils . hideKeyboard ( mFindQuery ) ; mFindInPageBridge . activateFindInPageResultForAccessibility ( ) ; mAccessibilityDidActivateResult = true ; } return true ; } } ) ; mFindStatus = ( ( TextView ) ( findViewById ( find_status ) ) ) ; mFindPrevButton = ( ( TintedImageButton ) ( findViewById ( find_prev_button ) ) ) ; mFindPrevButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { hideKeyboardAndStartFinding ( false ) ; } } ) ; mFindNextButton = ( ( TintedImageButton ) ( findViewById ( find_next_button ) ) ) ; mFindNextButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { hideKeyboardAndStartFinding ( true ) ; } } ) ; setPrevNextEnabled ( false ) ; mCloseFindButton = ( ( TintedImageButton ) ( findViewById ( close_find_button ) ) ) ; mCloseFindButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { deactivate ( ) ; } } ) ; } protected void findResultSelected ( Rect rect ) { } private void hideKeyboardAndStartFinding ( boolean forward ) { } private boolean mShowKeyboardOnceWindowIsFocused = false ; @ Override public void onWindowFocusChanged ( boolean hasFocus ) { } @ Override public void onFindMatchRects ( FindMatchRectsDetails matchRects ) { } @ Override public void onFindResult ( FindNotificationDetails result ) { } private String getAccessibleStatusText ( int activeMatchOrdinal , int numberOfMatches ) { } private void announceStatusForAccessibility ( final String announcementText ) { } public void setTabModelSelector ( TabModelSelector modelSelector ) { } public void setWindowAndroid ( WindowAndroid windowAndroid ) { } protected void updateVisualsForTabModel ( boolean isIncognito ) { } public void setActionModeCallbackForTextEdit ( ActionMode . Callback callback ) { } protected void setObserver ( FindToolbarObserver observer ) { } protected boolean isViewAvailable ( ) { } public void activate ( ) { } public void deactivate ( ) { } public void deactivate ( boolean clearSelection ) { } public void requestQueryFocus ( ) { } protected void onHideAnimationStart ( ) { } protected void startAnimationOverContent ( Animator animation ) { } @ VisibleForTesting public FindResultBar getFindResultBar ( ) { } @ VisibleForTesting public boolean isAnimating ( ) { } private void initializeFindText ( ) { }

Fix:
mFindQuery . setInputType ( ( ( InputType . TYPE_CLASS_TEXT ) | ( InputType . TYPE_TEXT_VARIATION_FILTER ) ) ) ;