Program: 166864
Project: 166864
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  ButterKnife.inject(this);
  setSupportActionBar(toolbar);
  if (!WAILSettings.isAuthorized(this)) {
    startActivityForResult(new Intent(this,NonAuthorizedActivity.class),REQUEST_CODE_NON_AUTHORIZED_ACTIVITY_INTENT);
  }
  ((TypefaceTextView)findViewById(R.id.main_left_drawer_title_main)).setText(WAILSettings.getLastfmUserName(this));
  ((TypefaceTextView)findViewById(R.id.main_left_drawer_title_secondary)).setText(getString(R.string.drawer_registered_at) + WAILSettings.getLastfmUserRegistered(this).split("String_Node_Str")[0]);
  if (drawerLayout != null) {
    drawerLayout.setStatusBarBackgroundColor(getResources().getColor(R.color.primary_dark));
    DisplayMetrics displayMetrics=getResources().getDisplayMetrics();
    float px=TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,56,displayMetrics);
    ViewGroup.LayoutParams params=drawer.getLayoutParams();
    params.width=displayMetrics.widthPixels - Math.round(px);
    drawer.setLayoutParams(params);
    actionBarDrawerToggle=new ActionBarDrawerToggle(this,drawerLayout,R.string.app_name,R.string.app_name);
    drawerLayout.setDrawerListener(actionBarDrawerToggle);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setHomeButtonEnabled(true);
  }
 else   if (drawerLayoutLand != null) {
    drawerLayoutLand.setStatusBarBackgroundColor(getResources().getColor(R.color.primary_dark));
  }
  ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,R.layout.settings_ignored_players_item_layout,getResources().getStringArray(R.array.drawer_items)){
    @Override public View getView(    int position,    View view,    ViewGroup parent){
      ViewHolder holder;
      View rowView=view;
      if (rowView == null) {
        LayoutInflater inflater=getLayoutInflater();
        rowView=inflater.inflate(R.layout.activity_main_drawer_item_layout,null,true);
        holder=new ViewHolder();
        holder.background=rowView;
        holder.textView=(TypefaceTextView)rowView.findViewById(R.id.activity_main_drawer_item_text);
        holder.imageView=(ImageView)rowView.findViewById(R.id.activity_main_drawer_item_image);
        rowView.setTag(holder);
      }
 else {
        holder=(ViewHolder)rowView.getTag();
      }
      holder.textView.setText(getItem(position));
switch (position) {
case 0:
        holder.imageView.setImageResource(R.drawable.ic_home_grey600_24dp);
      break;
case 1:
    holder.imageView.setImageResource(R.drawable.ic_list_grey600_24dp);
  break;
case 2:
holder.imageView.setImageResource(R.drawable.ic_settings_grey600_24dp);
break;
}
if (position == 0 && lastItemSelected == -1) {
holder.background.setBackgroundColor(getResources().getColor(R.color.drawer_item_selected_background));
lastItemSelected=0;
}
return rowView;
}
class ViewHolder {
View background;
TypefaceTextView textView;
ImageView imageView;
}
}
;
drawerList.setAdapter(adapter);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  ButterKnife.inject(this);
  setSupportActionBar(toolbar);
  if (!WAILSettings.isAuthorized(this)) {
    startActivityForResult(new Intent(this,NonAuthorizedActivity.class),REQUEST_CODE_NON_AUTHORIZED_ACTIVITY_INTENT);
  }
  setDrawerHeaderText();
  if (drawerLayout != null) {
    drawerLayout.setStatusBarBackgroundColor(getResources().getColor(R.color.primary_dark));
    DisplayMetrics displayMetrics=getResources().getDisplayMetrics();
    float px=TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,56,displayMetrics);
    ViewGroup.LayoutParams params=drawer.getLayoutParams();
    params.width=displayMetrics.widthPixels - Math.round(px);
    drawer.setLayoutParams(params);
    actionBarDrawerToggle=new ActionBarDrawerToggle(this,drawerLayout,R.string.app_name,R.string.app_name){
      @Override public void onDrawerOpened(      View drawerView){
        super.onDrawerOpened(drawerView);
        if (StringUtil.isNullOrEmpty(drawerTitleMain.getText().toString()) || StringUtil.isNullOrEmpty(drawerTitleSecondary.getText().toString())) {
          setDrawerHeaderText();
        }
      }
    }
;
    drawerLayout.setDrawerListener(actionBarDrawerToggle);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setHomeButtonEnabled(true);
  }
 else   if (drawerLayoutLand != null) {
    drawerLayoutLand.setStatusBarBackgroundColor(getResources().getColor(R.color.primary_dark));
  }
  ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,R.layout.settings_ignored_players_item_layout,getResources().getStringArray(R.array.drawer_items)){
    @Override public View getView(    int position,    View view,    ViewGroup parent){
      ViewHolder holder;
      View rowView=view;
      if (rowView == null) {
        LayoutInflater inflater=getLayoutInflater();
        rowView=inflater.inflate(R.layout.activity_main_drawer_item_layout,null,true);
        holder=new ViewHolder();
        holder.background=rowView;
        holder.textView=(TypefaceTextView)rowView.findViewById(R.id.activity_main_drawer_item_text);
        holder.imageView=(ImageView)rowView.findViewById(R.id.activity_main_drawer_item_image);
        rowView.setTag(holder);
      }
 else {
        holder=(ViewHolder)rowView.getTag();
      }
      holder.textView.setText(getItem(position));
switch (position) {
case 0:
        holder.imageView.setImageResource(R.drawable.ic_home_grey600_24dp);
      break;
case 1:
    holder.imageView.setImageResource(R.drawable.ic_list_grey600_24dp);
  break;
case 2:
holder.imageView.setImageResource(R.drawable.ic_settings_grey600_24dp);
break;
}
if (position == 0 && lastItemSelected == -1) {
holder.background.setBackgroundColor(getResources().getColor(R.color.drawer_item_selected_background));
lastItemSelected=0;
}
return rowView;
}
class ViewHolder {
View background;
TypefaceTextView textView;
ImageView imageView;
}
}
;
drawerList.setAdapter(adapter);
}