Program: 56426
Project: 56426
Buggy source:
private void updateRelatedView(Cursor related){
  relatedContainer.removeAllViews();
  final int count=related.getCount();
  final int visibility=count > 0 ? View.VISIBLE : View.GONE;
  relatedParent.setVisibility(visibility);
  int index=0;
  related.moveToPosition(-1);
  while (related.moveToNext() && index < 3) {
    View v=LayoutInflater.from(getActivity()).inflate(R.layout.item_related,this.relatedContainer,false);
    final long relatedShowId=Cursors.getLong(related,RelatedShowsColumns.RELATED_SHOW_ID);
    final String title=Cursors.getString(related,ShowColumns.TITLE);
    final String overview=Cursors.getString(related,ShowColumns.OVERVIEW);
    final int rating=Cursors.getInt(related,ShowColumns.RATING);
    final int votes=Cursors.getInt(related,ShowColumns.VOTES);
    final String poster=ImageUri.create(ImageUri.ITEM_SHOW,ImageType.POSTER,relatedShowId);
    RemoteImageView posterView=(RemoteImageView)v.findViewById(R.id.related_poster);
    posterView.addTransformation(new CircleTransformation());
    posterView.setImage(poster);
    TextView titleView=(TextView)v.findViewById(R.id.related_title);
    titleView.setText(title);
    float convertedRating=rating / 10.0f;
    final String formattedRating=String.format(Locale.getDefault(),"String_Node_Str",convertedRating);
    String ratingText;
    if (votes >= 1000) {
      final float convertedVotes=votes / 1000.0f;
      final String formattedVotes=String.format(Locale.getDefault(),"String_Node_Str",convertedVotes);
      ratingText=getString(R.string.related_rating_thousands,formattedRating,formattedVotes);
    }
 else {
      ratingText=getString(R.string.related_rating,formattedRating,votes);
    }
    TextView ratingView=(TextView)v.findViewById(R.id.related_rating);
    ratingView.setText(ratingText);
    v.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        navigationListener.onDisplayShow(relatedShowId,title,overview,LibraryType.WATCHED);
      }
    }
);
    relatedContainer.addView(v);
    index++;
  }
}

Fixed version (ground truth):
private void updateRelatedView(Cursor related){
  relatedContainer.removeAllViews();
  final int count=related.getCount();
  final int visibility=count > 0 ? View.VISIBLE : View.GONE;
  relatedParent.setVisibility(visibility);
  int index=0;
  related.moveToPosition(-1);
  while (related.moveToNext() && index < 3) {
    View v=LayoutInflater.from(getActivity()).inflate(R.layout.item_related,this.relatedContainer,false);
    final long relatedShowId=Cursors.getLong(related,RelatedShowsColumns.RELATED_SHOW_ID);
    final String title=Cursors.getString(related,ShowColumns.TITLE);
    final String overview=Cursors.getString(related,ShowColumns.OVERVIEW);
    final float rating=Cursors.getFloat(related,ShowColumns.RATING);
    final int votes=Cursors.getInt(related,ShowColumns.VOTES);
    final String poster=ImageUri.create(ImageUri.ITEM_SHOW,ImageType.POSTER,relatedShowId);
    RemoteImageView posterView=(RemoteImageView)v.findViewById(R.id.related_poster);
    posterView.addTransformation(new CircleTransformation());
    posterView.setImage(poster);
    TextView titleView=(TextView)v.findViewById(R.id.related_title);
    titleView.setText(title);
    final String formattedRating=String.format(Locale.getDefault(),"String_Node_Str",rating);
    String ratingText;
    if (votes >= 1000) {
      final float convertedVotes=votes / 1000.0f;
      final String formattedVotes=String.format(Locale.getDefault(),"String_Node_Str",convertedVotes);
      ratingText=getString(R.string.related_rating_thousands,formattedRating,formattedVotes);
    }
 else {
      ratingText=getString(R.string.related_rating,formattedRating,votes);
    }
    TextView ratingView=(TextView)v.findViewById(R.id.related_rating);
    ratingView.setText(ratingText);
    v.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        navigationListener.onDisplayShow(relatedShowId,title,overview,LibraryType.WATCHED);
      }
    }
);
    relatedContainer.addView(v);
    index++;
  }
}