nus-yam/ex-repair huggingface dataset:
Program: 25437
Project: 25437
Buggy source:
public void run(){
  try {
    InputStreamReader isr=new InputStreamReader(is);
    BufferedReader br=new BufferedReader(isr);
    String line=null;
    if (this.videohm != null) {
      while ((line=br.readLine()) != null) {
        if (line.contains("String_Node_Str")) {
          this.videohm.put("String_Node_Str",getSubstr(line));
        }
 else         if (line.contains("String_Node_Str")) {
          this.videohm.put("String_Node_Str",getSubstr(line));
        }
 else         if (line.contains("String_Node_Str")) {
          this.videohm.put("String_Node_Str",getSubstr(line));
        }
 else         if (line.contains("String_Node_Str")) {
          this.videohm.put("String_Node_Str",getSubstr(line));
        }
      }
    }
    log.debug(type + "String_Node_Str" + line);
  }
 catch (  Exception ioe) {
    log.error("String_Node_Str" + ioe.getMessage(),ioe);
    ioe.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    InputStreamReader isr=new InputStreamReader(is);
    BufferedReader br=new BufferedReader(isr);
    String line=null;
    if (this.videohm != null) {
      while ((line=br.readLine()) != null) {
        if (line.contains("String_Node_Str")) {
          getSubstr(line,"String_Node_Str",videohm);
        }
 else         if (line.contains("String_Node_Str")) {
          getSubstr(line,"String_Node_Str",videohm);
        }
 else         if (line.contains("String_Node_Str")) {
          getSubstr(line,"String_Node_Str",videohm);
        }
 else         if (line.contains("String_Node_Str")) {
          getSubstr(line,"String_Node_Str",videohm);
        }
      }
    }
    log.debug(type + "String_Node_Str" + line);
  }
 catch (  Exception ioe) {
    log.error("String_Node_Str" + ioe.getMessage(),ioe);
    ioe.printStackTrace();
  }
}
Program: 25438
Project: 25438
Buggy source:
/** 
 * @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  ServletInputStream sis=null;
  try {
    String roomId=request.getParameter("String_Node_Str");
    String recordStatus=request.getParameter("String_Node_Str");
    log.debug("String_Node_Str" + roomId + "String_Node_Str"+ recordStatus);
    if (recordStatus != null && recordStatus.equals("String_Node_Str")) {
      SessionRecordingDAO.startSessionRecording(roomId);
    }
 else     if (recordStatus != null && recordStatus.equals("String_Node_Str")) {
      SessionRecordingDAO.endSessionRecording(roomId);
      WhiteboardToVideoService.stopRecording(roomId);
    }
    ServletOutputStream sos=response.getOutputStream();
    sos.flush();
    sos.close();
  }
  finally {
    if (sis != null)     sis.close();
  }
}

Fixed version (ground truth):
/** 
 * @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  ServletInputStream sis=null;
  try {
    String roomId=request.getParameter("String_Node_Str");
    String recordStatus=request.getParameter("String_Node_Str");
    log.debug("String_Node_Str" + roomId + "String_Node_Str"+ recordStatus);
    if (recordStatus != null && recordStatus.equals("String_Node_Str")) {
      SessionRecordingDAO.startSessionRecording(roomId);
    }
 else     if (recordStatus != null && recordStatus.equals("String_Node_Str")) {
      SessionRecordingDAO.endSessionRecording(roomId);
      WhiteboardToVideoService.stopRecording(roomId);
    }
 else     if (recordStatus != null && recordStatus.equals("String_Node_Str")) {
      SessionRecordingDAO.endSessionRecording(roomId);
    }
    ServletOutputStream sos=response.getOutputStream();
    sos.flush();
    sos.close();
  }
  finally {
    if (sis != null)     sis.close();
  }
}
Program: 25439
Project: 25439
Buggy source:
public static int saveVideoData(VideoDataVO videoDataVO){
  int x=0;
  try {
    log.debug("String_Node_Str");
    x=(Integer)sqlMapClient.insert("String_Node_Str",videoDataVO);
  }
 catch (  SQLException e) {
    log.error(e.getMessage(),e);
    e.printStackTrace();
  }
  return x;
}

Fixed version (ground truth):
public static int saveVideoData(VideoDataVO videoDataVO){
  int x=0;
  try {
    log.debug("String_Node_Str" + videoDataVO);
    x=(Integer)sqlMapClient.insert("String_Node_Str",videoDataVO);
  }
 catch (  SQLException e) {
    log.error(e.getMessage(),e);
    e.printStackTrace();
  }
  return x;
}
Program: 25440
Project: 25440
Buggy source:
public static void stopRecording(String roomId){
  log.debug("String_Node_Str");
  try {
    if (roomId != null && roomFileMap.get(roomId) != null) {
      WhiteboardVideoVO obj=(WhiteboardVideoVO)roomFileMap.get(roomId);
      DataOutputStream os=obj.getOs();
      os.close();
      boolean val=VideoDataDAO.updateVideoData(obj.getId());
      if (val == false)       log.error("String_Node_Str");
      roomFileMap.remove(roomId);
    }
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void stopRecording(String roomId){
  log.debug("String_Node_Str" + roomId);
  try {
    if (roomId != null && roomFileMap.get(roomId) != null) {
      WhiteboardVideoVO obj=(WhiteboardVideoVO)roomFileMap.get(roomId);
      DataOutputStream os=obj.getOs();
      os.close();
      boolean val=VideoDataDAO.updateVideoData(obj.getId());
      if (val == false)       log.error("String_Node_Str");
      roomFileMap.remove(roomId);
    }
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
    e.printStackTrace();
  }
}
Program: 25441
Project: 25441
Buggy source:
public static void main(String args[]){
  log.debug("String_Node_Str");
  new S3Service().uploadFile("String_Node_Str");
  log.debug("String_Node_Str");
  new S3Service().downloadFile("String_Node_Str","String_Node_Str");
  log.debug("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String args[]){
  PlaybackVO playbackVO=new PlaybackVO();
  playbackVO.setAwsAccessKey("String_Node_Str");
  playbackVO.setAwsSecretKey("String_Node_Str");
  S3Service a=new S3Service(playbackVO);
  log.debug("String_Node_Str");
  a.uploadFile("String_Node_Str");
  log.debug("String_Node_Str");
  a.downloadFile("String_Node_Str","String_Node_Str");
  log.debug("String_Node_Str");
}
Program: 25442
Project: 25442
Buggy source:
public void uploadFile(String absFilePath,AWSCredentials awsCredentials){
  try {
    S3Service s3Service=new RestS3Service(awsCredentials);
    File fileData=new File(absFilePath);
    S3Object fileObject=new S3Object(fileData);
    s3Service.putObject("String_Node_Str",fileObject);
    log.debug("String_Node_Str" + fileObject.getContentLength() + "String_Node_Str"+ fileObject.getName());
  }
 catch (  S3ServiceException e) {
    log.error(e.getMessage(),e);
  }
catch (  NoSuchAlgorithmException e) {
    log.error(e.getMessage(),e);
  }
catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
public void uploadFile(String absFilePath,AWSCredentials awsCredentials){
  try {
    S3Service s3Service=new RestS3Service(awsCredentials);
    File fileData=new File(absFilePath);
    S3Object fileObject=new S3Object(fileData);
    AccessControlList acl=new AccessControlList();
    StorageOwner so=new StorageOwner("String_Node_Str","String_Node_Str");
    acl.setOwner(so);
    acl.grantPermission(new EmailAddressGrantee("String_Node_Str"),Permission.PERMISSION_FULL_CONTROL);
    fileObject.setAcl(acl);
    s3Service.putObject("String_Node_Str",fileObject);
    log.debug("String_Node_Str" + fileObject.getContentLength() + "String_Node_Str"+ fileObject.getName());
    log.debug("String_Node_Str");
  }
 catch (  S3ServiceException e) {
    log.error(e.getMessage(),e);
  }
catch (  NoSuchAlgorithmException e) {
    log.error(e.getMessage(),e);
  }
catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
}
Program: 25443
Project: 25443
Buggy source:
@Transactional private void updateRoomStartData(RoomData roomData){
  log.debug("String_Node_Str");
  Session session=sessionFactory.getCurrentSession();
  String query="String_Node_Str";
  int val=session.createQuery(query).setTimestamp("String_Node_Str",roomData.getEndTime()).setString("String_Node_Str",roomData.getRoomName()).executeUpdate();
  log.debug("String_Node_Str" + val);
}

Fixed version (ground truth):
@Transactional private void updateRoomStartData(RoomData roomData){
  log.debug("String_Node_Str");
  Session session=sessionFactory.getCurrentSession();
  String query="String_Node_Str";
  int val=session.createQuery(query).setTimestamp("String_Node_Str",roomData.getStartTime()).setString("String_Node_Str",roomData.getRoomName()).executeUpdate();
  log.debug("String_Node_Str" + val);
}
Program: 25444
Project: 25444
Buggy source:
/** 
 * @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  log.debug("String_Node_Str");
  String checkSum="String_Node_Str";
  String parentOrg="String_Node_Str";
  parentOrg=request.getParameter(InnowhiteConstants.ORG_NAME);
  String hostURL=null;
  if (parentOrg.indexOf(Constants.USER_DELIMITER) > 0) {
    StringTokenizer st=new StringTokenizer(parentOrg,Constants.USER_DELIMITER);
    parentOrg=st.nextToken();
    hostURL=st.nextToken();
  }
  log.debug("String_Node_Str" + checkSum);
  request.setAttribute("String_Node_Str","String_Node_Str");
  String userId=request.getParameter(InnowhiteConstants.USER);
  String roomId=request.getParameter(InnowhiteConstants.ROOML_ID);
  String appName=InnowhiteConstants.WHITEBOARD_SERVER_DATA;
  ServerVO serverObj=LoadBalancerService.getServerURL(appName,null);
  ConferenceNumbersVO confNumber=null;
  if (parentOrg != Constants.INET) {
    confNumber=JoinRoomService.setupJoinRoom(roomId,userId,true);
  }
  ServletUtil.setCutomRequestProp(request,response,false,confNumber,serverObj);
  getServletConfig().getServletContext().getRequestDispatcher("String_Node_Str").forward(request,response);
}

Fixed version (ground truth):
/** 
 * @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  log.debug("String_Node_Str");
  String checkSum="String_Node_Str";
  String parentOrg="String_Node_Str";
  parentOrg=request.getParameter(InnowhiteConstants.ORG_NAME);
  String hostURL=null;
  log.debug("String_Node_Str" + checkSum);
  request.setAttribute("String_Node_Str","String_Node_Str");
  String userId=request.getParameter(InnowhiteConstants.USER);
  String roomId=request.getParameter(InnowhiteConstants.ROOML_ID);
  String appName=InnowhiteConstants.WHITEBOARD_SERVER_DATA;
  if (RoomService.isRoomLocked(roomId) == true) {
    response.sendRedirect("String_Node_Str");
    return;
  }
  if (RoomService.isRoomLocked(roomId) == true) {
    response.sendRedirect("String_Node_Str");
    return;
  }
  ServerVO serverObj=LoadBalancerService.getServerURL(appName,null);
  ConferenceNumbersVO confNumber=null;
  if (parentOrg != Constants.INET) {
    confNumber=JoinRoomService.setupJoinRoom(roomId,userId,true);
  }
  ServletUtil.setCutomRequestProp(request,response,false,confNumber,serverObj);
  getServletConfig().getServletContext().getRequestDispatcher("String_Node_Str").forward(request,response);
}
Program: 25446
Project: 25446
Buggy source:
public static void updateAudioPathWindows(String winPath,List<AudioData> mediaList){
  if (mediaList == null)   return;
  for (  AudioData aud : mediaList) {
    String path=aud.getFilePath();
    String newPath=path.substring(path.lastIndexOf("String_Node_Str"));
    aud.setFilePath(winPath + newPath);
  }
}

Fixed version (ground truth):
public static void updateAudioPathWindows(String winPath,List<AudioData> mediaList){
  log.debug("String_Node_Str");
  if (mediaList == null)   return;
  for (  AudioData aud : mediaList) {
    String path=aud.getFilePath();
    String newPath=path.substring(path.lastIndexOf("String_Node_Str"));
    aud.setFilePath(winPath + newPath);
  }
}
Program: 25447
Project: 25447
Buggy source:
public static boolean isUbuntu(){
  String os=System.getProperty("String_Node_Str").toLowerCase();
  return (os.indexOf("String_Node_Str") >= 0);
}

Fixed version (ground truth):
public static boolean isUbuntu(){
  String os=System.getProperty("String_Node_Str").toLowerCase();
  log.debug("String_Node_Str" + os);
  return (os.indexOf("String_Node_Str") >= 0);
}
Program: 25448
Project: 25448
Buggy source:
public boolean executeProcess(String cmd,String tempPath){
  try {
    System.out.println(cmd);
    if (PlaybackUtil.isWindows() == false) {
      File f=new File(tempPath + "String_Node_Str" + Math.random() * 10000 + "String_Node_Str");
      FileWriter fw=new FileWriter(f);
      fw.write("String_Node_Str");
      fw.write(cmd + "String_Node_Str");
      fw.close();
      cmd=f.getAbsolutePath();
      MakeExectuable.getInstance().setExecutable(cmd);
    }
    Runtime rt=Runtime.getRuntime();
    Process proc=rt.exec(cmd);
    StreamGobbler errorGobbler=new StreamGobbler(proc.getErrorStream(),"String_Node_Str");
    StreamGobbler outputGobbler=new StreamGobbler(proc.getInputStream(),"String_Node_Str");
    errorGobbler.start();
    outputGobbler.start();
    int exitVal=proc.waitFor();
    if (exitVal == 0) {
      return true;
    }
  }
 catch (  Exception t) {
    t.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
public boolean executeProcess(String cmd,String tempPath){
  try {
    log.debug(cmd);
    if (PlaybackUtil.isWindows() == false) {
      File f=new File(tempPath + "String_Node_Str" + Math.random() * 10000 + "String_Node_Str");
      FileWriter fw=new FileWriter(f);
      fw.write("String_Node_Str");
      fw.write(cmd + "String_Node_Str");
      fw.close();
      cmd=f.getAbsolutePath();
      MakeExectuable.getInstance().setExecutable(cmd);
    }
    Runtime rt=Runtime.getRuntime();
    Process proc=rt.exec(cmd);
    StreamGobbler errorGobbler=new StreamGobbler(proc.getErrorStream(),"String_Node_Str");
    StreamGobbler outputGobbler=new StreamGobbler(proc.getInputStream(),"String_Node_Str");
    errorGobbler.start();
    outputGobbler.start();
    int exitVal=proc.waitFor();
    if (exitVal == 0) {
      return true;
    }
  }
 catch (  Exception t) {
    t.printStackTrace();
    log.error(t.getMessage(),t);
  }
  return false;
}
Program: 25449
Project: 25449
Buggy source:
public void run(){
  try {
    InputStreamReader isr=new InputStreamReader(is);
    BufferedReader br=new BufferedReader(isr);
    String line=null;
    while ((line=br.readLine()) != null)     System.out.println(type + "String_Node_Str" + line);
  }
 catch (  Exception ioe) {
    ioe.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    InputStreamReader isr=new InputStreamReader(is);
    BufferedReader br=new BufferedReader(isr);
    String line=null;
    while ((line=br.readLine()) != null)     log.debug(type + "String_Node_Str" + line);
  }
 catch (  Exception ioe) {
    ioe.printStackTrace();
  }
}
Program: 25450
Project: 25450
Buggy source:
public boolean updateUserList(UserListVO uservo){
  try {
    log.debug("String_Node_Str" + uservo.getUsername() + "String_Node_Str"+ "String_Node_Str"+ uservo.getMyStatus()+ "String_Node_Str"+ "String_Node_Str"+ uservo.getRemoveMe());
    ISharedObject userListSO=this.getSharedObject(Red5.getConnectionLocal().getScope(),"String_Node_Str");
    Map<String,String> map=clientNamesMap.get(Red5.getConnectionLocal().getScope().getName());
    if (map == null || Utility.userFirstTime(uservo.getUsername(),map)) {
      if (uservo.getUserJoinedTime() == 0) {
        uservo.setUserJoinedTime((new Date().getTime()));
        log.debug("String_Node_Str" + uservo.getUserJoinedTime() + "String_Node_Str"+ uservo.getUsername());
      }
      RoomVO roomVO=shapeSeqMap.get(Red5.getConnectionLocal().getScope().getName());
      int num=roomVO.getSeqNum();
      uservo.setShapeCount(num);
    }
 else {
    }
    int num=videoSeqMap.get(Red5.getConnectionLocal().getScope().getName());
    uservo.setSeq(num);
    userListSO.setAttribute("String_Node_Str" + num++,uservo);
    videoSeqMap.put(Red5.getConnectionLocal().getScope().getName(),num);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return true;
}

Fixed version (ground truth):
public boolean updateUserList(UserListVO uservo){
  try {
    log.debug("String_Node_Str" + uservo.getUsername() + "String_Node_Str"+ "String_Node_Str"+ uservo.getMyStatus()+ "String_Node_Str"+ "String_Node_Str"+ uservo.getRemoveMe());
    ISharedObject userListSO=this.getSharedObject(Red5.getConnectionLocal().getScope(),"String_Node_Str");
    Map<String,String> map=clientNamesMap.get(Red5.getConnectionLocal().getScope().getName());
    if (map == null || Utility.userFirstTime(uservo.getUsername(),map)) {
      if (uservo.getUserJoinedTime() == 0) {
        uservo.setUserJoinedTime((new Date().getTime()));
        log.debug("String_Node_Str" + uservo.getUserJoinedTime() + "String_Node_Str"+ uservo.getUsername());
        if (UserCacheService.userExistsInConf(Red5.getConnectionLocal().getScope().getName(),uservo.getUsername()) == true) {
          log.debug("String_Node_Str" + uservo.getUsername());
          uservo.setVoiceConfJoined(1);
        }
      }
      RoomVO roomVO=shapeSeqMap.get(Red5.getConnectionLocal().getScope().getName());
      int num=roomVO.getSeqNum();
      uservo.setShapeCount(num);
    }
 else {
    }
    int num=videoSeqMap.get(Red5.getConnectionLocal().getScope().getName());
    uservo.setSeq(num);
    userListSO.setAttribute("String_Node_Str" + num++,uservo);
    videoSeqMap.put(Red5.getConnectionLocal().getScope().getName(),num);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return true;
}
Program: 25451
Project: 25451
Buggy source:
/** 
 * Called when room scope is stopped
 * @param scope , the scope of the room
 */
public void roomStop(IScope scope){
  try {
    SavingData.closeFile(scope.getName());
    shapeSeqMap.remove(scope.getName());
    chatSeqMap.remove(scope.getName());
    videoSeqMap.remove(scope.getName());
    super.roomStop(scope);
    log.debug("String_Node_Str");
    String msg=scope.getName() + "String_Node_Str" + Calendar.getInstance().getTimeInMillis();
    messagingService.sendRoomMessage(msg);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Called when room scope is stopped
 * @param scope , the scope of the room
 */
public void roomStop(IScope scope){
  try {
    SavingData.closeFile(scope.getName());
    shapeSeqMap.remove(scope.getName());
    chatSeqMap.remove(scope.getName());
    videoSeqMap.remove(scope.getName());
    super.roomStop(scope);
    log.debug("String_Node_Str");
    String msg=scope.getName() + "String_Node_Str" + Calendar.getInstance().getTimeInMillis();
    messagingService.sendRoomMessage(msg);
    UserCacheService.removeRoomConfMap(scope.getName());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 25452
Project: 25452
Buggy source:
private void left(String confRoom,String participant){
  log.debug("String_Node_Str" + participant + "String_Node_Str"+ confRoom+ "String_Node_Str");
  String room=UserCacheService.getActualRoom(confRoom);
  if (room == null) {
    log.warn("String_Node_Str" + participant + "String_Node_Str"+ room);
    return;
  }
  ISharedObject so=UserCacheService.getUserSharedObj(room);
  String userID=UserCacheService.getUseId(participant);
  if (so != null) {
    List<Object> list=new ArrayList<Object>();
    list.add(userID);
    UserCacheService.removeparticipantIDUser(participant);
    log.debug("String_Node_Str" + confRoom + "String_Node_Str"+ participant+ "String_Node_Str"+ "String_Node_Str"+ userID+ "String_Node_Str"+ room);
    so.sendMessage("String_Node_Str",list);
  }
 else {
    log.warn("String_Node_Str" + so + "String_Node_Str"+ confRoom+ "String_Node_Str"+ participant);
  }
}

Fixed version (ground truth):
private void left(String confRoom,String participant){
  log.debug("String_Node_Str" + participant + "String_Node_Str"+ confRoom+ "String_Node_Str");
  String room=UserCacheService.getActualRoom(confRoom);
  if (room == null) {
    log.warn("String_Node_Str" + participant + "String_Node_Str"+ room);
    return;
  }
  ISharedObject so=UserCacheService.getUserSharedObj(room);
  String userID=UserCacheService.getUseId(participant);
  if (so != null) {
    List<Object> list=new ArrayList<Object>();
    list.add(userID);
    UserCacheService.removeparticipantIDUser(participant);
    log.debug("String_Node_Str" + confRoom + "String_Node_Str"+ participant+ "String_Node_Str"+ "String_Node_Str"+ userID+ "String_Node_Str"+ room);
    so.sendMessage("String_Node_Str",list);
    UserCacheService.removeUserConfMap(room,userID);
  }
 else {
    log.warn("String_Node_Str" + so + "String_Node_Str"+ confRoom+ "String_Node_Str"+ participant);
  }
}
Program: 25453
Project: 25453
Buggy source:
private void joined(String confRoom,String participant,String name,Boolean muted,Boolean talking,Boolean locked){
  log.info("String_Node_Str" + name + "String_Node_Str"+ participant+ "String_Node_Str"+ confRoom);
  String room=UserCacheService.getActualRoom(confRoom);
  if (room == null) {
    log.warn("String_Node_Str" + participant + "String_Node_Str"+ room);
    return;
  }
  ISharedObject so=UserCacheService.getUserSharedObj(room);
  if (so != null) {
    String innoUniqueId=name + confRoom;
    UserCacheService.addparticipantIDUser(participant,innoUniqueId.trim());
    String userID=UserCacheService.getUseId(participant);
    List<Object> list=new ArrayList<Object>();
    list.add(participant);
    list.add(userID);
    list.add(muted);
    list.add(talking);
    log.debug("String_Node_Str" + participant + "String_Node_Str"+ userID+ "String_Node_Str"+ name+ "String_Node_Str"+ room);
    so.sendMessage("String_Node_Str",list);
  }
}

Fixed version (ground truth):
private void joined(String confRoom,String participant,String name,Boolean muted,Boolean talking,Boolean locked){
  log.info("String_Node_Str" + name + "String_Node_Str"+ participant+ "String_Node_Str"+ confRoom);
  String room=UserCacheService.getActualRoom(confRoom);
  if (room == null) {
    log.warn("String_Node_Str" + participant + "String_Node_Str"+ room);
    return;
  }
  ISharedObject so=UserCacheService.getUserSharedObj(room);
  if (so != null) {
    String innoUniqueId=name + confRoom;
    UserCacheService.addparticipantIDUser(participant,innoUniqueId.trim());
    String userID=UserCacheService.getUseId(participant);
    List<Object> list=new ArrayList<Object>();
    list.add(participant);
    list.add(userID);
    list.add(muted);
    list.add(talking);
    log.debug("String_Node_Str" + participant + "String_Node_Str"+ userID+ "String_Node_Str"+ name+ "String_Node_Str"+ room);
    so.sendMessage("String_Node_Str",list);
    UserCacheService.addUserConfMap(room,userID);
  }
}
Program: 25456
Project: 25456
Buggy source:
public static void roomCloseService(String roomId){
  log.debug("String_Node_Str" + roomId);
  try {
    HttpClient httpclient=new DefaultHttpClient();
    String checksumStr=Constants.ROOM_STR + roomId + Constants.SALT_KEY;
    String comptedCheckum;
    comptedCheckum=WhiteBoardSHA1.SHA1(checksumStr);
    log.debug("String_Node_Str" + checksumStr + "String_Node_Str"+ comptedCheckum);
    String finalURL=Constants.ROOM_CLOSE_URL + Constants.ROOM_STR + roomId+ "String_Node_Str"+ comptedCheckum;
    log.debug("String_Node_Str" + finalURL);
    HttpGet httpget=new HttpGet(finalURL);
    HttpResponse response=httpclient.execute(httpget);
    log.debug("String_Node_Str" + response.getStatusLine());
  }
 catch (  NoSuchAlgorithmException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
catch (  UnsupportedEncodingException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
catch (  ClientProtocolException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
catch (  IOException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void roomCloseService(String roomId){
  log.debug("String_Node_Str" + roomId);
  try {
    if (roomId != null)     roomId=roomId.trim();
    HttpClient httpclient=new DefaultHttpClient();
    String checksumStr=Constants.ROOM_STR + roomId + Constants.SALT_KEY;
    String comptedCheckum;
    comptedCheckum=WhiteBoardSHA1.SHA1(checksumStr);
    log.debug("String_Node_Str" + checksumStr + "String_Node_Str"+ comptedCheckum);
    String finalURL=Constants.ROOM_CLOSE_URL + Constants.ROOM_STR + roomId+ "String_Node_Str"+ comptedCheckum;
    log.debug("String_Node_Str" + finalURL);
    HttpGet httpget=new HttpGet(finalURL);
    HttpResponse response=httpclient.execute(httpget);
    log.debug("String_Node_Str" + response.getStatusLine());
  }
 catch (  NoSuchAlgorithmException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
catch (  UnsupportedEncodingException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
catch (  ClientProtocolException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
catch (  IOException e) {
    log.error(e.getMessage());
    e.printStackTrace();
  }
}
Program: 25457
Project: 25457
Buggy source:
public boolean updateUserList(UserListVO uservo){
  try {
    log.debug("String_Node_Str" + uservo.getUsername() + "String_Node_Str"+ "String_Node_Str"+ uservo.getMyStatus()+ "String_Node_Str"+ "String_Node_Str"+ uservo.getRemoveMe());
    ISharedObject userListSO=this.getSharedObject(Red5.getConnectionLocal().getScope(),"String_Node_Str");
    Map<String,String> map=clientNamesMap.get(Red5.getConnectionLocal().getScope().getName());
    if (uservo.getUserJoinedTime() == null) {
      uservo.setUserJoinedTime((new Date().getTime()));
      log.debug("String_Node_Str" + uservo.getUserJoinedTime() + "String_Node_Str"+ uservo.getUsername());
    }
    if (map == null || Utility.userFirstTime(uservo.getUsername(),map)) {
      RoomVO roomVO=shapeSeqMap.get(Red5.getConnectionLocal().getScope().getName());
      int num=roomVO.getSeqNum();
      uservo.setShapeCount(num);
    }
 else {
    }
    int num=videoSeqMap.get(Red5.getConnectionLocal().getScope().getName());
    uservo.setSeq(num);
    userListSO.setAttribute("String_Node_Str" + num++,uservo);
    videoSeqMap.put(Red5.getConnectionLocal().getScope().getName(),num);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return true;
}

Fixed version (ground truth):
public boolean updateUserList(UserListVO uservo){
  try {
    log.debug("String_Node_Str" + uservo.getUsername() + "String_Node_Str"+ "String_Node_Str"+ uservo.getMyStatus()+ "String_Node_Str"+ "String_Node_Str"+ uservo.getRemoveMe());
    ISharedObject userListSO=this.getSharedObject(Red5.getConnectionLocal().getScope(),"String_Node_Str");
    Map<String,String> map=clientNamesMap.get(Red5.getConnectionLocal().getScope().getName());
    if (map == null || Utility.userFirstTime(uservo.getUsername(),map)) {
      if (uservo.getUserJoinedTime() == 0) {
        uservo.setUserJoinedTime((new Date().getTime()));
        log.debug("String_Node_Str" + uservo.getUserJoinedTime() + "String_Node_Str"+ uservo.getUsername());
      }
      RoomVO roomVO=shapeSeqMap.get(Red5.getConnectionLocal().getScope().getName());
      int num=roomVO.getSeqNum();
      uservo.setShapeCount(num);
    }
 else {
    }
    int num=videoSeqMap.get(Red5.getConnectionLocal().getScope().getName());
    uservo.setSeq(num);
    userListSO.setAttribute("String_Node_Str" + num++,uservo);
    videoSeqMap.put(Red5.getConnectionLocal().getScope().getName(),num);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return true;
}
Program: 25458
Project: 25458
Buggy source:
/** 
 * @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  log.debug("String_Node_Str");
  String streamType=request.getParameter(InnowhiteConstants.STREAM_TYPE);
  String roomId=request.getParameter(InnowhiteConstants.ROOML_ID);
  String serverApp=null;
  if (streamType != null && streamType.equals("String_Node_Str")) {
    serverApp="String_Node_Str";
  }
 else   if (streamType != null && streamType.equals("String_Node_Str")) {
    serverApp="String_Node_Str";
  }
 else   if (streamType != null && streamType.equals("String_Node_Str")) {
    serverApp="String_Node_Str";
  }
  Long subRoomId=null;
  if (serverApp != null && !serverApp.equals("String_Node_Str"))   subRoomId=WhiteboardAuthenticationDAOImpl.createSubRoomID(roomId,streamType);
  if (request.getParameter(InnowhiteConstants.REFRESH_CACHE) != null && request.getParameter(InnowhiteConstants.REFRESH_CACHE).equals("String_Node_Str")) {
    LoadBalancerService.forceClearCache();
  }
  ServerVO serverVO=LoadBalancerService.getServerURL(serverApp,null);
  response.setContentType("String_Node_Str");
  PrintWriter out=response.getWriter();
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println(subRoomId);
  out.println("String_Node_Str" + serverVO.getServerAddr() + "String_Node_Str");
  out.println("String_Node_Str");
  out.println(serverVO.getServerPort());
  out.println("String_Node_Str");
  out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @see HttpServlet#doGet(HttpServletRequest request,HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  log.debug("String_Node_Str");
  String streamType=request.getParameter(InnowhiteConstants.STREAM_TYPE);
  String roomId=request.getParameter(InnowhiteConstants.ROOML_ID);
  String serverApp=streamType;
  Long subRoomId=null;
  if (request.getParameter(InnowhiteConstants.REFRESH_CACHE) != null && request.getParameter(InnowhiteConstants.REFRESH_CACHE).equals("String_Node_Str")) {
    LoadBalancerService.forceClearCache();
  }
  ServerVO serverVO=LoadBalancerService.getServerURL(serverApp,null);
  if (serverVO == null)   return;
  if (serverApp != null && (serverApp.equals("String_Node_Str") || serverApp.equals("String_Node_Str")))   subRoomId=WhiteboardAuthenticationDAOImpl.createSubRoomID(roomId,streamType);
  response.setContentType("String_Node_Str");
  PrintWriter out=response.getWriter();
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println("String_Node_Str");
  out.println(subRoomId);
  out.println("String_Node_Str" + serverVO.getServerAddr() + "String_Node_Str");
  out.println("String_Node_Str");
  out.println(serverVO.getServerPort());
  out.println("String_Node_Str");
  out.println("String_Node_Str");
}
Program: 25459
Project: 25459
Buggy source:
public static synchronized ServerVO getServerURL(String appName,String orgName){
  if (serversMap != null && serversMap.get(appName) == null) {
    populateCache(appName);
  }
  List<ServerVO> serverList=serversMap.get(appName);
  if (serverList != null && serverList.size() > 0) {
    int val=serversCounter.get(appName);
    log.debug("String_Node_Str" + appName + "String_Node_Str"+ val+ "String_Node_Str"+ serverList.size());
    ServerVO obj=serverList.get(val);
    if (obj != null) {
      if ((val + 1) == serverList.size())       val=0;
 else       val++;
      serversCounter.put(appName,val);
      return obj;
    }
  }
  return null;
}

Fixed version (ground truth):
public static synchronized ServerVO getServerURL(String appName,String orgName){
  if (serversMap != null && serversMap.get(appName) == null) {
    populateCache(appName);
  }
  List<ServerVO> serverList=serversMap.get(appName);
  if (serverList != null && serverList.size() > 0) {
    int val=serversCounter.get(appName);
    log.debug("String_Node_Str" + appName + "String_Node_Str"+ val+ "String_Node_Str"+ serverList.size());
    ServerVO obj=serverList.get(val);
    if (obj != null) {
      if ((val + 1) == serverList.size())       val=0;
 else       val++;
      serversCounter.put(appName,val);
      return obj;
    }
  }
  log.warn("String_Node_Str" + appName);
  return null;
}
Program: 25460
Project: 25460
Buggy source:
private void fileRecordStartStop(String confRoom,String participant,String startRecordfile,String stopRecordFile){
  log.debug("String_Node_Str" + confRoom + "String_Node_Str"+ participant+ "String_Node_Str"+ startRecordfile+ "String_Node_Str"+ stopRecordFile);
  System.err.println("String_Node_Str" + confRoom + "String_Node_Str"+ participant+ "String_Node_Str"+ startRecordfile+ "String_Node_Str"+ stopRecordFile);
  String room=UserCacheService.getActualRoom(confRoom);
  System.err.println("String_Node_Str" + room);
  if (room == null) {
    log.warn("String_Node_Str" + participant + "String_Node_Str"+ room+ "String_Node_Str"+ confRoom+ "String_Node_Str"+ startRecordfile+ "String_Node_Str"+ stopRecordFile);
    return;
  }
  if (startRecordfile != null)   audioDataMessageService.sendMessage("String_Node_Str" + room + "String_Node_Str"+ startRecordfile);
 else   if (stopRecordFile != null)   audioDataMessageService.sendMessage("String_Node_Str" + room + "String_Node_Str"+ stopRecordFile);
}

Fixed version (ground truth):
private void fileRecordStartStop(String confRoom,String participant,String startRecordfile,String stopRecordFile){
  log.debug("String_Node_Str" + confRoom + "String_Node_Str"+ participant+ "String_Node_Str"+ startRecordfile+ "String_Node_Str"+ stopRecordFile);
  System.err.println("String_Node_Str" + confRoom + "String_Node_Str"+ participant+ "String_Node_Str"+ startRecordfile+ "String_Node_Str"+ stopRecordFile);
  String room=UserCacheService.getActualRoom(confRoom);
  System.err.println("String_Node_Str" + room);
  if (room == null) {
    log.warn("String_Node_Str" + participant + "String_Node_Str"+ room+ "String_Node_Str"+ confRoom+ "String_Node_Str"+ startRecordfile+ "String_Node_Str"+ stopRecordFile);
    return;
  }
  String delimt="String_Node_Str";
  if (startRecordfile != null)   audioDataMessageService.sendMessage("String_Node_Str" + delimt + room+ delimt+ startRecordfile);
 else   if (stopRecordFile != null)   audioDataMessageService.sendMessage("String_Node_Str" + delimt + room+ delimt+ stopRecordFile);
}
Program: 25461
Project: 25461
Buggy source:
public Rows<String,String,String> getMultiRowByRange(String columnFamilyName,String keyStart,String keyEnd,String start,String end,int maxCount){
  RangeSlicesQuery<String,String,String> sliceQuery=HFactory.createRangeSlicesQuery(keyspace,ss,ss,ss);
  sliceQuery.setColumnFamily(columnFamilyName);
  sliceQuery.setKeys(keyStart,keyEnd);
  sliceQuery.setRange(start,end,true,maxCount);
  QueryResult<OrderedRows<String,String,String>> result=sliceQuery.execute();
  Rows<String,String,String> rows=result.get();
  if (rows == null) {
    return null;
  }
  return rows;
}

Fixed version (ground truth):
public Rows<String,UUID,String> getMultiRowByRange(String columnFamilyName,String keyStart,String keyEnd,UUID start,UUID end,int maxCount){
  RangeSlicesQuery<String,UUID,String> sliceQuery=HFactory.createRangeSlicesQuery(keyspace,ss,us,ss);
  sliceQuery.setColumnFamily(columnFamilyName);
  sliceQuery.setKeys(keyStart,keyEnd);
  sliceQuery.setRange(start,end,true,maxCount);
  QueryResult<OrderedRows<String,UUID,String>> result=sliceQuery.execute();
  Rows<String,UUID,String> rows=result.get();
  if (rows == null) {
    return null;
  }
  return rows;
}
Program: 25462
Project: 25462
Buggy source:
/** 
 * @param latitude
 * @param longitude
 * @param radius radius for the specified point
 * @param sinceAfter story happened after specified time
 */
public List<CompactPost> findPostByLocation(List<GeoRange> geoRanges,Date sinceAfter,int limitation){
  List<CompactPost> posts=new ArrayList<CompactPost>();
  for (  GeoRange range : geoRanges) {
    String start=null;
    String end=null;
    Rows<String,String,String> rows=cassandraClient.getMultiRowByRange(DBConstants.INDEX_POST_LOCATION,range.getMin(),range.getMax(),start,end,limitation);
    if (rows != null) {
      Iterator<Row<String,String,String>> it=rows.iterator();
      while (it.hasNext()) {
        Row<String,String,String> row=it.next();
        if (row.getColumnSlice() != null && row.getColumnSlice().getColumns() != null) {
          Iterator<HColumn<String,String>> columnIter=row.getColumnSlice().getColumns().iterator();
          String geohash=row.getKey();
          while (columnIter.hasNext()) {
            HColumn<String,String> column=columnIter.next();
            String postId=column.getName();
            String createDate=column.getValue();
            CompactPost post=createCompactPost(geohash,postId,createDate);
            posts.add(post);
          }
        }
      }
    }
  }
  return posts;
}

Fixed version (ground truth):
public List<CompactPost> findPostByLocation(String geohash,Date sinceAfter,int limitation){
  List<CompactPost> posts=new ArrayList<CompactPost>();
  UUID start=null;
  UUID end=null;
  List<HColumn<UUID,String>> reslut=cassandraClient.getColumnKeyByRange(DBConstants.INDEX_POST_LOCATION,geohash,start,end,limitation);
  if (reslut != null) {
    Iterator<HColumn<UUID,String>> columnIter=reslut.iterator();
    while (columnIter.hasNext()) {
      HColumn<UUID,String> column=columnIter.next();
      UUID postId=column.getName();
      String createDate=column.getValue();
      CompactPost post=createCompactPost(geohash,postId.toString(),createDate);
      posts.add(post);
    }
  }
  return posts;
}
Program: 25463
Project: 25463
Buggy source:
public static void createPostLocationIndex(CassandraClient cassandraClient,String postId,String createDate,String latitude,String longitude){
  UUID uuid=UUID.fromString(postId);
  GeoHashUtil util=new GeoHashUtil();
  String geoHash=util.encode(latitude,longitude);
  cassandraClient.insert(DBConstants.INDEX_PLACE_POST,geoHash,uuid,createDate);
}

Fixed version (ground truth):
public static void createPostLocationIndex(CassandraClient cassandraClient,String postId,String createDate,String latitude,String longitude){
  UUID uuid=UUID.fromString(postId);
  GeoHashUtil util=new GeoHashUtil();
  String geoHash=util.encode(latitude,longitude);
  cassandraClient.insert(DBConstants.INDEX_POST_LOCATION,geoHash,uuid,createDate);
}
Program: 25464
Project: 25464
Buggy source:
@Test public void testCreatePostLocationIndex(){
  String postId=IdGenerator.generateId();
  String createDate=DateUtil.formatDate(new Date());
  String latitude="String_Node_Str";
  String longitude="String_Node_Str";
  PostManager.createPostLocationIndex(cassandraClient,postId,createDate,latitude,longitude);
  GeoHashUtil util=new GeoHashUtil();
  String geoHashValue=util.encode(latitude,longitude);
  List<GeoRange> geoRanges=new ArrayList<GeoRange>();
  GeoRange r=new GeoRange();
  r.setMax(geoHashValue);
  r.setMin(geoHashValue);
  DateTime weeksBefore=new DateTime(2011,6,20,0,0,0,0);
  List<CompactPost> posts=postDao.findPostByLocation(geoRanges,weeksBefore.toDate(),100);
  Assert.assertEquals("String_Node_Str",1,posts.size());
  CompactPost post=posts.get(0);
  Assert.assertEquals("String_Node_Str",postId,post.getPostId());
}

Fixed version (ground truth):
@Test public void testCreatePostLocationIndex(){
  String postId=IdGenerator.generateId();
  String createDate=DateUtil.formatDate(new Date());
  String latitude="String_Node_Str";
  String longitude="String_Node_Str";
  GeoHashUtil util=new GeoHashUtil();
  String geoHashValue=util.encode(latitude,longitude);
  System.out.println(geoHashValue);
  cassandraClient.deleteMultipleRows(DBConstants.INDEX_POST_LOCATION,new String[]{geoHashValue});
  PostManager.createPostLocationIndex(cassandraClient,postId,createDate,latitude,longitude);
  List<GeoRange> geoRanges=new ArrayList<GeoRange>();
  GeoRange r=new GeoRange();
  geoRanges.add(r);
  r.setMax(geoHashValue);
  r.setMin(geoHashValue);
  DateTime weeksBefore=new DateTime(2011,6,20,0,0,0,0);
  List<CompactPost> posts=postDao.findPostByLocation(geoRanges,weeksBefore.toDate(),100);
  Assert.assertEquals("String_Node_Str",1,posts.size());
  CompactPost post=posts.get(0);
  Assert.assertEquals("String_Node_Str",postId,post.getPostId());
}
Program: 25466
Project: 25466
Buggy source:
public static JSONObject messageToJSON(Message message){
  JSONObject json=new JSONObject();
  json.put(ServiceConstant.PARA_MESSAGE_ID,message.getMessageId());
  json.put(ServiceConstant.PARA_USERID,message.getFromUserId());
  json.put(ServiceConstant.PARA_TO_USERID,message.getToUserId());
  json.put(ServiceConstant.PARA_MESSAGETEXT,message.getMessageContent());
  json.put(ServiceConstant.PARA_CREATE_DATE,message.getCreateDate());
  json.put(ServiceConstant.PARA_MESSAGE_TYPE,message.getMessageType());
  json.put(ServiceConstant.PARA_AVATAR,message.getUserAvatar());
  json.put(ServiceConstant.PARA_NICKNAME,message.getUserNickName());
  json.put(ServiceConstant.PARA_NICKNAME,message.getUserGender());
  return json;
}

Fixed version (ground truth):
public static JSONObject messageToJSON(Message message){
  JSONObject json=new JSONObject();
  json.put(ServiceConstant.PARA_MESSAGE_ID,message.getMessageId());
  json.put(ServiceConstant.PARA_USERID,message.getFromUserId());
  json.put(ServiceConstant.PARA_TO_USERID,message.getToUserId());
  json.put(ServiceConstant.PARA_MESSAGETEXT,message.getMessageContent());
  json.put(ServiceConstant.PARA_CREATE_DATE,message.getCreateDate());
  json.put(ServiceConstant.PARA_MESSAGE_TYPE,message.getMessageType());
  json.put(ServiceConstant.PARA_AVATAR,message.getUserAvatar());
  json.put(ServiceConstant.PARA_NICKNAME,message.getUserNickName());
  return json;
}
Program: 25467
Project: 25467
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  CassandraClient cc=new CassandraClient(DBConstants.SERVER,DBConstants.CLUSTERNAME,DBConstants.KEYSPACE);
  String key="String_Node_Str";
  int count=cc.getColumnCount(DBConstants.INDEX_USER_VIEW_POSTS,key);
  System.out.println("String_Node_Str" + count);
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  CassandraHost host=new CassandraHost("String_Node_Str",9160);
  ConcurrentHClientPool pool=new ConcurrentHClientPool(host);
  HThriftClient client=pool.borrowClient();
  CassandraClient cclient;
}
Program: 25468
Project: 25468
Buggy source:
@Override public boolean setDataFromRequest(HttpServletRequest request){
  placeId=request.getParameter(ServiceConstant.PARA_PLACEID);
  userId=request.getParameter(ServiceConstant.PARA_USERID);
  if (!check(placeId,ErrorCode.ERROR_PARAMETER_PLACEID_EMPTY,ErrorCode.ERROR_PARAMETER_PLACEID_NULL))   return false;
  if (!check(userId,ErrorCode.ERROR_PARAMETER_USERID_EMPTY,ErrorCode.ERROR_PARAMETER_USERID_NULL))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean setDataFromRequest(HttpServletRequest request){
  placeId=request.getParameter(ServiceConstant.PARA_PLACEID);
  userId=request.getParameter(ServiceConstant.PARA_USERID);
  longitude=request.getParameter(ServiceConstant.PARA_LONGTITUDE);
  latitude=request.getParameter(ServiceConstant.PARA_LATITUDE);
  name=request.getParameter(ServiceConstant.PARA_NAME);
  radius=request.getParameter(ServiceConstant.PARA_RADIUS);
  postType=request.getParameter(ServiceConstant.PARA_POSTTYPE);
  desc=request.getParameter(ServiceConstant.PARA_DESC);
  if (!check(placeId,ErrorCode.ERROR_PARAMETER_PLACEID_EMPTY,ErrorCode.ERROR_PARAMETER_PLACEID_NULL))   return false;
  if (!check(userId,ErrorCode.ERROR_PARAMETER_USERID_EMPTY,ErrorCode.ERROR_PARAMETER_USERID_NULL))   return false;
  return true;
}
Program: 25469
Project: 25469
Buggy source:
@Override public void handleData(){
  boolean isLoginIdExist=UserManager.isLoginIdExist(cassandraClient,loginId,loginIdType);
  boolean isDeviceIdExist=UserManager.isDeviceIdExist(cassandraClient,deviceId);
  if (isLoginIdExist && isDeviceIdExist) {
    log.info("String_Node_Str" + loginId + "String_Node_Str"+ deviceId+ "String_Node_Str");
    resultCode=ErrorCode.ERROR_LOGINID_DEVICE_BOTH_EXIST;
    return;
  }
 else   if (isLoginIdExist) {
    resultCode=ErrorCode.ERROR_LOGINID_EXIST;
    log.info("String_Node_Str" + loginId);
    return;
  }
 else   if (isDeviceIdExist) {
    resultCode=ErrorCode.ERROR_DEVICEID_BIND;
    log.info("String_Node_Str" + deviceId);
    return;
  }
  User user=UserManager.createUser(cassandraClient,loginId,loginIdType,appId,deviceModel,deviceId,deviceOS,deviceToken,language,countryCode,password,nickName,avatar,accessToken,accessTokenSecret,province,city,location,gender,birthday,sinaNickName,sinaDomain,qqNickName,qqDomain);
  if (user == null) {
    resultCode=ErrorCode.ERROR_CREATE_USER;
    log.info("String_Node_Str");
    return;
  }
}

Fixed version (ground truth):
@Override public void handleData(){
  boolean isLoginIdExist=UserManager.isLoginIdExist(cassandraClient,loginId,loginIdType);
  boolean isDeviceIdExist=UserManager.isDeviceIdExist(cassandraClient,deviceId);
  if (isLoginIdExist && isDeviceIdExist) {
    log.info("String_Node_Str" + loginId + "String_Node_Str"+ deviceId+ "String_Node_Str");
    resultCode=ErrorCode.ERROR_LOGINID_DEVICE_BOTH_EXIST;
    return;
  }
 else   if (isLoginIdExist) {
    resultCode=ErrorCode.ERROR_LOGINID_EXIST;
    log.info("String_Node_Str" + loginId);
    return;
  }
 else   if (isDeviceIdExist) {
    resultCode=ErrorCode.ERROR_DEVICEID_BIND;
    log.info("String_Node_Str" + deviceId);
    return;
  }
  User user=UserManager.createUser(cassandraClient,loginId,loginIdType,appId,deviceModel,deviceId,deviceOS,deviceToken,language,countryCode,password,nickName,avatar,accessToken,accessTokenSecret,province,city,location,gender,birthday,sinaNickName,sinaDomain,qqNickName,qqDomain);
  if (user == null) {
    resultCode=ErrorCode.ERROR_CREATE_USER;
    log.info("String_Node_Str");
    return;
  }
  String userId=user.getUserId();
  UserManager.createUserLoginIdIndex(cassandraClient,userId,loginId,loginIdType);
  UserManager.createUserDeviceIdIndex(cassandraClient,userId,deviceId);
  JSONObject obj=new JSONObject();
  obj.put(ServiceConstant.PARA_USERID,userId);
  resultData=obj;
}
Program: 25471
Project: 25471
Buggy source:
private void writeSameStatNumber(int proNum,String fileName){
  try {
    totalWriter.write(String.valueOf(proNum));
    totalWriter.write(String.valueOf(fileName.substring(0,fileName.indexOf("String_Node_Str"))));
    totalWriter.write(String.valueOf(numCall));
    totalWriter.write(String.valueOf(numIf));
    totalWriter.write(String.valueOf(numAssignment));
    totalWriter.write(String.valueOf(numFunction));
    totalWriter.write(String.valueOf(numReturn));
    totalWriter.write(String.valueOf(numDeclstmt));
    totalWriter.write(String.valueOf("String_Node_Str"));
    totalWriter.write(String.valueOf(numContinue));
    totalWriter.write(String.valueOf(numBreak));
    totalWriter.write(String.valueOf(numFunctionDecl));
    totalWriter.write(String.valueOf(numFor));
    totalWriter.write(String.valueOf(numElse));
    totalWriter.write(String.valueOf(numWhile));
    totalWriter.write(String.valueOf(numDo));
    totalWriter.write(String.valueOf(numSwitch));
    totalWriter.write(String.valueOf(numCase));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void writeSameStatNumber(int proNum,String fileName){
  try {
    totalWriter.write(String.valueOf(proNum));
    totalWriter.write(String.valueOf(fileName.substring(0,fileName.indexOf("String_Node_Str"))));
    totalWriter.write(String.valueOf(numCall));
    totalWriter.write(String.valueOf(numIf));
    totalWriter.write(String.valueOf(numAssignment));
    totalWriter.write(String.valueOf(numFunction));
    totalWriter.write(String.valueOf(numReturn));
    totalWriter.write(String.valueOf(numDeclstmt));
    totalWriter.write(String.valueOf(numDeclStmtWithInit));
    totalWriter.write(String.valueOf(numContinue));
    totalWriter.write(String.valueOf(numBreak));
    totalWriter.write(String.valueOf(numFunctionDecl));
    totalWriter.write(String.valueOf(numFor));
    totalWriter.write(String.valueOf(numElse));
    totalWriter.write(String.valueOf(numWhile));
    totalWriter.write(String.valueOf(numDo));
    totalWriter.write(String.valueOf(numSwitch));
    totalWriter.write(String.valueOf(numCase));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}