Program: 39602
Project: 39602
Buggy source:
public void queryUserFromTwitter(String searchText) throws ServletException, IOException {
  User userTmp=getUser() == null ? userMgr.random() : getUser();
  if (searchText != null && searchText.length() > 0) {
    TwitterProxy twitterProxy=null;
    Response resp=Response.create();
    twitterProxy=userTmp == null ? null : twitterProxyFactory.create(userTmp.getOauthToken(),userTmp.getOauthTokenSecret());
    User twUser=null;
    ArrayList<SimpleTwitterUser> searchResultList=new ArrayList<SimpleTwitterUser>();
    if (twitterProxy != null) {
      try {
        try {
          twitter4j.User twitterUser=twitterProxy.getTwUser(searchText);
          if (twitterUser != null) {
            twUser=userMgr.getUserById(twitterUser.getId());
            searchResultUsers.remove(twUser);
            searchResultUsers.add(twUser);
          }
        }
 catch (        TwitterException ex) {
        }
        searchResultList=twitterProxy.searchUsers(searchText);
        if (searchResultList != null && searchResultList.size() > 0) {
          ArrayList<Long> idList=new ArrayList<Long>();
          for (          SimpleTwitterUser stu : searchResultList) {
            idList.add(stu.getId());
          }
          ArrayList<User> tempList=userMgr.getUsersByIdList(idList);
          searchResultUsers.removeAll(tempList);
          searchResultUsers.addAll(tempList);
        }
      }
 catch (      TwitterException e1) {
        resp.fail().reason("String_Node_Str");
        return;
      }
    }
 else {
      logger.error("String_Node_Str" + searchText);
      resp.fail().reason("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void queryUserFromTwitter(String searchText,HttpServletRequest request) throws ServletException, IOException {
  User userTmp=request.getAttribute(User.USER) == null ? userMgr.random() : (User)request.getAttribute(User.USER);
  if (searchText != null && searchText.length() > 0) {
    TwitterProxy twitterProxy=null;
    Response resp=Response.create();
    twitterProxy=userTmp == null ? null : twitterProxyFactory.create(userTmp.getOauthToken(),userTmp.getOauthTokenSecret());
    User twUser=null;
    ArrayList<SimpleTwitterUser> searchResultList=new ArrayList<SimpleTwitterUser>();
    if (twitterProxy != null) {
      try {
        try {
          twitter4j.User twitterUser=twitterProxy.getTwUser(searchText);
          if (twitterUser != null) {
            twUser=userMgr.getUserById(twitterUser.getId());
            searchResultUsers.remove(twUser);
            searchResultUsers.add(twUser);
          }
        }
 catch (        TwitterException ex) {
        }
        searchResultList=twitterProxy.searchUsers(searchText);
        if (searchResultList != null && searchResultList.size() > 0) {
          ArrayList<Long> idList=new ArrayList<Long>();
          for (          SimpleTwitterUser stu : searchResultList) {
            idList.add(stu.getId());
          }
          ArrayList<User> tempList=userMgr.getUsersByIdList(idList);
          searchResultUsers.removeAll(tempList);
          searchResultUsers.addAll(tempList);
        }
      }
 catch (      TwitterException e1) {
        resp.fail().reason("String_Node_Str");
        return;
      }
    }
 else {
      logger.error("String_Node_Str" + searchText);
      resp.fail().reason("String_Node_Str");
    }
  }
}