Program: 177878
Project: 177878
Buggy source:
@Override public View getView(int position,View oldView,ViewGroup parent){
  ViewHolder holder;
  View view=oldView;
  User tmpUser=null;
  final Comment item=(Comment)getItem(position);
  if (item != null) {
    tmpUser=item.getUser();
  }
  final User user=tmpUser;
  if (view == null) {
    CommentListItem v=commentItemViewFactory.getBean();
    holder=createViewHolder();
    holder.setTime(v.getTime());
    holder.setUserName(v.getAuthor());
    holder.setComment(v.getComment());
    holder.setUserIcon(v.getUserIcon());
    holder.setNow(new Date());
    v.setTag(holder);
    view=v;
  }
 else {
    holder=(ViewHolder)view.getTag();
    if (holder.getItemId() != null && holder.getImageUrl() != null && user != null && user.getSmallImageUri() != null && position != holder.getItemId() && !holder.getImageUrl().equals(user.getSmallImageUri())) {
      imageLoader.cancel(holder.getItemId());
    }
  }
  if (position >= comments.size()) {
    if (loadingView == null) {
      loadingView=listItemLoadingViewFactory.getBean();
      loadingView.setTag(holder);
    }
    view=loadingView;
  }
 else {
    if (item != null) {
      holder.setItemId(position);
      String displayName=null;
      if (user != null && displayName == null) {
        displayName=user.getDisplayName();
        if (displayName == null) {
          displayName="String_Node_Str";
        }
      }
      if (user != null) {
        view.setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View v){
            if (user != null && user.getId() != null) {
              getSocializeUI().showUserProfileView(context,user.getId().toString());
            }
 else {
              if (logger != null) {
                logger.warn("String_Node_Str" + item.getId());
              }
            }
          }
        }
);
      }
      TextView comment=holder.getComment();
      TextView userName=holder.getUserName();
      TextView time=holder.getTime();
      final ImageView userIcon=holder.getUserIcon();
      if (comment != null) {
        comment.setText(item.getText());
      }
      if (userName != null) {
        if (user != null) {
          userName.setText(displayName);
        }
      }
      if (time != null) {
        Long date=item.getDate();
        if (date != null && date > 0) {
          long diff=(holder.getNow().getTime() - date.longValue());
          time.setText(timeUtils.getTimeString(diff) + "String_Node_Str");
        }
 else {
          time.setText("String_Node_Str");
        }
      }
      if (userIcon != null && drawables != null) {
        int densitySize=deviceUtils.getDIP(iconSize);
        final Drawable defaultImage=drawables.getDrawable(SocializeUI.DEFAULT_USER_ICON,densitySize,densitySize,true);
        if (user != null) {
          String imageUrl=user.getSmallImageUri();
          holder.setImageUrl(imageUrl);
          if (!StringUtils.isEmpty(imageUrl)) {
            try {
              CacheableDrawable cached=drawables.getCache().get(imageUrl);
              if (cached != null && !cached.isRecycled()) {
                if (logger != null && logger.isInfoEnabled()) {
                  logger.info("String_Node_Str" + cached);
                }
                userIcon.setImageDrawable(cached);
              }
 else {
                userIcon.setImageDrawable(defaultImage);
                imageLoader.loadImage(item.getId(),imageUrl,new ImageLoadListener(){
                  @Override public void onImageLoadFail(                  Exception error){
                    error.printStackTrace();
                    userIcon.post(new Runnable(){
                      public void run(){
                        if (logger != null && logger.isInfoEnabled()) {
                          logger.info("String_Node_Str");
                        }
                        userIcon.setImageDrawable(defaultImage);
                      }
                    }
);
                  }
                  @Override public void onImageLoad(                  final SafeBitmapDrawable drawable){
                    userIcon.post(new Runnable(){
                      public void run(){
                        if (logger != null && logger.isInfoEnabled()) {
                          logger.info("String_Node_Str" + drawable);
                        }
                        userIcon.setImageDrawable(drawable);
                      }
                    }
);
                  }
                }
);
              }
            }
 catch (            Exception e) {
              String errorMsg="String_Node_Str" + imageUrl + "String_Node_Str";
              if (logger != null) {
                logger.error(errorMsg,e);
              }
 else {
                System.err.println(errorMsg);
              }
              userIcon.setImageDrawable(defaultImage);
            }
          }
 else           if (!StringUtils.isEmpty(user.getProfilePicData())) {
            try {
              Drawable drawable=drawables.getDrawable(user.getId().toString(),base64Utils.decode(user.getProfilePicData()),densitySize,densitySize);
              userIcon.setImageDrawable(drawable);
            }
 catch (            Base64DecoderException e) {
              if (logger != null) {
                logger.error("String_Node_Str",e);
              }
 else {
                e.printStackTrace();
              }
              userIcon.setImageDrawable(defaultImage);
            }
          }
 else {
            userIcon.setImageDrawable(defaultImage);
          }
        }
 else {
          userIcon.setImageDrawable(defaultImage);
        }
      }
    }
  }
  return view;
}

Fixed version (ground truth):
@Override public View getView(int position,View oldView,ViewGroup parent){
  ViewHolder holder;
  View view=oldView;
  User tmpUser=null;
  final Comment item=(Comment)getItem(position);
  if (item != null) {
    tmpUser=item.getUser();
  }
  final User user=tmpUser;
  if (view == null) {
    CommentListItem v=commentItemViewFactory.getBean();
    holder=createViewHolder();
    holder.setTime(v.getTime());
    holder.setUserName(v.getAuthor());
    holder.setComment(v.getComment());
    holder.setUserIcon(v.getUserIcon());
    holder.setNow(new Date());
    v.setTag(holder);
    view=v;
  }
 else {
    holder=(ViewHolder)view.getTag();
    if (holder.getItemId() != null && holder.getImageUrl() != null && user != null && user.getSmallImageUri() != null && position != holder.getItemId() && !holder.getImageUrl().equals(user.getSmallImageUri())) {
      imageLoader.cancel(holder.getItemId());
    }
  }
  if (position >= comments.size()) {
    if (loadingView == null) {
      loadingView=listItemLoadingViewFactory.getBean();
      loadingView.setTag(holder);
    }
    view=loadingView;
  }
 else {
    if (item != null) {
      holder.setItemId(position);
      String displayName=null;
      if (user != null && displayName == null) {
        displayName=user.getDisplayName();
        if (displayName == null) {
          displayName="String_Node_Str";
        }
      }
      if (user != null) {
        view.setOnClickListener(new OnClickListener(){
          @Override public void onClick(          View v){
            if (user != null && user.getId() != null) {
              getSocializeUI().showUserProfileView(context,user.getId().toString());
            }
 else {
              if (logger != null) {
                logger.warn("String_Node_Str" + item.getId());
              }
            }
          }
        }
);
      }
      TextView comment=holder.getComment();
      TextView userName=holder.getUserName();
      TextView time=holder.getTime();
      final ImageView userIcon=holder.getUserIcon();
      if (comment != null) {
        comment.setText(item.getText());
      }
      if (userName != null) {
        if (user != null) {
          userName.setText(displayName);
        }
      }
      if (time != null) {
        Long date=item.getDate();
        if (date != null && date > 0) {
          long diff=(holder.getNow().getTime() - date.longValue());
          time.setText(timeUtils.getTimeString(diff) + "String_Node_Str");
        }
 else {
          time.setText("String_Node_Str");
        }
      }
      if (userIcon != null && drawables != null) {
        int densitySize=deviceUtils.getDIP(iconSize);
        final Drawable defaultImage=drawables.getDrawable(SocializeUI.DEFAULT_USER_ICON,true);
        if (user != null) {
          String imageUrl=user.getSmallImageUri();
          holder.setImageUrl(imageUrl);
          if (!StringUtils.isEmpty(imageUrl)) {
            try {
              CacheableDrawable cached=drawables.getCache().get(imageUrl);
              if (cached != null && !cached.isRecycled()) {
                if (logger != null && logger.isInfoEnabled()) {
                  logger.info("String_Node_Str" + cached);
                }
                userIcon.setImageDrawable(cached);
              }
 else {
                userIcon.setImageDrawable(defaultImage);
                imageLoader.loadImage(item.getId(),imageUrl,new ImageLoadListener(){
                  @Override public void onImageLoadFail(                  Exception error){
                    error.printStackTrace();
                    userIcon.post(new Runnable(){
                      public void run(){
                        if (logger != null && logger.isInfoEnabled()) {
                          logger.info("String_Node_Str");
                        }
                        userIcon.setImageDrawable(defaultImage);
                      }
                    }
);
                  }
                  @Override public void onImageLoad(                  final SafeBitmapDrawable drawable){
                    userIcon.post(new Runnable(){
                      public void run(){
                        if (logger != null && logger.isInfoEnabled()) {
                          logger.info("String_Node_Str" + drawable);
                        }
                        userIcon.setImageDrawable(drawable);
                      }
                    }
);
                  }
                }
);
              }
            }
 catch (            Exception e) {
              String errorMsg="String_Node_Str" + imageUrl + "String_Node_Str";
              if (logger != null) {
                logger.error(errorMsg,e);
              }
 else {
                System.err.println(errorMsg);
              }
              userIcon.setImageDrawable(defaultImage);
            }
          }
 else           if (!StringUtils.isEmpty(user.getProfilePicData())) {
            try {
              Drawable drawable=drawables.getDrawable(user.getId().toString(),base64Utils.decode(user.getProfilePicData()),densitySize,densitySize);
              userIcon.setImageDrawable(drawable);
            }
 catch (            Base64DecoderException e) {
              if (logger != null) {
                logger.error("String_Node_Str",e);
              }
 else {
                e.printStackTrace();
              }
              userIcon.setImageDrawable(defaultImage);
            }
          }
 else {
            userIcon.setImageDrawable(defaultImage);
          }
        }
 else {
          userIcon.setImageDrawable(defaultImage);
        }
      }
    }
  }
  return view;
}