Program: 56425
Project: 56425
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,relatedContainer,false);
    final long relatedMovieId=Cursors.getLong(related,RelatedMoviesColumns.RELATED_MOVIE_ID);
    final String title=Cursors.getString(related,MovieColumns.TITLE);
    final String overview=Cursors.getString(related,MovieColumns.OVERVIEW);
    final int rating=Cursors.getInt(related,MovieColumns.RATING);
    final int votes=Cursors.getInt(related,MovieColumns.VOTES);
    final String poster=ImageUri.create(ImageUri.ITEM_MOVIE,ImageType.POSTER,relatedMovieId);
    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.onDisplayMovie(relatedMovieId,title,overview);
      }
    }
);
    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,relatedContainer,false);
    final long relatedMovieId=Cursors.getLong(related,RelatedMoviesColumns.RELATED_MOVIE_ID);
    final String title=Cursors.getString(related,MovieColumns.TITLE);
    final String overview=Cursors.getString(related,MovieColumns.OVERVIEW);
    final float rating=Cursors.getFloat(related,MovieColumns.RATING);
    final int votes=Cursors.getInt(related,MovieColumns.VOTES);
    final String poster=ImageUri.create(ImageUri.ITEM_MOVIE,ImageType.POSTER,relatedMovieId);
    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.onDisplayMovie(relatedMovieId,title,overview);
      }
    }
);
    relatedContainer.addView(v);
    index++;
  }
}