Program: 14508
Project: 14508
Buggy source:
/** 
 * Create menu drawer ListView and listeners
 */
private void initMenuDrawer(int blogSelection){
  mDrawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  if (mDrawerLayout != null) {
    mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow,GravityCompat.START);
    mDrawerToggle=new ActionBarDrawerToggle(this,mDrawerLayout,mToolbar,R.string.open_drawer,R.string.close_drawer){
      public void onDrawerClosed(      View view){
        invalidateOptionsMenu();
      }
      public void onDrawerOpened(      View drawerView){
        invalidateOptionsMenu();
      }
    }
;
    mDrawerToggle.setHomeAsUpIndicator(R.drawable.ic_arrow_back_white_24dp);
    mDrawerLayout.setDrawerListener(mDrawerToggle);
  }
  mDrawerListView=(ListView)findViewById(R.id.drawer_list);
  if (mDrawerListView.getHeaderViewsCount() == 0) {
    View view=getLayoutInflater().inflate(R.layout.menu_drawer_header,mDrawerListView,false);
    mDrawerListView.addHeaderView(view,null,false);
  }
  mBlogSpinner=(Spinner)findViewById(R.id.blog_spinner);
  View divider=findViewById(R.id.blog_spinner_divider);
  String[] blogNames=getBlogNames();
  if (blogNames.length > 1) {
    mBlogSpinner.setVisibility(View.VISIBLE);
    divider.setVisibility(View.VISIBLE);
    mBlogSpinner.setOnItemSelectedListener(mItemSelectedListener);
    populateBlogSpinner(blogNames);
  }
 else {
    mBlogSpinner.setVisibility(View.GONE);
    divider.setVisibility(View.GONE);
  }
  View settingsRow=findViewById(R.id.settings_row);
  settingsRow.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      showSettings();
    }
  }
);
  mDrawerAdapter=new MenuDrawerAdapter(this);
  mDrawerListView.setAdapter(mDrawerAdapter);
  mDrawerListView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      int menuPosition=position - mDrawerListView.getHeaderViewsCount();
      DrawerItem item=(DrawerItem)mDrawerAdapter.getItem(menuPosition);
      drawerItemSelected(item);
    }
  }
);
  if (blogSelection != -1 && mBlogSpinner != null) {
    mBlogSpinner.setSelection(blogSelection);
  }
  updateMenuDrawer();
}

Fixed version (ground truth):
/** 
 * Create menu drawer ListView and listeners
 */
private void initMenuDrawer(){
  mDrawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  if (mDrawerLayout != null) {
    mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow,GravityCompat.START);
    mDrawerToggle=new ActionBarDrawerToggle(this,mDrawerLayout,mToolbar,R.string.open_drawer,R.string.close_drawer){
      public void onDrawerClosed(      View view){
        invalidateOptionsMenu();
      }
      public void onDrawerOpened(      View drawerView){
        invalidateOptionsMenu();
      }
    }
;
    mDrawerToggle.setHomeAsUpIndicator(R.drawable.ic_arrow_back_white_24dp);
    mDrawerLayout.setDrawerListener(mDrawerToggle);
  }
  mDrawerListView=(ListView)findViewById(R.id.drawer_list);
  if (mDrawerListView.getHeaderViewsCount() == 0) {
    View view=getLayoutInflater().inflate(R.layout.menu_drawer_header,mDrawerListView,false);
    mDrawerListView.addHeaderView(view,null,false);
  }
  View settingsRow=findViewById(R.id.settings_row);
  settingsRow.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      showSettings();
    }
  }
);
  mDrawerAdapter=new MenuDrawerAdapter(this);
  mDrawerListView.setAdapter(mDrawerAdapter);
  mDrawerListView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      int menuPosition=position - mDrawerListView.getHeaderViewsCount();
      DrawerItem item=(DrawerItem)mDrawerAdapter.getItem(menuPosition);
      drawerItemSelected(item);
    }
  }
);
  initBlogSpinner();
  updateMenuDrawer();
}