Program: 14657
Project: 14657
Buggy source:
@Override protected void onPostExecute(Boolean result){
  mIsPostTaskRunning=false;
  if (!hasActivity()) {
    return;
  }
  if (!result) {
    if (!mHasAlreadyRequestedPost) {
      mHasAlreadyRequestedPost=true;
      requestPost();
    }
    return;
  }
  final String postTitle=mPost.hasTitle() ? mPost.getTitle() : getString(R.string.reader_untitled_post);
  if (hostIsReaderActivity()) {
    getActivity().setTitle(postTitle);
  }
  txtTitle.setText(postTitle);
  txtDate.setText(DateTimeUtils.javaDateToTimeSpan(mPost.getDatePublished()));
  ReaderUtils.showFollowStatus(txtFollow,mPost.isFollowedByCurrentUser);
  txtFollow.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      togglePostFollowed(mPost,txtFollow);
    }
  }
);
  if (mPost.numLikes > 0 && mLayoutLikes.getVisibility() == View.GONE)   mLayoutLikes.setVisibility(View.INVISIBLE);
  if (mPost.hasBlogName()) {
    txtBlogName.setText(mPost.getBlogName());
    txtBlogName.setVisibility(View.VISIBLE);
  }
 else {
    txtBlogName.setVisibility(View.GONE);
  }
  if (mPost.hasAuthorName() && !mPost.getAuthorName().equals(mPost.getBlogName())) {
    txtAuthorName.setText(mPost.getAuthorName());
    txtAuthorName.setVisibility(View.VISIBLE);
  }
 else {
    txtAuthorName.setVisibility(View.GONE);
  }
  if (mPost.hasPostAvatar()) {
    int avatarSz=getResources().getDimensionPixelSize(R.dimen.avatar_sz_medium);
    imgAvatar.setImageUrl(mPost.getPostAvatarForDisplay(avatarSz),WPNetworkImageView.ImageType.AVATAR);
    imgAvatar.setVisibility(View.VISIBLE);
  }
 else {
    imgAvatar.setVisibility(View.GONE);
  }
  if (showFeaturedImage) {
    imgFeatured.setVisibility(View.VISIBLE);
    imgFeatured.setImageUrl(featuredImageUrl,WPNetworkImageView.ImageType.PHOTO);
    imgFeatured.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        showPhotoViewer(mPost.getFeaturedImage());
      }
    }
);
  }
 else {
    imgFeatured.setVisibility(View.GONE);
  }
  imgBtnReblog.setVisibility(mPost.isWP() ? View.VISIBLE : View.GONE);
  imgBtnReblog.setSelected(mPost.isRebloggedByCurrentUser);
  if (mPost.isWP()) {
    imgBtnReblog.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        doPostReblog(imgBtnReblog,mPost);
      }
    }
);
  }
  if (mPost.isWP() && mPost.isCommentsOpen) {
    imgBtnComment.setVisibility(View.VISIBLE);
    imgBtnComment.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        toggleShowAddCommentBox();
      }
    }
);
  }
 else {
    imgBtnComment.setVisibility(View.GONE);
  }
  txtTitle.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      ReaderActivityLauncher.openUrl(getActivity(),mPost.getUrl());
    }
  }
);
  mWebView.getSettings().setJavaScriptEnabled(hasEmbedsOrIframes());
  mWebView.loadDataWithBaseURL(null,postHtml,"String_Node_Str","String_Node_Str",null);
  if (mPost.isWP() && mLayoutIcons.getVisibility() != View.VISIBLE)   animateIconBar(true);
  if (getListView().getAdapter() == null) {
    getListView().setAdapter(getCommentAdapter());
  }
  if (getListView().getVisibility() != View.VISIBLE) {
    getListView().setVisibility(View.VISIBLE);
  }
  if (mWebView.getVisibility() == View.VISIBLE) {
    showContent();
  }
 else {
    showContentDelayed();
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(Boolean result){
  mIsPostTaskRunning=false;
  if (!hasActivity()) {
    return;
  }
  if (!result) {
    if (!mHasAlreadyRequestedPost) {
      mHasAlreadyRequestedPost=true;
      requestPost();
    }
    return;
  }
  final String postTitle=mPost.hasTitle() ? mPost.getTitle() : getString(R.string.reader_untitled_post);
  if (hostIsReaderActivity()) {
    getActivity().setTitle(postTitle);
  }
  txtTitle.setText(postTitle);
  txtDate.setText(DateTimeUtils.javaDateToTimeSpan(mPost.getDatePublished()));
  ReaderUtils.showFollowStatus(txtFollow,mPost.isFollowedByCurrentUser);
  txtFollow.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      togglePostFollowed(mPost,txtFollow);
    }
  }
);
  if (mPost.numLikes > 0 && mLayoutLikes.getVisibility() == View.GONE)   mLayoutLikes.setVisibility(View.INVISIBLE);
  if (mPost.hasBlogName()) {
    txtBlogName.setText(mPost.getBlogName());
    txtBlogName.setVisibility(View.VISIBLE);
  }
 else {
    txtBlogName.setVisibility(View.GONE);
  }
  if (mPost.hasAuthorName() && !mPost.getAuthorName().equals(mPost.getBlogName())) {
    txtAuthorName.setText(mPost.getAuthorName());
    txtAuthorName.setVisibility(View.VISIBLE);
  }
 else {
    txtAuthorName.setVisibility(View.GONE);
  }
  if (mPost.hasPostAvatar()) {
    int avatarSz=getResources().getDimensionPixelSize(R.dimen.avatar_sz_medium);
    imgAvatar.setImageUrl(mPost.getPostAvatarForDisplay(avatarSz),WPNetworkImageView.ImageType.AVATAR);
    imgAvatar.setVisibility(View.VISIBLE);
  }
 else {
    imgAvatar.setVisibility(View.GONE);
  }
  if (showFeaturedImage) {
    imgFeatured.setVisibility(View.VISIBLE);
    imgFeatured.setImageUrl(featuredImageUrl,WPNetworkImageView.ImageType.PHOTO);
    imgFeatured.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        showPhotoViewer(mPost.getFeaturedImage());
      }
    }
);
  }
 else {
    imgFeatured.setVisibility(View.GONE);
  }
  imgBtnReblog.setVisibility(mPost.isWP() ? View.VISIBLE : View.GONE);
  imgBtnReblog.setSelected(mPost.isRebloggedByCurrentUser);
  if (mPost.isWP()) {
    imgBtnReblog.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View view){
        doPostReblog(imgBtnReblog,mPost);
      }
    }
);
  }
  if (mPost.isWP() && mPost.isCommentsOpen) {
    imgBtnComment.setVisibility(View.VISIBLE);
    imgBtnComment.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        toggleShowAddCommentBox();
      }
    }
);
  }
 else {
    imgBtnComment.setVisibility(View.GONE);
  }
  txtTitle.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      ReaderActivityLauncher.openUrl(getActivity(),mPost.getUrl());
    }
  }
);
  mLayoutIcons.setVisibility(mPost.isExternal ? View.GONE : View.VISIBLE);
  mWebView.getSettings().setJavaScriptEnabled(hasEmbedsOrIframes());
  mWebView.loadDataWithBaseURL(null,postHtml,"String_Node_Str","String_Node_Str",null);
  if (mPost.isWP() && mLayoutIcons.getVisibility() != View.VISIBLE)   animateIconBar(true);
  if (getListView().getAdapter() == null) {
    getListView().setAdapter(getCommentAdapter());
  }
  if (getListView().getVisibility() != View.VISIBLE) {
    getListView().setVisibility(View.VISIBLE);
  }
  if (mWebView.getVisibility() == View.VISIBLE) {
    showContent();
  }
 else {
    showContentDelayed();
  }
}