Program: 14519
Project: 14519
Buggy source:
@Override public void onBindViewHolder(final ReaderPostViewHolder holder,final int position){
  final ReaderPost post=mPosts.get(position);
  ReaderTypes.ReaderPostListType postListType=getPostListType();
  holder.txtTitle.setText(post.getTitle());
  holder.txtDate.setText(DateTimeUtils.javaDateToTimeSpan(post.getDatePublished()));
  if (postListType == ReaderTypes.ReaderPostListType.BLOG_PREVIEW) {
    holder.layoutPostHeader.setVisibility(View.GONE);
  }
 else {
    holder.layoutPostHeader.setVisibility(View.VISIBLE);
    holder.imgAvatar.setImageUrl(post.getPostAvatarForDisplay(mAvatarSz),WPNetworkImageView.ImageType.AVATAR);
    if (post.hasBlogName()) {
      holder.txtBlogName.setText(post.getBlogName());
    }
 else     if (post.hasAuthorName()) {
      holder.txtBlogName.setText(post.getAuthorName());
    }
 else {
      holder.txtBlogName.setText(null);
    }
    ReaderUtils.showFollowStatus(holder.txtFollow,post.isFollowedByCurrentUser);
    holder.txtFollow.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        toggleFollow(holder,position,post);
      }
    }
);
    if (!post.isExternal) {
      holder.layoutPostHeader.setEnabled(true);
      holder.layoutPostHeader.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          ReaderActivityLauncher.showReaderBlogPreview(view.getContext(),post.blogId,post.getBlogUrl());
        }
      }
);
    }
 else {
      holder.layoutPostHeader.setOnClickListener(null);
      holder.layoutPostHeader.setEnabled(false);
    }
  }
  if (post.hasExcerpt()) {
    holder.txtText.setVisibility(View.VISIBLE);
    holder.txtText.setText(post.getExcerpt());
  }
 else {
    holder.txtText.setVisibility(View.GONE);
  }
  final int titleMargin;
  if (post.hasFeaturedImage()) {
    final String imageUrl=post.getFeaturedImageForDisplay(mPhotonWidth,mPhotonHeight);
    holder.imgFeatured.setImageUrl(imageUrl,WPNetworkImageView.ImageType.PHOTO);
    holder.imgFeatured.setVisibility(View.VISIBLE);
    titleMargin=mMarginLarge;
  }
 else   if (post.hasFeaturedVideo()) {
    holder.imgFeatured.setVideoUrl(post.postId,post.getFeaturedVideo());
    holder.imgFeatured.setVisibility(View.VISIBLE);
    titleMargin=mMarginLarge;
  }
 else {
    holder.imgFeatured.setVisibility(View.GONE);
    titleMargin=(holder.layoutPostHeader.getVisibility() == View.VISIBLE ? 0 : mMarginLarge);
  }
  RelativeLayout.LayoutParams params=(RelativeLayout.LayoutParams)holder.txtTitle.getLayoutParams();
  params.topMargin=titleMargin;
  final String tagToDisplay=(mCurrentTag != null ? post.getTagForDisplay(mCurrentTag.getTagName()) : null);
  if (!TextUtils.isEmpty(tagToDisplay)) {
    holder.txtTag.setText(tagToDisplay);
    holder.txtTag.setVisibility(View.VISIBLE);
    holder.txtTag.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        if (mOnTagSelectedListener != null) {
          mOnTagSelectedListener.onTagSelected(tagToDisplay);
        }
      }
    }
);
  }
 else {
    holder.txtTag.setVisibility(View.GONE);
    holder.txtTag.setOnClickListener(null);
  }
  boolean showLikes=post.isWP() && post.isLikesEnabled;
  boolean showComments=post.isWP() && (post.isCommentsOpen || post.numReplies > 0);
  if (showLikes || showComments) {
    showCounts(holder,post,false);
  }
  if (showLikes) {
    holder.likeCount.setSelected(post.isLikedByCurrentUser);
    holder.likeCount.setVisibility(View.VISIBLE);
    holder.likeCount.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        toggleLike(v.getContext(),holder,position,post);
      }
    }
);
  }
 else {
    holder.likeCount.setVisibility(View.GONE);
    holder.likeCount.setOnClickListener(null);
  }
  if (showComments) {
    holder.commentCount.setVisibility(View.VISIBLE);
    holder.commentCount.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        ReaderActivityLauncher.showReaderComments(v.getContext(),post);
      }
    }
);
  }
 else {
    holder.commentCount.setVisibility(View.GONE);
    holder.commentCount.setOnClickListener(null);
  }
  if (post.canReblog()) {
    showReblogStatus(holder.imgBtnReblog,post.isRebloggedByCurrentUser);
    holder.imgBtnReblog.setVisibility(View.VISIBLE);
    if (!post.isRebloggedByCurrentUser) {
      holder.imgBtnReblog.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View v){
          ReaderAnim.animateReblogButton(holder.imgBtnReblog);
          if (mReblogListener != null) {
            mReblogListener.onRequestReblog(post,v);
          }
        }
      }
);
    }
 else {
      holder.imgBtnReblog.setOnClickListener(null);
    }
  }
 else {
    holder.imgBtnReblog.setVisibility(View.INVISIBLE);
    holder.imgBtnReblog.setOnClickListener(null);
  }
  if (post.isWP() && !post.isPrivate && postListType == ReaderTypes.ReaderPostListType.TAG_FOLLOWED) {
    holder.imgMore.setVisibility(View.VISIBLE);
    holder.imgMore.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        if (mOnPostPopupListener != null) {
          mOnPostPopupListener.onShowPostPopup(view,post);
        }
      }
    }
);
  }
 else {
    holder.imgMore.setVisibility(View.GONE);
    holder.imgMore.setOnClickListener(null);
  }
  if (mCanRequestMorePosts && mDataRequestedListener != null && (position >= getItemCount() - 1)) {
    mDataRequestedListener.onRequestData();
  }
}

Fixed version (ground truth):
@Override public void onBindViewHolder(final ReaderPostViewHolder holder,final int position){
  final ReaderPost post=mPosts.get(position);
  ReaderTypes.ReaderPostListType postListType=getPostListType();
  holder.txtTitle.setText(post.getTitle());
  holder.txtDate.setText(DateTimeUtils.javaDateToTimeSpan(post.getDatePublished()));
  if (postListType == ReaderTypes.ReaderPostListType.BLOG_PREVIEW) {
    holder.layoutPostHeader.setVisibility(View.GONE);
  }
 else {
    holder.layoutPostHeader.setVisibility(View.VISIBLE);
    holder.imgAvatar.setImageUrl(post.getPostAvatarForDisplay(mAvatarSz),WPNetworkImageView.ImageType.AVATAR);
    if (post.hasBlogName()) {
      holder.txtBlogName.setText(post.getBlogName());
    }
 else     if (post.hasAuthorName()) {
      holder.txtBlogName.setText(post.getAuthorName());
    }
 else {
      holder.txtBlogName.setText(null);
    }
    ReaderUtils.showFollowStatus(holder.txtFollow,post.isFollowedByCurrentUser);
    holder.txtFollow.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        toggleFollow(holder,position,post);
      }
    }
);
    if (!post.isExternal) {
      holder.layoutPostHeader.setEnabled(true);
      holder.layoutPostHeader.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          ReaderActivityLauncher.showReaderBlogPreview(view.getContext(),post.blogId,post.getBlogUrl());
        }
      }
);
    }
 else {
      holder.layoutPostHeader.setOnClickListener(null);
      holder.layoutPostHeader.setEnabled(false);
    }
  }
  if (post.hasExcerpt()) {
    holder.txtText.setVisibility(View.VISIBLE);
    holder.txtText.setText(post.getExcerpt());
  }
 else {
    holder.txtText.setVisibility(View.GONE);
  }
  final int titleMargin;
  if (post.hasFeaturedImage()) {
    final String imageUrl=post.getFeaturedImageForDisplay(mPhotonWidth,mPhotonHeight);
    holder.imgFeatured.setImageUrl(imageUrl,WPNetworkImageView.ImageType.PHOTO);
    holder.imgFeatured.setVisibility(View.VISIBLE);
    titleMargin=mMarginLarge;
  }
 else   if (post.hasFeaturedVideo()) {
    holder.imgFeatured.setVideoUrl(post.postId,post.getFeaturedVideo());
    holder.imgFeatured.setVisibility(View.VISIBLE);
    titleMargin=mMarginLarge;
  }
 else {
    holder.imgFeatured.setVisibility(View.GONE);
    titleMargin=(holder.layoutPostHeader.getVisibility() == View.VISIBLE ? 0 : mMarginLarge);
  }
  RelativeLayout.LayoutParams params=(RelativeLayout.LayoutParams)holder.txtTitle.getLayoutParams();
  params.topMargin=titleMargin;
  final String tagToDisplay=(mCurrentTag != null ? post.getTagForDisplay(mCurrentTag.getTagName()) : null);
  if (!TextUtils.isEmpty(tagToDisplay)) {
    holder.txtTag.setText(tagToDisplay);
    holder.txtTag.setVisibility(View.VISIBLE);
    holder.txtTag.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        if (mOnTagSelectedListener != null) {
          mOnTagSelectedListener.onTagSelected(tagToDisplay);
        }
      }
    }
);
  }
 else {
    holder.txtTag.setVisibility(View.GONE);
    holder.txtTag.setOnClickListener(null);
  }
  boolean showLikes=post.isWP() && post.isLikesEnabled;
  boolean showComments=post.isWP() && (post.isCommentsOpen || post.numReplies > 0);
  if (showLikes || showComments) {
    showCounts(holder,post,false);
  }
  if (showLikes) {
    holder.likeCount.setSelected(post.isLikedByCurrentUser);
    holder.likeCount.setVisibility(View.VISIBLE);
    holder.likeCount.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        toggleLike(v.getContext(),holder,position,post);
      }
    }
);
  }
 else {
    holder.likeCount.setVisibility(View.GONE);
    holder.likeCount.setOnClickListener(null);
  }
  if (showComments) {
    holder.commentCount.setVisibility(View.VISIBLE);
    holder.commentCount.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        ReaderActivityLauncher.showReaderComments(v.getContext(),post);
      }
    }
);
  }
 else {
    holder.commentCount.setVisibility(View.GONE);
    holder.commentCount.setOnClickListener(null);
  }
  if (post.canReblog()) {
    showReblogStatus(holder.imgBtnReblog,post.isRebloggedByCurrentUser);
    holder.imgBtnReblog.setVisibility(View.VISIBLE);
    if (!post.isRebloggedByCurrentUser) {
      holder.imgBtnReblog.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View v){
          ReaderAnim.animateReblogButton(holder.imgBtnReblog);
          if (mReblogListener != null) {
            mReblogListener.onRequestReblog(post,v);
          }
        }
      }
);
    }
 else {
      holder.imgBtnReblog.setOnClickListener(null);
    }
  }
 else {
    holder.imgBtnReblog.setVisibility(View.INVISIBLE);
    holder.imgBtnReblog.setOnClickListener(null);
  }
  if (post.isWP() && !post.isPrivate && postListType == ReaderTypes.ReaderPostListType.TAG_FOLLOWED) {
    holder.imgMore.setVisibility(View.VISIBLE);
    holder.imgMore.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        if (mOnPostPopupListener != null) {
          mOnPostPopupListener.onShowPostPopup(view,post);
        }
      }
    }
);
  }
 else {
    holder.imgMore.setVisibility(View.GONE);
    holder.imgMore.setOnClickListener(null);
  }
  if (mCanRequestMorePosts && mDataRequestedListener != null && (position >= getItemCount() - 1)) {
    mDataRequestedListener.onRequestData();
  }
  if (mPostSelectedListener != null) {
    holder.itemView.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        mPostSelectedListener.onPostSelected(post.blogId,post.postId);
      }
    }
);
  }
  ;
}