Program: 111921
Project: 111921
Buggy source:
/** 
 * Users of this fragment must call this method to set up the navigation drawer interactions.
 * @param fragmentId   The android:id of this fragment in its activity's layout.
 * @param drawerLayout The DrawerLayout containing this fragment's UI.
 */
public void setUp(int fragmentId,DrawerLayout drawerLayout){
  mFragmentContainerView=getActivity().findViewById(fragmentId);
  mDrawerLayout=drawerLayout;
  mDrawerLayout.setScrimColor(getResources().getColor(R.color.bg_glass));
  ActionBar actionBar=getActionBar();
  actionBar.setDisplayHomeAsUpEnabled(true);
  actionBar.setHomeButtonEnabled(true);
  mDrawerToggle=new EtsyActionBarDrawerToggle(getActivity(),mDrawerLayout,R.drawable.ic_drawer,R.string.navigation_drawer_open,R.string.navigation_drawer_close){
    @Override public void onDrawerClosed(    View drawerView){
      super.onDrawerClosed(drawerView);
      if (!isAdded()) {
        return;
      }
      getActivity().supportInvalidateOptionsMenu();
    }
    @Override public void onDrawerOpened(    View drawerView){
      super.onDrawerOpened(drawerView);
      if (!isAdded()) {
        return;
      }
      if (!mUserLearnedDrawer) {
        mUserLearnedDrawer=true;
        SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(getActivity());
        sp.edit().putBoolean(PREF_USER_LEARNED_DRAWER,true).apply();
      }
      getActivity().supportInvalidateOptionsMenu();
    }
  }
;
  if (!mUserLearnedDrawer && !mFromSavedInstanceState) {
    mDrawerLayout.openDrawer(mFragmentContainerView);
  }
  mDrawerLayout.post(new Runnable(){
    @Override public void run(){
      mDrawerToggle.syncState();
    }
  }
);
  mDrawerLayout.setDrawerListener(mDrawerToggle);
}

Fixed version (ground truth):
/** 
 * Users of this fragment must call this method to set up the navigation drawer interactions.
 * @param fragmentId   The android:id of this fragment in its activity's layout.
 * @param drawerLayout The DrawerLayout containing this fragment's UI.
 */
public void setUp(int fragmentId,DrawerLayout drawerLayout){
  mFragmentContainerView=getActivity().findViewById(fragmentId);
  mDrawerLayout=drawerLayout;
  mDrawerLayout.setScrimColor(getResources().getColor(R.color.bg_glass));
  ActionBar actionBar=getActionBar();
  actionBar.setDisplayHomeAsUpEnabled(true);
  actionBar.setHomeButtonEnabled(true);
  mDrawerToggle=new EtsyActionBarDrawerToggle(getActivity(),mDrawerLayout,R.drawable.ic_drawer,R.string.navigation_drawer_open,R.string.navigation_drawer_close){
    @Override public void onDrawerClosed(    View drawerView){
      super.onDrawerClosed(drawerView);
      if (!isAdded()) {
        return;
      }
      getActivity().supportInvalidateOptionsMenu();
    }
    @Override public void onDrawerOpened(    View drawerView){
      super.onDrawerOpened(drawerView);
      if (!isAdded()) {
        return;
      }
      if (!mUserLearnedDrawer) {
        mUserLearnedDrawer=true;
        SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(getActivity());
        sp.edit().putBoolean(PREF_USER_LEARNED_DRAWER,true).commit();
      }
      getActivity().supportInvalidateOptionsMenu();
    }
  }
;
  if (!mUserLearnedDrawer && !mFromSavedInstanceState) {
    mDrawerLayout.openDrawer(mFragmentContainerView);
  }
  mDrawerLayout.post(new Runnable(){
    @Override public void run(){
      mDrawerToggle.syncState();
    }
  }
);
  mDrawerLayout.setDrawerListener(mDrawerToggle);
}