Program: 81067
Project: 81067
Buggy source:
@Override protected void initView(final View view,CombinedArrivalInfoStyleB combinedArrivalInfoStyleB){
  final ArrivalInfo stopInfo=combinedArrivalInfoStyleB.getArrivalInfoList().get(0);
  final ObaArrivalInfo arrivalInfo=stopInfo.getInfo();
  final Context context=getContext();
  LayoutInflater inflater=LayoutInflater.from(context);
  TextView routeName=(TextView)view.findViewById(R.id.routeName);
  TextView destination=(TextView)view.findViewById(R.id.routeDestination);
  TableLayout arrivalTimesLayout=(TableLayout)view.findViewById(R.id.arrivalTimeLayout);
  arrivalTimesLayout.removeAllViews();
  Resources r=view.getResources();
  ImageButton starBtn=(ImageButton)view.findViewById(R.id.route_star);
  starBtn.setColorFilter(r.getColor(R.color.theme_primary));
  ImageButton mapImageBtn=(ImageButton)view.findViewById(R.id.mapImageBtn);
  mapImageBtn.setColorFilter(r.getColor(R.color.theme_primary));
  ImageButton routeMoreInfo=(ImageButton)view.findViewById(R.id.route_more_info);
  routeMoreInfo.setColorFilter(r.getColor(R.color.theme_primary));
  starBtn.setImageResource(stopInfo.isRouteAndHeadsignFavorite() ? R.drawable.focus_star_on : R.drawable.focus_star_off);
  starBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      RouteFavoriteDialogFragment dialog=new RouteFavoriteDialogFragment.Builder(stopInfo.getInfo().getRouteId(),stopInfo.getInfo().getHeadsign()).setRouteShortName(stopInfo.getInfo().getShortName()).setRouteLongName(stopInfo.getInfo().getRouteLongName()).setStopId(stopInfo.getInfo().getStopId()).setFavorite(!stopInfo.isRouteAndHeadsignFavorite()).build();
      dialog.setCallback(new RouteFavoriteDialogFragment.Callback(){
        @Override public void onSelectionComplete(        boolean savedFavorite){
          if (savedFavorite) {
            mFragment.refreshLocal();
          }
        }
      }
);
      dialog.show(mFragment.getFragmentManager(),RouteFavoriteDialogFragment.TAG);
    }
  }
);
  mapImageBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      HomeActivity.start(getContext(),stopInfo.getInfo().getRouteId());
    }
  }
);
  routeMoreInfo.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      mFragment.showListItemMenu(view,stopInfo);
    }
  }
);
  startRealtimeAnimation(view);
  routeName.setText(arrivalInfo.getShortName());
  destination.setText(MyTextUtils.toTitleCase(arrivalInfo.getHeadsign()));
  for (int i=0; i < combinedArrivalInfoStyleB.getArrivalInfoList().size(); i++) {
    ArrivalInfo arrivalRow=combinedArrivalInfoStyleB.getArrivalInfoList().get(i);
    final ObaArrivalInfo tempArrivalInfo=arrivalRow.getInfo();
    long scheduledTime=tempArrivalInfo.getScheduledArrivalTime();
    TableRow tr=new TableRow(getContext());
    tr.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT,TableRow.LayoutParams.MATCH_PARENT));
    tr.setFocusable(false);
    tr.setClickable(false);
    RelativeLayout layout;
    TextView scheduleView, estimatedView;
    View divider;
    if (i == 0) {
      layout=(RelativeLayout)inflater.inflate(R.layout.arrivals_list_rl_template_style_b_large,null);
      scheduleView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_schedule_large,null);
      estimatedView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_estimated_large,null);
    }
 else {
      layout=(RelativeLayout)inflater.inflate(R.layout.arrivals_list_rl_template_style_b_small,null);
      scheduleView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_schedule_small,null);
      estimatedView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_estimated_small,null);
    }
    scheduleView.setText(DateUtils.formatDateTime(context,scheduledTime,DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_NO_MIDNIGHT));
    if (arrivalRow.getPredicted()) {
      long eta=arrivalRow.getEta();
      if (eta == 0) {
        estimatedView.setText(R.string.stop_info_eta_now);
      }
 else {
        estimatedView.setText(String.valueOf(Math.abs(eta)) + "String_Node_Str");
      }
    }
 else {
      estimatedView.setText(R.string.stop_info_eta_unknown);
    }
    layout.addView(scheduleView);
    layout.addView(estimatedView);
    RelativeLayout.LayoutParams params1=(RelativeLayout.LayoutParams)scheduleView.getLayoutParams();
    params1.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
    scheduleView.setLayoutParams(params1);
    RelativeLayout.LayoutParams params2=(RelativeLayout.LayoutParams)estimatedView.getLayoutParams();
    params2.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
    estimatedView.setLayoutParams(params2);
    tr.addView(layout);
    if (i != 0) {
      int dividerHeight=UIHelp.dpToPixels(context,1);
      divider=inflater.inflate(R.layout.arrivals_list_divider_template_style_b,null);
      divider.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT,dividerHeight));
      arrivalTimesLayout.addView(divider);
    }
    arrivalTimesLayout.addView(tr,new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT,TableLayout.LayoutParams.MATCH_PARENT));
  }
  ContentValues values=null;
  if (mTripsForStop != null) {
    values=mTripsForStop.getValues(arrivalInfo.getTripId());
  }
  if (values != null) {
    String reminderName=values.getAsString(ObaContract.Trips.NAME);
    TextView reminder=(TextView)view.findViewById(R.id.reminder);
    if (reminderName.length() == 0) {
      reminderName=context.getString(R.string.trip_info_noname);
    }
    reminder.setText(reminderName);
    Drawable d=reminder.getCompoundDrawables()[0];
    d=DrawableCompat.wrap(d);
    DrawableCompat.setTint(d.mutate(),view.getResources().getColor(R.color.theme_primary));
    reminder.setCompoundDrawables(d,null,null,null);
    reminder.setVisibility(View.VISIBLE);
  }
 else {
    View reminder=view.findViewById(R.id.reminder);
    reminder.setVisibility(View.GONE);
  }
}

Fixed version (ground truth):
@Override protected void initView(final View view,CombinedArrivalInfoStyleB combinedArrivalInfoStyleB){
  final ArrivalInfo stopInfo=combinedArrivalInfoStyleB.getArrivalInfoList().get(0);
  final ObaArrivalInfo arrivalInfo=stopInfo.getInfo();
  final Context context=getContext();
  LayoutInflater inflater=LayoutInflater.from(context);
  TextView routeName=(TextView)view.findViewById(R.id.routeName);
  TextView destination=(TextView)view.findViewById(R.id.routeDestination);
  TableLayout arrivalTimesLayout=(TableLayout)view.findViewById(R.id.arrivalTimeLayout);
  arrivalTimesLayout.removeAllViews();
  Resources r=view.getResources();
  ImageButton starBtn=(ImageButton)view.findViewById(R.id.route_star);
  starBtn.setColorFilter(r.getColor(R.color.theme_primary));
  ImageButton mapImageBtn=(ImageButton)view.findViewById(R.id.mapImageBtn);
  mapImageBtn.setColorFilter(r.getColor(R.color.theme_primary));
  ImageButton routeMoreInfo=(ImageButton)view.findViewById(R.id.route_more_info);
  routeMoreInfo.setColorFilter(r.getColor(R.color.theme_primary));
  starBtn.setImageResource(stopInfo.isRouteAndHeadsignFavorite() ? R.drawable.focus_star_on : R.drawable.focus_star_off);
  starBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      RouteFavoriteDialogFragment dialog=new RouteFavoriteDialogFragment.Builder(stopInfo.getInfo().getRouteId(),stopInfo.getInfo().getHeadsign()).setRouteShortName(stopInfo.getInfo().getShortName()).setRouteLongName(stopInfo.getInfo().getRouteLongName()).setStopId(stopInfo.getInfo().getStopId()).setFavorite(!stopInfo.isRouteAndHeadsignFavorite()).build();
      dialog.setCallback(new RouteFavoriteDialogFragment.Callback(){
        @Override public void onSelectionComplete(        boolean savedFavorite){
          if (savedFavorite) {
            mFragment.refreshLocal();
          }
        }
      }
);
      dialog.show(mFragment.getFragmentManager(),RouteFavoriteDialogFragment.TAG);
    }
  }
);
  mapImageBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      HomeActivity.start(getContext(),stopInfo.getInfo().getRouteId());
    }
  }
);
  routeMoreInfo.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      mFragment.showListItemMenu(view,stopInfo);
    }
  }
);
  routeName.setText(arrivalInfo.getShortName());
  destination.setText(MyTextUtils.toTitleCase(arrivalInfo.getHeadsign()));
  for (int i=0; i < combinedArrivalInfoStyleB.getArrivalInfoList().size(); i++) {
    ArrivalInfo arrivalRow=combinedArrivalInfoStyleB.getArrivalInfoList().get(i);
    final ObaArrivalInfo tempArrivalInfo=arrivalRow.getInfo();
    long scheduledTime=tempArrivalInfo.getScheduledArrivalTime();
    TableRow tr=new TableRow(getContext());
    tr.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT,TableRow.LayoutParams.MATCH_PARENT));
    tr.setFocusable(false);
    tr.setClickable(false);
    RelativeLayout layout;
    TextView scheduleView, estimatedView;
    View divider;
    if (i == 0) {
      layout=(RelativeLayout)inflater.inflate(R.layout.arrivals_list_rl_template_style_b_large,null);
      scheduleView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_schedule_large,null);
      estimatedView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_estimated_large,null);
    }
 else {
      layout=(RelativeLayout)inflater.inflate(R.layout.arrivals_list_rl_template_style_b_small,null);
      scheduleView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_schedule_small,null);
      estimatedView=(TextView)inflater.inflate(R.layout.arrivals_list_tv_template_style_b_estimated_small,null);
    }
    scheduleView.setText(DateUtils.formatDateTime(context,scheduledTime,DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_NO_MIDNIGHT));
    if (arrivalRow.getPredicted()) {
      long eta=arrivalRow.getEta();
      if (eta == 0) {
        estimatedView.setText(R.string.stop_info_eta_now);
      }
 else {
        estimatedView.setText(String.valueOf(Math.abs(eta)) + "String_Node_Str");
      }
    }
 else {
      estimatedView.setText(R.string.stop_info_eta_unknown);
    }
    layout.addView(scheduleView);
    layout.addView(estimatedView);
    RelativeLayout.LayoutParams params1=(RelativeLayout.LayoutParams)scheduleView.getLayoutParams();
    params1.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
    scheduleView.setLayoutParams(params1);
    RelativeLayout.LayoutParams params2=(RelativeLayout.LayoutParams)estimatedView.getLayoutParams();
    params2.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
    estimatedView.setLayoutParams(params2);
    tr.addView(layout);
    if (i != 0) {
      int dividerHeight=UIHelp.dpToPixels(context,1);
      divider=inflater.inflate(R.layout.arrivals_list_divider_template_style_b,null);
      divider.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT,dividerHeight));
      arrivalTimesLayout.addView(divider);
    }
    arrivalTimesLayout.addView(tr,new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT,TableLayout.LayoutParams.MATCH_PARENT));
  }
  ContentValues values=null;
  if (mTripsForStop != null) {
    values=mTripsForStop.getValues(arrivalInfo.getTripId());
  }
  if (values != null) {
    String reminderName=values.getAsString(ObaContract.Trips.NAME);
    TextView reminder=(TextView)view.findViewById(R.id.reminder);
    if (reminderName.length() == 0) {
      reminderName=context.getString(R.string.trip_info_noname);
    }
    reminder.setText(reminderName);
    Drawable d=reminder.getCompoundDrawables()[0];
    d=DrawableCompat.wrap(d);
    DrawableCompat.setTint(d.mutate(),view.getResources().getColor(R.color.theme_primary));
    reminder.setCompoundDrawables(d,null,null,null);
    reminder.setVisibility(View.VISIBLE);
  }
 else {
    View reminder=view.findViewById(R.id.reminder);
    reminder.setVisibility(View.GONE);
  }
}