Buggy code:
public void updateMultiTouchZoomSupport ( boolean supportsMultiTouchZoom ) { } public void updateDoubleTapSupport ( boolean supportsDoubleTap ) { } public void selectPopupMenuItems ( int [ ] indices ) { } @ VisibleForTesting void sendOrientationChangeEvent ( int orientation ) { } public void setDownloadDelegate ( ContentViewDownloadDelegate delegate ) { } ContentViewDownloadDelegate getDownloadDelegate ( ) { } @ VisibleForTesting public ActionHandler getSelectActionHandler ( ) { } private void actionModeInvalidateWAR ( ) { } private void showSelectActionBar ( ) { } public void clearSelection ( ) { } public void preserveSelectionOnNextLossOfFocus ( ) { } @ VisibleForTesting public boolean hasSelection ( ) { } @ VisibleForTesting protected boolean hasInsertion ( ) { } private void hidePastePopup ( ) { } @ CalledByNative private void onSelectionEvent ( int eventType , int x , int y ) { } private void dismissTextHandles ( ) { } private void setTextHandlesTemporarilyHidden ( boolean hide ) { } public void hideImeIfNeeded ( ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private void updateFrameInfo ( float scrollOffsetX , float scrollOffsetY , float pageScaleFactor , float minPageScaleFactor , float maxPageScaleFactor , float contentWidth , float contentHeight , float viewportWidth , float viewportHeight , float controlsOffsetYCss , float contentOffsetYCss , boolean isMobileOptimizedHint ) { } @ CalledByNative private void updateImeAdapter ( long nativeImeAdapterAndroid , int textInputType , int textInputFlags , String text , int selectionStart , int selectionEnd , int compositionStart , int compositionEnd , boolean showImeIfNeeded , boolean isNonImeChange ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private void setTitle ( String title ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private void showSelectPopup ( long nativeSelectPopupSourceFrame , Rect bounds , String [ ] items , int [ ] enabled , boolean multiple , int [ ] selectedIndices ) { } @ CalledByNative private void hideSelectPopup ( ) { } public SelectPopup getSelectPopupForTest ( ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private void showDisambiguationPopup ( Rect targetRect , Bitmap zoomedBitmap ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private TouchEventSynthesizer createTouchEventSynthesizer ( ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private PopupTouchHandleDrawable createPopupTouchHandleDrawable ( ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private void onSelectionChanged ( String text ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private void showPastePopupWithFeedback ( int x , int y ) { } private boolean showPastePopup ( int x , int y ) { } private PastePopupMenu getPastePopup ( ) { } @ VisibleForTesting public PastePopupMenu getPastePopupForTest ( ) { } private boolean canPaste ( ) { } @ SuppressWarnings ( "unused" ) @ CalledByNative private void onRenderProcessChange ( ) { } public void attachImeAdapter ( ) { } @ CalledByNative private boolean hasFocus ( ) { } public boolean canZoomIn ( ) { } public boolean canZoomOut ( ) { } public boolean zoomIn ( ) { } public boolean zoomOut ( ) { } public boolean zoomReset ( ) { } public boolean pinchByDelta ( float delta ) { } public void invokeZoomPicker ( ) { } public void setAllowJavascriptInterfacesInspection ( boolean allow ) { } public Map < String , Pair < Object , Class > > getJavascriptInterfaces ( ) { } public void addJavascriptInterface ( Object object , String name ) { } public void addPossiblyUnsafeJavascriptInterface ( Object object , String name , Class < ? extends Annotation > requiredAnnotation ) { } public void removeJavascriptInterface ( String name ) { } @ VisibleForTesting public float getScale ( ) { } @ CalledByNative private void startContentIntent ( String contentUrl ) { } @ Override public void onAccessibilityStateChanged ( boolean enabled ) { } public boolean supportsAccessibilityAction ( int action ) { } public boolean performAccessibilityAction ( int action , Bundle arguments ) { } public void setBrowserAccessibilityManager ( BrowserAccessibilityManager manager ) { } public BrowserAccessibilityManager getBrowserAccessibilityManager ( ) { } public AccessibilityNodeProvider getAccessibilityNodeProvider ( ) { } @ TargetApi ( VERSION_CODES . KITKAT ) public void setTextTrackSettings ( TextTrackSettings settings ) { } public void onInitializeAccessibilityNodeInfo ( AccessibilityNodeInfo info ) { } @ TargetApi ( VERSION_CODES . ICE_CREAM_SANDWICH_MR1 ) public void onInitializeAccessibilityEvent ( AccessibilityEvent event ) { } public boolean isDeviceAccessibilityScriptInjectionEnabled ( ) { try { if ( ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . JELLY_BEAN ) ) && ( ! ( CommandLine . getInstance ( ) . hasSwitch ( ENABLE_ACCESSIBILITY_SCRIPT_INJECTION ) ) ) ) { return false ; } <START_BUG> if ( ! ( mContentViewClient . isJavascriptEnabled ( ) ) ) { <END_BUG> return false ; } int result = getContext ( ) . checkCallingOrSelfPermission ( INTERNET ) ; if ( result != ( PackageManager . PERMISSION_GRANTED ) ) { return false ; } Field field = Secure . class . getField ( "ACCESSIBILITY_SCRIPT_INJECTION" ) ; field . setAccessible ( true ) ; String accessibilityScriptInjection = ( ( String ) ( field . get ( null ) ) ) ; ContentResolver contentResolver = getContext ( ) . getContentResolver ( ) ; if ( ( mAccessibilityScriptInjectionObserver ) == null ) { ContentObserver contentObserver = new ContentObserver ( new Handler ( ) ) { @ Override public void onChange ( boolean selfChange , Uri uri ) { setAccessibilityState ( mAccessibilityManager . isEnabled ( ) ) ; } } ; contentResolver . registerContentObserver ( Secure . getUriFor ( accessibilityScriptInjection ) , false , contentObserver ) ; mAccessibilityScriptInjectionObserver = contentObserver ; } return ( Secure . getInt ( contentResolver , accessibilityScriptInjection , 0 ) ) == 1 ; } catch ( NoSuchFieldException e ) { } catch ( IllegalAccessException e ) { } return false ; } public boolean isInjectingAccessibilityScript ( ) { } public boolean isTouchExplorationEnabled ( ) { } public void setAccessibilityState ( boolean state ) { } public void setInjectedAccessibility ( boolean enabled ) { } public void stopCurrentAccessibilityNotifications ( ) { } public boolean shouldSetAccessibilityFocusOnPageLoad ( ) { } public void setShouldSetAccessibilityFocusOnPageLoad ( boolean on ) { } public RenderCoordinates getRenderCoordinates ( ) { }

Fix:
if ( ! ( getContentViewClient ( ) . isJavascriptEnabled ( ) ) ) {