Buggy code:
List < String > isos ; String flattenParamteters ; private NfcAdapter mNfcAdapter ; private WifiHandler mWifiHandler ; protected void createPluginManager ( ) { } @ Override protected void onNewIntent ( Intent intent ) { } @ Override protected void duringOnCreate ( ) { } @ Override protected void afterOnCreate ( ) { } public static MainScreen getInstance ( ) { } public void getCameraParametersBundle ( ) { } @ TargetApi ( 21 ) @ Override public void createImageReaders ( ImageReader . OnImageAvailableListener imageAvailableListener ) { } @ TargetApi ( 19 ) @ Override public Surface getPreviewYUVImageSurface ( ) { } @ TargetApi ( 19 ) @ Override public Surface getYUVImageSurface ( ) { } @ TargetApi ( 19 ) @ Override public Surface getJPEGImageSurface ( ) { } @ TargetApi ( 19 ) @ Override public Surface getRAWImageSurface ( ) { } @ Override public SimpleStreamSurfaceView getSimpleStreamSurfaceView ( ) { } @ Override public int getImageSizeIndex ( ) { } @ Override public int getMultishotImageSizeIndex ( ) { } @ Override public boolean isShutterSoundEnabled ( ) { } @ Override public int isShotOnTap ( ) { } public static boolean isShowHelp ( ) { } public static void setShowHelp ( boolean show ) { } @ Override public String getSaveToPath ( ) { } @ Override public String getSaveTo ( ) { } @ Override public boolean isSortByData ( ) { } @ Override public void onPreferenceCreate ( PreferenceFragment prefActivity ) { } private void setColorEffectOptions ( PreferenceFragment prefActivity ) { } private void setImageSizeOptions ( PreferenceFragment prefActivity , int mode ) { } @ Override public void onAdvancePreferenceCreate ( PreferenceFragment prefActivity ) { } @ Override protected void onApplicationStart ( ) { } @ Override protected void onApplicationStop ( ) { } @ TargetApi ( 21 ) protected void stopImageReaders ( ) { } @ Override protected void stopRemotePreview ( ) { } @ Override protected void onApplicationDestroy ( ) { } @ Override protected void onApplicationResume ( ) { } private void updatePreferences ( ) { } @ Override protected void onApplicationPause ( ) { } public void pauseMain ( ) { } public void stopMain ( ) { } public void startMain ( ) { } public void resumeMain ( ) { } @ Override public void surfaceChanged ( final SurfaceHolder holder , final int format , final int width , final int height ) { } public void setCameraImageSizeIndex ( int captureIndex , boolean init ) { } @ Override public void setSpecialImageSizeIndexPref ( int iIndex ) { } @ Override public String getSpecialImageSizeIndexPref ( ) { } public static int selectImageDimensionMultishot ( ) { } @ Override public void addSurfaceCallback ( ) { } @ Override public void configureCamera ( boolean createGUI ) { } @ TargetApi ( 21 ) @ Override public void createCaptureSession ( ) { } @ Override public void surfaceCreated ( SurfaceHolder holder ) { } public static void takePicture ( ) { } @ Override public void captureFailed ( ) { } @ TargetApi ( 14 ) public boolean isFaceDetectionAvailable ( Camera . Parameters params ) { } public Size getPreviewSize ( ) { } public int getSceneIcon ( int sceneMode ) { } public int getWBIcon ( int wb ) { } public int getFocusIcon ( int focusMode ) { } public int getFlashIcon ( int flashMode ) { } public int getISOIcon ( int isoMode ) { } public void setCameraMeteringMode ( int mode ) { } @ Override public void setAutoFocusLock ( boolean locked ) { } @ Override public boolean getAutoFocusLock ( ) { } @ Override public boolean onKeyUpEvent ( int keyCode , KeyEvent event ) { } @ Override public boolean onKeyDownEvent ( int keyCode , KeyEvent event ) { <START_BUG> if ( ( ! ( mApplicationStarted ) ) || ( ! ( mCameraStarted ) ) ) <END_BUG> return true ; if ( keyCode == ( KeyEvent . KEYCODE_MENU ) ) { menuButtonPressed ( ) ; return true ; } if ( ( keyCode == ( KeyEvent . KEYCODE_CAMERA ) ) || ( keyCode == ( KeyEvent . KEYCODE_DPAD_CENTER ) ) ) { MainScreen . getGUIManager ( ) . onHardwareShutterButtonPressed ( ) ; return true ; } if ( keyCode == ( KeyEvent . KEYCODE_FOCUS ) ) { if ( ( event . getDownTime ( ) ) == ( event . getEventTime ( ) ) ) { MainScreen . getGUIManager ( ) . onHardwareFocusButtonPressed ( ) ; } return true ; } if ( keyCode == ( KeyEvent . KEYCODE_HEADSETHOOK ) ) { SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( MainScreen . getMainContext ( ) ) ; boolean headsetFunc = prefs . getBoolean ( "headsetPrefCommon" , false ) ; if ( headsetFunc ) { MainScreen . getGUIManager ( ) . onHardwareFocusButtonPressed ( ) ; MainScreen . getGUIManager ( ) . onHardwareShutterButtonPressed ( ) ; return true ; } } if ( ( keyCode == ( KeyEvent . KEYCODE_VOLUME_DOWN ) ) || ( keyCode == ( KeyEvent . KEYCODE_VOLUME_UP ) ) ) { SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( MainScreen . getMainContext ( ) ) ; int buttonFunc = Integer . parseInt ( prefs . getString ( MainScreen . sVolumeButtonPref , "0" ) ) ; if ( buttonFunc == ( MainScreen . VOLUME_FUNC_SHUTTER ) ) { MainScreen . getGUIManager ( ) . onHardwareFocusButtonPressed ( ) ; MainScreen . getGUIManager ( ) . onHardwareShutterButtonPressed ( ) ; return true ; } else if ( buttonFunc == ( MainScreen . VOLUME_FUNC_EXPO ) ) { MainScreen . getGUIManager ( ) . onVolumeBtnExpo ( keyCode ) ; return true ; } else if ( buttonFunc == ( MainScreen . VOLUME_FUNC_NONE ) ) return true ; } if ( ( ( ( android . widget . RelativeLayout ) ( guiManager . getMainView ( ) . findViewById ( R . id . viewPagerLayoutMain ) ) ) . getVisibility ( ) ) == ( View . VISIBLE ) ) { guiManager . hideStore ( ) ; return true ; }

Fix:
if ( ! ( mApplicationStarted ) )