Program: 86162
Project: 86162
Buggy source:
public View getView(final int position,View convertView,ViewGroup parent){
  Model model=mData.get(position);
  if (model instanceof ScheduleItem) {
    final ScheduleItem scheduleItem=(ScheduleItem)model;
    if (convertView == null || convertView.getId() != R.id.schedule_list_item) {
      LayoutInflater inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      convertView=inflater.inflate(mResource,parent,false);
    }
    final Intent intent=getIntent(position);
    final Context context=convertView.getContext();
    convertView.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        Resources res=context.getResources();
        String title=res.getString(R.string.calendar_dialog_title);
        String message=String.format(res.getString(R.string.calendar_dialog_message),scheduleItem.name);
        String yes=res.getString(R.string.dialog_button_yes);
        String cancel=res.getString(R.string.dialog_button_cancel);
        ConfirmDialogFragment dialog=ConfirmDialogFragment.getInstance(title,message,yes,cancel);
        dialog.setTargetFragment(mFragment,0);
        Bundle args=dialog.getArguments();
        args.putInt(CONFIRM_DIALOG_POSITION_KEY,position);
        dialog.setArguments(args);
        dialog.show(mFragment.getFragmentManager(),CONFIRM_DIALOG_TAG);
      }
    }
);
    convertView.findViewById(R.id.schedule_item_type).setBackgroundDrawable(getIndicator(scheduleItem.type));
    ((TextView)convertView.findViewById(R.id.schedule_item_name)).setText(scheduleItem.name);
    ((TextView)convertView.findViewById(R.id.schedule_item_speaker)).setText(scheduleItem.speaker);
    TextView locationText=(TextView)convertView.findViewById(R.id.schedule_item_location);
    if (TextUtils.isEmpty(scheduleItem.location)) {
      locationText.setVisibility(View.GONE);
    }
 else {
      locationText.setVisibility(View.VISIBLE);
      locationText.setText(scheduleItem.location);
    }
    ArrayList<String> times=new ArrayList<String>();
    times.add(scheduleItem.start_time);
    times.add(scheduleItem.end_time);
    ((TextView)convertView.findViewById(R.id.schedule_item_time)).setText(DateFormatter.getTimespanString(times));
    TextView descriptionText=(TextView)convertView.findViewById(R.id.schedule_item_description);
    if (TextUtils.isEmpty(scheduleItem.description)) {
      descriptionText.setVisibility(View.GONE);
    }
 else {
      descriptionText.setVisibility(View.VISIBLE);
      descriptionText.setText(scheduleItem.description);
    }
    Resources res=context.getResources();
    TextView speakerText=(TextView)convertView.findViewById(R.id.schedule_item_speaker);
    if (TextUtils.isEmpty(scheduleItem.speaker)) {
      speakerText.setVisibility(View.GONE);
    }
 else {
      speakerText.setVisibility(View.VISIBLE);
      speakerText.setText(scheduleItem.speaker);
    }
    if (speakerText.getVisibility() != View.VISIBLE && descriptionText.getVisibility() != View.VISIBLE) {
      convertView.findViewById(R.id.schedule_item_description_holder).setVisibility(View.GONE);
    }
  }
 else   if (model instanceof Instruction) {
    final Instruction instruction=(Instruction)model;
    if (convertView == null || convertView.getId() != R.id.instruction_list_item) {
      LayoutInflater inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      convertView=inflater.inflate(R.layout.instruction_list_item,parent,false);
    }
  }
  return convertView;
}

Fixed version (ground truth):
public View getView(final int position,View convertView,ViewGroup parent){
  Model model=mData.get(position);
  if (model instanceof ScheduleItem) {
    final ScheduleItem scheduleItem=(ScheduleItem)model;
    if (convertView == null || convertView.getId() != R.id.schedule_list_item) {
      LayoutInflater inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      convertView=inflater.inflate(mResource,parent,false);
    }
    final Intent intent=getIntent(position);
    final Context context=convertView.getContext();
    convertView.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        Resources res=context.getResources();
        String title=res.getString(R.string.calendar_dialog_title);
        String message=String.format(res.getString(R.string.calendar_dialog_message),scheduleItem.name);
        String yes=res.getString(R.string.dialog_button_yes);
        String cancel=res.getString(R.string.dialog_button_cancel);
        ConfirmDialogFragment dialog=ConfirmDialogFragment.getInstance(title,message,yes,cancel);
        dialog.setTargetFragment(mFragment,0);
        Bundle args=dialog.getArguments();
        args.putInt(CONFIRM_DIALOG_POSITION_KEY,position);
        dialog.setArguments(args);
        dialog.show(mFragment.getFragmentManager(),CONFIRM_DIALOG_TAG);
      }
    }
);
    convertView.findViewById(R.id.schedule_item_type).setBackgroundDrawable(getIndicator(scheduleItem.type));
    ((TextView)convertView.findViewById(R.id.schedule_item_name)).setText(scheduleItem.name);
    ((TextView)convertView.findViewById(R.id.schedule_item_speaker)).setText(scheduleItem.speaker);
    TextView locationText=(TextView)convertView.findViewById(R.id.schedule_item_location);
    if (TextUtils.isEmpty(scheduleItem.location)) {
      locationText.setVisibility(View.GONE);
    }
 else {
      locationText.setVisibility(View.VISIBLE);
      locationText.setText(scheduleItem.location);
    }
    ArrayList<String> times=new ArrayList<String>();
    times.add(scheduleItem.start_time);
    times.add(scheduleItem.end_time);
    ((TextView)convertView.findViewById(R.id.schedule_item_time)).setText(DateFormatter.getTimespanString(times));
    TextView descriptionText=(TextView)convertView.findViewById(R.id.schedule_item_description);
    if (TextUtils.isEmpty(scheduleItem.description)) {
      descriptionText.setVisibility(View.GONE);
    }
 else {
      descriptionText.setVisibility(View.VISIBLE);
      descriptionText.setText(scheduleItem.description);
    }
    Resources res=context.getResources();
    TextView speakerText=(TextView)convertView.findViewById(R.id.schedule_item_speaker);
    if (TextUtils.isEmpty(scheduleItem.speaker)) {
      speakerText.setVisibility(View.GONE);
    }
 else {
      speakerText.setVisibility(View.VISIBLE);
      speakerText.setText(scheduleItem.speaker);
    }
    if (speakerText.getVisibility() != View.VISIBLE && descriptionText.getVisibility() != View.VISIBLE) {
      convertView.findViewById(R.id.schedule_item_description_holder).setVisibility(View.GONE);
    }
 else {
      convertView.findViewById(R.id.schedule_item_description_holder).setVisibility(View.VISIBLE);
    }
  }
 else   if (model instanceof Instruction) {
    final Instruction instruction=(Instruction)model;
    if (convertView == null || convertView.getId() != R.id.instruction_list_item) {
      LayoutInflater inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      convertView=inflater.inflate(R.layout.instruction_list_item,parent,false);
    }
  }
  return convertView;
}