Buggy code:
} ; private OnCheckedChangeListener mLimitTagCheckedChangeListener = new CompoundButton . OnCheckedChangeListener ( ) { @ Override public void onCheckedChanged ( CompoundButton buttonView , boolean isChecked ) { } } ; Handler ZeemoteHandler = new Handler ( ) { public void handleMessage ( Message msg ) { } } ; private Boolean isValidInt ( String test ) { } protected void sendKey ( int keycode ) { } private Boolean isValidLong ( String test ) { } private OnClickListener mDialogSaveListener = new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { } } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public static int getApiLevel ( ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } public void registerExternalStorageListener ( ) { } @ Override protected void onDestroy ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onResume ( ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } private void closeStudyOptions ( ) { } private void closeStudyOptions ( boolean closeDeck ) { } private void restartApp ( ) { } private void openReviewer ( ) { } private void startEarlyReview ( ) { } private void startLearnMore ( ) { } private void loadPreviousDeck ( ) { } private void closeOpenedDeck ( ) { } private boolean hasErrorFiles ( ) { } private void initAllContentViews ( ) { } private OnClickListener mSyncConflictResolutionListener = new OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { } } ; private OnClickListener mStatisticListener = new OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { } } ; @ Override protected Dialog onCreateDialog ( int id ) { } @ Override protected void onPrepareDialog ( int id , Dialog dialog ) { } private void showContentView ( int which ) { } private void showContentView ( ) { } private void updateLimitTagText ( int which , String tags ) { } private String getSelectedTags ( int which ) { } private void setCongratsMessage ( ) { } private void resetAndUpdateValuesFromDeck ( ) { } private void hideDeckInformation ( ) { } private void showDeckInformation ( boolean fade ) { } private void updateValuesFromDeck ( ) { } private void updateStatisticBars ( ) { } private void reset ( ) { } private void reset ( boolean priorities ) { } private void onCram ( ) { } private void onCramStop ( ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void openDeckPicker ( ) { } private void finishCongrats ( ) { } private void openCardBrowser ( ) { } private void openStatistics ( int period ) { } public void openPersonalDeckPicker ( ) { } public void openSharedDeckPicker ( ) { } private void loadSampleDeck ( ) { } private void syncDeckWithPrompt ( ) { } private void syncDeck ( String conflictResolution ) { SharedPreferences preferences = PrefSettings . getSharedPrefs ( getBaseContext ( ) ) ; String username = preferences . getString ( "username" , "" ) ; String password = preferences . getString ( "password" , "" ) ; if ( AnkiDroidApp . isUserLoggedIn ( ) ) { Deck deck = AnkiDroidApp . deck ( ) ; if ( deck != null ) { Log . i ( TAG , ( ( ( "Synchronizing<seq2seq4repair_space>deck<seq2seq4repair_space>" + ( mDeckFilename ) ) + ",<seq2seq4repair_space>conflict<seq2seq4repair_space>resolution:<seq2seq4repair_space>" ) + conflictResolution ) ) ; Log . i ( TAG , String . format ( ENGLISH_LOCALE , "Before<seq2seq4repair_space>syncing<seq2seq4repair_space>-<seq2seq4repair_space>mod:<seq2seq4repair_space>%f,<seq2seq4repair_space>last<seq2seq4repair_space>sync:<seq2seq4repair_space>%f" , deck . getModified ( ) , deck . getLastSync ( ) ) ) ; } else { return ; } <START_BUG> if ( Deck . isWalEnabled ( mDeckFilename ) ) { <END_BUG> deck = null ; } Connection . syncDeck ( mSyncListener , new Connection . Payload ( new Object [ ] { username , password , deck , mDeckFilename , conflictResolution } ) ) ; } else { showDialog ( StudyOptions . DIALOG_USER_NOT_LOGGED_IN ) ; } } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent intent ) { } private boolean showDeckPickerOnStartup ( ) { } private void savePreferences ( String str ) { } private SharedPreferences restorePreferences ( ) { } private String getVersion ( ) { } private String getVersionMessage ( ) { } private void setLanguage ( String language ) { } private void displayProgressDialogAndLoadDeck ( ) { } private void displayProgressDialogAndLoadDeck ( boolean updateAllCards ) { } TaskListener mRestoreDeckHandler = new DeckTask . TaskListener ( ) { @ Override public void onPreExecute ( ) { } @ Override public void onPostExecute ( DeckTask . TaskData result ) { } @ Override public void onProgressUpdate ( TaskData ... values ) { } } ; TaskListener mLoadDeckHandler = new DeckTask . TaskListener ( ) { @ Override public void onPreExecute ( ) { } @ Override public void onPostExecute ( DeckTask . TaskData result ) { } @ Override public void onProgressUpdate ( DeckTask ... values ) { } } ; TaskListener mCloseDeckHandler = new DeckTask . TaskListener ( ) { @ Override public void onPreExecute ( ) { } @ Override public void onPostExecute ( DeckTask . TaskData result ) { } @ Override public void onProgressUpdate ( DeckTask ... values ) { } } ; Connection . TaskListener mSyncListener = new Connection . TaskListener ( ) { @ Override public void onDisconnected ( ) { } @ Override public void onPostExecute ( Payload data ) { } @ Override public void onPreExecute ( ) { } @ Override public void onProgressUpdate ( Object ... values ) { } } ;

Fix:
if ( Deck . isWalEnabled ( deck . getDeckPath ( ) ) ) {