Program: 36336
Project: 36336
Buggy source:
private void initializeView(){
  navigationTabs=Arrays.asList(getResources().getStringArray(R.array.navigation_tab));
  drawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  mainContent=(LinearLayout)findViewById(R.id.llMainContent);
  headerRegistrationNumber=(TextView)drawerLayout.findViewById(R.id.header_registration_number);
  headerUsername=(TextView)drawerLayout.findViewById(R.id.header_username);
  final Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  final ActionBar actionBar=getSupportActionBar();
  if (actionBar != null) {
    ActionBarDrawerToggle mDrawerToggle=new ActionBarDrawerToggle(this,drawerLayout,toolbar,R.string.navigation_drawer_open,R.string.navigation_drawer_close);
    drawerLayout.setDrawerListener(mDrawerToggle);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setHomeButtonEnabled(true);
    mDrawerToggle.syncState();
  }
  NavigationView view=(NavigationView)findViewById(R.id.navigation_view);
  view.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener(){
    @Override public boolean onNavigationItemSelected(    final MenuItem menuItem){
      menuItem.setChecked(true);
      drawerLayout.closeDrawers();
      new Handler().postDelayed(new Runnable(){
        @Override public void run(){
          switchFragment(menuItem.getItemId());
        }
      }
,Constants.DRAWER_CLOSE_TIME_OUT);
      return true;
    }
  }
);
  getSupportFragmentManager().beginTransaction().add(R.id.flContent,new ScheduleFragment(),ScheduleFragment.class.getSimpleName()).commitAllowingStateLoss();
}

Fixed version (ground truth):
private void initializeView(){
  navigationTabs=Arrays.asList(getResources().getStringArray(R.array.navigation_tab));
  drawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  mainContent=(LinearLayout)findViewById(R.id.llMainContent);
  final Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  final ActionBar actionBar=getSupportActionBar();
  if (actionBar != null) {
    ActionBarDrawerToggle mDrawerToggle=new ActionBarDrawerToggle(this,drawerLayout,toolbar,R.string.navigation_drawer_open,R.string.navigation_drawer_close);
    drawerLayout.setDrawerListener(mDrawerToggle);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setHomeButtonEnabled(true);
    mDrawerToggle.syncState();
  }
  NavigationView navigationView=(NavigationView)findViewById(R.id.navigation_view);
  navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener(){
    @Override public boolean onNavigationItemSelected(    final MenuItem menuItem){
      menuItem.setChecked(true);
      drawerLayout.closeDrawers();
      new Handler().postDelayed(new Runnable(){
        @Override public void run(){
          switchFragment(menuItem.getItemId());
        }
      }
,Constants.DRAWER_CLOSE_TIME_OUT);
      return true;
    }
  }
);
  View headerLayout=navigationView.getHeaderView(0);
  headerRegistrationNumber=(TextView)headerLayout.findViewById(R.id.header_registration_number);
  headerUsername=(TextView)headerLayout.findViewById(R.id.header_username);
  if (StringUtils.checkString(registerNumber)) {
    headerRegistrationNumber.setText(registerNumber);
  }
  if (StringUtils.checkString(name)) {
    headerUsername.setText(StringUtils.toTitleCase(name));
  }
  getSupportFragmentManager().beginTransaction().add(R.id.flContent,new ScheduleFragment(),ScheduleFragment.class.getSimpleName()).commitAllowingStateLoss();
}