Buggy code:
public class KiwixMobileFragment extends SherlockFragment { public static final String TAG_KIWIX = "kiwix" ; private static final String TAG_CURRENTZIMFILE = "currentzimfile" ; private static final String TAG_CURRENTARTICLE = "currentarticle" ; private static final String PREF_ZOOM = "pref_zoom" ; private static final String PREF_NIGHTMODE = "pref_nightmode" ; private static final String PREF_ZOOM_ENABLED = "pref_zoom_enabled" ; private static final String PREF_KIWIX_MOBILE = "kiwix-mobile" ; private static final String PREF_BACKTOTOP = "pref_backtotop" ; private static final String AUTOMATIC = "automatic" ; private static final String MEDIUM = "medium" ; private static final String SMALL = "small" ; private static final String LARGE = "large" ; private static final int ZIMFILESELECT_REQUEST_CODE = 1234 ; private static final int PREFERENCES_REQUEST_CODE = 1235 ; public LinearLayout articleSearchBar ; public Menu menu ; public KiwixWebView webView ; public boolean isFullscreenOpened ; public ImageButton exitFullscreenButton ; public AutoCompleteTextView articleSearchtextView ; protected boolean requestClearHistoryAfterLoad ; protected boolean requestInitAllMenuItems ; protected boolean nightMode ; protected int requestWebReloadOnFinished ; private boolean isBacktotopEnabled ; private SharedPreferences mySharedPreferences ; private ArrayAdapter < String > adapter ; private Button mBackToTopButton ; private ImageButton mTabDeleteCross ; private ArrayList < String > bookmarks ; private KiwixMobileFragment . FragmentCommunicator mFragmentCommunicator ; private KiwixTextToSpeech tts ; @ SuppressLint ( "SetJavaScriptEnabled" ) @ Override public void onCreate ( Bundle savedInstanceState ) { } private void setUpTTS ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onPause ( ) { } @ Override public void onDestroy ( ) { } @ Override public void onAttach ( Activity activity ) { } private void manageExternalLaunchAndRestoringViewState ( Bundle savedInstanceState ) { } private void setUpArticleSearchTextView ( Bundle savedInstanceState ) { } @ TargetApi ( VERSION_CODES . HONEYCOMB ) private void setUpTabDeleteCross ( ) { } private void setUpWebView ( ) { } private void setUpExitFullscreenButton ( ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void setRetainInstance ( boolean retain ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public void onPrepareOptionsMenu ( Menu menu ) { } public void loadPrefs ( ) { } public void selectZimFile ( ) { } public void selectSettings ( ) { } public void showSearchBar ( ) { } private void showSearchBar ( Boolean focus ) { } public void handleTabDeleteCross ( ) { } public void showWelcome ( ) { } private void showHelp ( ) { } public boolean openZimFile ( File file , boolean clearHistory ) { } private void initAllMenuItems ( ) { try { menu . findItem ( menu_bookmarks ) . setVisible ( true ) ; <START_BUG> menu . findItem ( menu_forward ) . setVisible ( false ) ; <END_BUG> menu . findItem ( menu_fullscreen ) . setVisible ( true ) ; menu . findItem ( menu_back ) . setVisible ( true ) ; menu . findItem ( menu_home ) . setVisible ( true ) ; menu . findItem ( menu_randomarticle ) . setVisible ( true ) ; menu . findItem ( menu_searchintext ) . setVisible ( true ) ; menu . findItem ( menu_search ) . setVisible ( true ) ; if ( tts . isInitialized ( ) ) { menu . findItem ( menu_read_aloud ) . setVisible ( true ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } public boolean onKeyDown ( int keyCode , KeyEvent event ) { } public void toggleBookmark ( ) { } public void viewBookmarks ( ) { } private void refreshBookmarks ( ) { } private void saveBookmarks ( ) { } public boolean openArticleFromBookmark ( String bookmarkTitle ) { } private boolean openArticle ( String articleUrl ) { } private boolean openArticleFromSearch ( ) { } public boolean openRandomArticle ( ) { } public boolean openMainPage ( ) { } public boolean isTablet ( Context context ) { } public void hideSearchBar ( ) { } private void ToggleNightMode ( ) { } public void setDefaultZoom ( ) { } public void readAloud ( ) { } public interface FragmentCommunicator { public void removeTabAt ( int position ) { } public void addNewTab ( String url ) { } public void closeFullScreenMode ( ) { } public int getPositionOfTab ( ) { } } public class AutoCompleteAdapter extends ArrayAdapter < String > implements Filterable { private ArrayList < String > mData ; public AutoCompleteAdapter ( Context context , int textViewResourceId ) { } @ Override public int getCount ( ) { } @ Override public String getItem ( int index ) { } @ Override public Filter getFilter ( ) { } } private class MyWebChromeClient extends WebChromeClient { @ Override public void onProgressChanged ( WebView view , int progress ) { } } private class MyWebViewClient extends WebViewClient { @ Override public boolean shouldOverrideUrlLoading ( WebView view , String url ) { } @ Override public void onReceivedError ( WebView view , int errorCode , String description , String failingUrl ) { } @ Override public void onPageFinished ( WebView view , String url ) { } } }

Fix:
menu . findItem ( menu_forward ) . setVisible ( true ) ;