Buggy code:
public final class WidgetStatus { static boolean mediumWidget = false ; static boolean smallWidget = false ; private WidgetStatus ( ) { } public static void update ( Context context ) { } public static DeckStatus [ ] fetch ( Context context ) { } public static int [ ] fetchSmall ( Context context ) { } private static class UpdateDeckStatusAsyncTask extends AsyncTask < Context , Void , Context > { private static final DeckStatus [ ] EMPTY_DECK_STATUS = new DeckStatus [ 0 ] ; private static DeckStatus [ ] mDecks = WidgetStatus . UpdateDeckStatusAsyncTask . EMPTY_DECK_STATUS ; @ Override protected Context doInBackground ( Context ... params ) { Log . d ( TAG , "WidgetStatus.UpdateDeckStatusAsyncTask.doInBackground()" ) ; Context context = params [ 0 ] ; SharedPreferences preferences = PrefSettings . getSharedPrefs ( context ) ; String deckPath = preferences . getString ( "deckPath" , ( ( AnkiDroidApp . getStorageDirectory ( ) ) + "//AnkiDroid" ) ) ; File dir = new File ( deckPath ) ; File [ ] fileList = dir . listFiles ( new WidgetStatus . UpdateDeckStatusAsyncTask . AnkiFileFilter ( ) ) ; if ( ( fileList == null ) || ( ( fileList . length ) == 0 ) ) { WidgetStatus . UpdateDeckStatusAsyncTask . mDecks = WidgetStatus . UpdateDeckStatusAsyncTask . EMPTY_DECK_STATUS ; return context ; } ArrayList < DeckStatus > decks = new ArrayList < DeckStatus > ( fileList . length ) ; for ( File file : fileList ) { String absPath = null ; try { absPath = file . getAbsolutePath ( ) ; String deckName = file . getName ( ) . replaceAll ( ".anki" , "" ) ; Log . i ( TAG , ( "Found<seq2seq4repair_space>deck:<seq2seq4repair_space>" + absPath ) ) ; Deck deck ; Deck currentDeck = AnkiDroidApp . deck ( ) ; if ( ( currentDeck != null ) && ( currentDeck . getDeckPath ( ) . equals ( deckName ) ) ) { deck = currentDeck ; } else { try { deck = Deck . openDeck ( absPath , false ) ; } catch ( RuntimeException e ) { Log . w ( TAG , ( ( ( "Widget:<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>open<seq2seq4repair_space>database<seq2seq4repair_space>" + absPath ) + ":<seq2seq4repair_space>" ) + e ) ) ; BackupManager . restoreDeckIfMissing ( absPath ) ; deck = null ; } } if ( deck == null ) { <START_BUG> Log . e ( TAG , ( "Skipping<seq2seq4repair_space>null<seq2seq4repair_space>deck:<seq2seq4repair_space>" + absPath ) ) ; <END_BUG> for ( DeckStatus deckStatus : WidgetStatus . UpdateDeckStatusAsyncTask . mDecks ) { if ( absPath . equals ( deckStatus . mDeckPath ) ) { Log . d ( TAG , "Using<seq2seq4repair_space>previous<seq2seq4repair_space>value" ) ; decks . add ( deckStatus ) ; break ; } } continue ; } int dueCards = deck . getRevCount ( ) ; int newCards = deck . getNewCountToday ( ) ; int failedCards = deck . getFailedSoonCount ( ) ; int eta = deck . getETA ( ) ; int reps = deck . getSessionFinishedCards ( ) ; if ( ( currentDeck != null ) && ( ( currentDeck . getDB ( ) ) != ( deck . getDB ( ) ) ) ) { deck . closeDeck ( ) ; } decks . add ( new DeckStatus ( absPath , deckName , newCards , dueCards , failedCards , eta , reps ) ) ; } catch ( SQLException e ) { Log . i ( TAG , "Widget:<seq2seq4repair_space>Could<seq2seq4repair_space>not<seq2seq4repair_space>open<seq2seq4repair_space>deck" ) ; Log . e ( TAG , e . toString ( ) ) ; if ( absPath != null ) { BackupManager . restoreDeckIfMissing ( absPath ) ; } } } if ( ( ! ( decks . isEmpty ( ) ) ) && ( ( decks . size ( ) ) > 1 ) ) { Log . i ( TAG , "Sorting<seq2seq4repair_space>deck" ) ; Collections . sort ( decks , new WidgetStatus . UpdateDeckStatusAsyncTask . ByDueComparator ( ) ) ; } WidgetStatus . UpdateDeckStatusAsyncTask . mDecks = decks . toArray ( WidgetStatus . UpdateDeckStatusAsyncTask . EMPTY_DECK_STATUS ) ; return context ; } @ Override protected void onPostExecute ( Context context ) { } private static class ByDueComparator implements Comparator < DeckStatus > { @ Override public int compare ( DeckStatus deck1 , DeckStatus deck2 ) { } } private static final class AnkiFileFilter implements FileFilter { @ Override public boolean accept ( File pathname ) { } } } }

Fix:
Log . e ( TAG , ( "Widget:<seq2seq4repair_space>Skipping<seq2seq4repair_space>null<seq2seq4repair_space>deck:<seq2seq4repair_space>" + absPath ) ) ;