Program: 25465
Project: 25465
Buggy source:
@Override public void handleData(){
  String nickName=UserManager.getUserNickName(cassandraClient,userId);
  if (nickName == null) {
    log.info("String_Node_Str" + userId);
    resultCode=ErrorCode.ERROR_USER_GET_NICKNAME;
    return;
  }
  int contenTypeInt=Integer.parseInt(contentType);
  String imageURL=null;
  if (contenTypeInt != DBConstants.CONTENT_TYPE_TEXT) {
switch (contenTypeInt) {
case DBConstants.CONTENT_TYPE_TEXT_PHOTO:
{
        ImageUploadManager uploadManager=new ImageUploadManager();
        imageURL=uploadManager.uploadImageWithCompression(request);
        resultCode=uploadManager.getResultCode();
        log.info("String_Node_Str" + imageURL);
      }
    break;
default :
  break;
}
}
if (resultCode != ErrorCode.ERROR_SUCCESS) {
log.info("String_Node_Str" + resultCode);
return;
}
Post post=PostManager.createPost(cassandraClient,userId,appId,placeId,longitude,latitude,userLongitude,userLatitude,textContent,contentType,srcPostId,replyPostId,imageURL);
if (post == null) {
log.info("String_Node_Str" + placeId + "String_Node_Str"+ userId);
resultCode=ErrorCode.ERROR_CREATE_POST;
return;
}
String postId=post.getPostId();
String createDate=post.getCreateDate();
PostManager.createPlacePostIndex(cassandraClient,placeId,postId);
PostManager.createUserPostIndex(cassandraClient,userId,postId);
PostManager.createUserViewPostIndex(cassandraClient,placeId,postId,createDate);
if (srcPostId == null || srcPostId.length() == 0) {
srcPostId=postId;
}
PostManager.createPostRelatedPostIndex(cassandraClient,postId,srcPostId);
if (replyPostId != null && replyPostId.length() > 0) {
Post replyPost=PostManager.getPostById(cassandraClient,replyPostId);
if (replyPost != null) {
PostManager.createUserMePostIndex(cassandraClient,replyPost.getUserId(),postId);
}
 else {
log.warning("String_Node_Str" + replyPostId);
}
AnalysisLogContent content=new AnalysisLogContent().setLatitude(latitude).setLongitude(longitude).setPlaceId(placeId).setPostId(replyPostId).setPostType(PostType.REPLY).setUserId(userId);
AnalysisLogUtil.log(content);
}
AnalysisLogContent content=new AnalysisLogContent().setLatitude(latitude).setLongitude(longitude).setPlaceId(placeId).setPostId(postId).setPostType(PostType.CREATE).setUserId(userId);
AnalysisLogUtil.log(content);
JSONObject obj=new JSONObject();
obj.put(ServiceConstant.PARA_POSTID,postId);
obj.put(ServiceConstant.PARA_NICKNAME,nickName);
obj.put(ServiceConstant.PARA_CREATE_DATE,createDate);
resultData=obj;
}

Fixed version (ground truth):
@Override public void handleData(){
  String nickName=UserManager.getUserNickName(cassandraClient,userId);
  if (nickName == null) {
    log.info("String_Node_Str" + userId);
    resultCode=ErrorCode.ERROR_USER_GET_NICKNAME;
    return;
  }
  int contenTypeInt=Integer.parseInt(contentType);
  String imageURL=null;
  if (contenTypeInt != DBConstants.CONTENT_TYPE_TEXT) {
switch (contenTypeInt) {
case DBConstants.CONTENT_TYPE_TEXT_PHOTO:
{
        ImageUploadManager uploadManager=new ImageUploadManager();
        imageURL=uploadManager.uploadImageWithCompression(request);
        resultCode=uploadManager.getResultCode();
        log.info("String_Node_Str" + imageURL);
      }
    break;
default :
  break;
}
}
if (resultCode != ErrorCode.ERROR_SUCCESS) {
log.info("String_Node_Str" + resultCode);
return;
}
Post post=PostManager.createPost(cassandraClient,userId,appId,placeId,longitude,latitude,userLongitude,userLatitude,textContent,contentType,srcPostId,replyPostId,imageURL);
if (post == null) {
log.info("String_Node_Str" + placeId + "String_Node_Str"+ userId);
resultCode=ErrorCode.ERROR_CREATE_POST;
return;
}
String postId=post.getPostId();
String createDate=post.getCreateDate();
PostManager.createPlacePostIndex(cassandraClient,placeId,postId);
PostManager.createUserPostIndex(cassandraClient,userId,postId);
PostManager.createUserViewPostIndex(cassandraClient,placeId,postId,createDate);
PostManager.createPostLocationIndex(cassandraClient,postId,createDate,latitude,longitude);
if (srcPostId == null || srcPostId.length() == 0) {
srcPostId=postId;
}
PostManager.createPostRelatedPostIndex(cassandraClient,postId,srcPostId);
if (replyPostId != null && replyPostId.length() > 0) {
Post replyPost=PostManager.getPostById(cassandraClient,replyPostId);
if (replyPost != null) {
PostManager.createUserMePostIndex(cassandraClient,replyPost.getUserId(),postId);
}
 else {
log.warning("String_Node_Str" + replyPostId);
}
AnalysisLogContent content=new AnalysisLogContent().setLatitude(latitude).setLongitude(longitude).setPlaceId(placeId).setPostId(replyPostId).setPostType(PostType.REPLY).setUserId(userId);
AnalysisLogUtil.log(content);
}
AnalysisLogContent content=new AnalysisLogContent().setLatitude(latitude).setLongitude(longitude).setPlaceId(placeId).setPostId(postId).setPostType(PostType.CREATE).setUserId(userId);
AnalysisLogUtil.log(content);
JSONObject obj=new JSONObject();
obj.put(ServiceConstant.PARA_POSTID,postId);
obj.put(ServiceConstant.PARA_NICKNAME,nickName);
obj.put(ServiceConstant.PARA_CREATE_DATE,createDate);
resultData=obj;
}