Program: 35939
Project: 35939
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main_activity);
  mDrawerList=(ListView)findViewById(R.id.left_drawer);
  String[] mSettingsItems=getResources().getStringArray(R.array.options_array);
  mDrawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  mDrawerToggle=new ActionBarDrawerToggle(this,mDrawerLayout,R.drawable.ic_drawer,R.string.drawer_open,R.string.drawer_close){
    public void onDrawerClosed(    View view){
      super.onDrawerClosed(view);
      invalidateOptionsMenu();
    }
    public void onDrawerOpened(    View drawerView){
      super.onDrawerOpened(drawerView);
      invalidateOptionsMenu();
    }
  }
;
  mDrawerLayout.post(new Runnable(){
    @Override public void run(){
      mDrawerToggle.syncState();
    }
  }
);
  mDrawerLayout.setDrawerListener(mDrawerToggle);
  getActionBar().setIcon(R.drawable.ic_drawer);
  getActionBar().setDisplayHomeAsUpEnabled(true);
  mDrawerList.setAdapter(new ArrayAdapter<String>(this,R.layout.drawer_item,mSettingsItems));
  mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
  if (savedInstanceState == null) {
    FragmentTransaction fragmentTx=getFragmentManager().beginTransaction();
    fragmentTx.replace(R.id.main,mFragments[0]);
    getActionBar().setDisplayShowTitleEnabled(true);
    getActionBar().setTitle(mFragmentTitles[0]);
    fragmentTx.commit();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main_activity);
  mDrawerList=(ListView)findViewById(R.id.left_drawer);
  String[] mSettingsItems=getResources().getStringArray(R.array.options_array);
  mDrawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  mDrawerToggle=new ActionBarDrawerToggle(this,mDrawerLayout,R.drawable.ic_drawer,R.string.drawer_open,R.string.drawer_close){
    public void onDrawerClosed(    View view){
      super.onDrawerClosed(view);
      invalidateOptionsMenu();
    }
    public void onDrawerOpened(    View drawerView){
      super.onDrawerOpened(drawerView);
      invalidateOptionsMenu();
    }
  }
;
  mDrawerLayout.post(new Runnable(){
    @Override public void run(){
      mDrawerToggle.syncState();
    }
  }
);
  mDrawerLayout.setDrawerListener(mDrawerToggle);
  getActionBar().setIcon(R.drawable.ic_drawer);
  getActionBar().setDisplayHomeAsUpEnabled(true);
  mDrawerList.setAdapter(new ArrayAdapter<String>(this,R.layout.drawer_item,mSettingsItems));
  mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
  if (savedInstanceState == null) {
    getFragmentManager().addOnBackStackChangedListener(new OnBackStackChangedListener(){
      public void onBackStackChanged(){
        FragmentManager manager=getFragmentManager();
        if (manager != null) {
          int backStackSize=manager.getBackStackEntryCount();
          if (backStackSize != 0) {
            FragmentManager.BackStackEntry backEntry=getFragmentManager().getBackStackEntryAt(backStackSize - 1);
            getActionBar().setTitle(backEntry.getName());
          }
 else {
            finish();
          }
        }
      }
    }
);
    FragmentTransaction fragmentTx=getFragmentManager().beginTransaction();
    fragmentTx.replace(R.id.main,mFragments[0]);
    getActionBar().setDisplayShowTitleEnabled(true);
    fragmentTx.addToBackStack(mFragmentTitles[0]);
    fragmentTx.commit();
  }
}