Buggy code:
public class MainActivity extends ActionBarActivity { private static String TAG = MainActivity . class . getSimpleName ( ) ; ListView mDrawerList ; RelativeLayout mDrawerPane ; private ActionBarDrawerToggle mDrawerToggle ; private DrawerLayout mDrawerLayout ; ArrayList < MainActivity . NavItem > mNavItems = new ArrayList < MainActivity . NavItem > ( ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { final MainActivity me = this ; super . onCreate ( savedInstanceState ) ; LibraryFragment . sensorMgr = ( ( SensorManager ) ( getSystemService ( SENSOR_SERVICE ) ) ) ; setContentView ( activity_main ) ; FragmentManager fragmentManager = getSupportFragmentManager ( ) ; fragmentManager . beginTransaction ( ) . replace ( mainContent , new MainFragment ( ) ) . commit ( ) ; mNavItems . add ( new MainActivity . NavItem ( getString ( title_section1 ) , "Will<seq2seq4repair_space>become<seq2seq4repair_space>mainscreen" , drawable . ic_action_home ) ) ; mNavItems . add ( new MainActivity . NavItem ( getString ( title_section2 ) , getString ( title_section2 ) , drawable . ic_action_clear ) ) ; mNavItems . add ( new MainActivity . NavItem ( getString ( title_library ) , getString ( title_library ) , drawable . ic_action_explore ) ) ; mNavItems . add ( new MainActivity . NavItem ( getString ( action_settings ) , getString ( title_section2 ) , drawable . ic_action_settings ) ) ; RemoteConnector . setCertificate ( me . getResources ( ) . openRawResource ( certificate ) ) ; LocalConnector . load ( me . getApplicationContext ( ) ) ; LocalConnector . dropDatabase ( ) ; new android . os . AsyncTask < String , Boolean , String > ( ) { @ Override protected String doInBackground ( String ... params ) { Settings . scheduleNotification ( me . getApplicationContext ( ) ) ; new LocalConnector ( me ) ; return "" ; } <START_BUG> } . execute ( ) ; <END_BUG> mDrawerLayout = ( ( DrawerLayout ) ( findViewById ( drawerLayout ) ) ) ; mDrawerPane = ( ( RelativeLayout ) ( findViewById ( drawerPane ) ) ) ; mDrawerList = ( ( ListView ) ( findViewById ( navList ) ) ) ; MainActivity . DrawerListAdapter adapter = new MainActivity . DrawerListAdapter ( this , mNavItems ) ; mDrawerList . setAdapter ( adapter ) ; mDrawerList . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { private void selectItemFromDrawer ( int position ) { FragmentManager fragmentManager = getSupportFragmentManager ( ) ; switch ( position ) { case 0 : fragmentManager . beginTransaction ( ) . replace ( mainContent , new MainFragment ( ) ) . commit ( ) ; mDrawerList . setItemChecked ( position , true ) ; setTitle ( mNavItems . get ( position ) . mTitle ) ; mDrawerLayout . closeDrawer ( mDrawerPane ) ; break ; case 1 : fragmentManager . beginTransaction ( ) . replace ( mainContent , new ChallengeItemFragment ( ) ) . commit ( ) ; mDrawerList . setItemChecked ( position , true ) ; setTitle ( mNavItems . get ( position ) . mTitle ) ; mDrawerLayout . closeDrawer ( mDrawerPane ) ; break ; case 2 : fragmentManager . beginTransaction ( ) . replace ( mainContent , new LibraryFragment ( ) ) . commit ( ) ; mDrawerList . setItemChecked ( position , true ) ; setTitle ( mNavItems . get ( position ) . mTitle ) ; mDrawerLayout . closeDrawer ( mDrawerPane ) ; break ; } } @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { selectItemFromDrawer ( position ) ; } } ) ; mDrawerToggle = new ActionBarDrawerToggle ( this , mDrawerLayout , string . drawer_open , string . drawer_close ) { @ Override public void onDrawerOpened ( View drawerView ) { super . onDrawerOpened ( drawerView ) ; Log . d ( "Drawer" , "onDrawerOpened" ) ; invalidateOptionsMenu ( ) ; } @ Override public void onDrawerClosed ( View drawerView ) { super . onDrawerClosed ( drawerView ) ; Log . d ( "Drawer" , ( "onDrawerClosed:<seq2seq4repair_space>" + ( getTitle ( ) ) ) ) ; invalidateOptionsMenu ( ) ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { Log . d ( "Drawer" , ( "onOptionsItemSelected:<seq2seq4repair_space>" + item ) ) ; if ( mDrawerToggle . onOptionsItemSelected ( item ) ) { return true ; } return super . onOptionsItemSelected ( item ) ; } } ; mDrawerLayout . setDrawerListener ( mDrawerToggle ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } class NavItem { String mTitle ; String mSubtitle ; int mIcon ; public NavItem ( String title , String subtitle , int icon ) { } } class DrawerListAdapter extends BaseAdapter { Context mContext ; ArrayList < MainActivity . NavItem > mNavItems ; public DrawerListAdapter ( Context context , ArrayList < MainActivity . NavItem > navItems ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } } }

Fix:
} . executeOnExecutor ( THREAD_POOL_EXECUTOR ) ;