nus-yam/ex-repair huggingface dataset:
Program: 87142
Project: 87142
Buggy source:
private void addStringArray(String casLabel,String entLabel,JsonObject data,Document doc,List<Element> additionalAttributes){
  Element root=createElement(entLabel + "String_Node_Str",doc);
  for (  Object item : data.getArray(entLabel)) {
    root.appendChild(createTextElement(casLabel,(String)item,doc));
  }
  additionalAttributes.add(root);
}

Fixed version (ground truth):
private void addStringArray(String casLabel,String entLabel,JsonObject data,Document doc,List<Element> additionalAttributes){
  Element root=createElement(casLabel + "String_Node_Str",doc);
  if (data.containsField(entLabel)) {
    for (    Object item : data.getArray(entLabel)) {
      root.appendChild(createTextElement(casLabel,(String)item,doc));
    }
  }
  additionalAttributes.add(root);
}
Program: 87144
Project: 87144
Buggy source:
@Override public void delete(List<String> messagesId,UserInfos user,Handler<Either<String,JsonArray>> result){
  if (validationError(user,result))   return;
  final String getMessage="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  final String getMessageWithAttachments="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  String prepareMessage="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (maxFolderDepth - 1) + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String getAllAttachments=getMessageWithAttachments + "String_Node_Str";
  String deleteAndCollectAttachments=getMessageWithAttachments + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String deleteMessage=getMessage + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  StatementsBuilder b=new StatementsBuilder();
  for (  String id : messagesId) {
    JsonObject params=new JsonObject().putString("String_Node_Str",user.getUserId()).putString("String_Node_Str",id).putBoolean("String_Node_Str",true).putString("String_Node_Str","String_Node_Str");
    b.add(prepareMessage,params);
    b.add(getAllAttachments,params);
    b.add(deleteAndCollectAttachments,params);
    b.add(deleteMessage,params);
  }
  neo.executeTransaction(b.build(),null,true,validResultsHandler(result));
}

Fixed version (ground truth):
@Override public void delete(List<String> messagesId,UserInfos user,Handler<Either<String,JsonArray>> result){
  if (validationError(user,result))   return;
  final String getMessage="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  final String getMessageWithAttachments="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  String prepareMessage="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (maxFolderDepth - 1) + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String getAllAttachments=getMessageWithAttachments + "String_Node_Str" + "String_Node_Str";
  String deleteAndCollectAttachments=getMessageWithAttachments + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String deleteMessage=getMessage + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  StatementsBuilder b=new StatementsBuilder();
  for (  String id : messagesId) {
    JsonObject params=new JsonObject().putString("String_Node_Str",user.getUserId()).putString("String_Node_Str",id).putBoolean("String_Node_Str",true).putString("String_Node_Str","String_Node_Str");
    b.add(prepareMessage,params);
    b.add(getAllAttachments,params);
    b.add(deleteAndCollectAttachments,params);
    b.add(deleteMessage,params);
  }
  neo.executeTransaction(b.build(),null,true,validResultsHandler(result));
}
Program: 87146
Project: 87146
Buggy source:
private void send(final String parentMessageId,final String messageId,final UserInfos user,final Handler<Either<String,JsonObject>> result){
  if (validationParamsError(user,result,messageId))   return;
  String attachmentsRetrieval="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  JsonObject params=new JsonObject().putString("String_Node_Str",user.getUserId()).putString("String_Node_Str",messageId).putString("String_Node_Str",State.DRAFT.name()).putBoolean("String_Node_Str",true);
  neo.execute(attachmentsRetrieval,params,validUniqueResultHandler(new Handler<Either<String,JsonObject>>(){
    public void handle(    Either<String,JsonObject> event){
      if (event.isLeft() || event.isRight() && event.right().getValue() == null) {
        result.handle(new Either.Left<String,JsonObject>("String_Node_Str"));
        return;
      }
      JsonArray attachments=event.right().getValue().getArray("String_Node_Str",new JsonArray());
      if (attachments.size() < 1) {
        sendWithoutAttachments(parentMessageId,messageId,user,result);
      }
 else {
        sendWithAttachments(parentMessageId,messageId,attachments,user,result);
      }
    }
  }
));
}

Fixed version (ground truth):
private void send(final String parentMessageId,final String messageId,final UserInfos user,final Handler<Either<String,JsonObject>> result){
  if (validationParamsError(user,result,messageId))   return;
  String attachmentsRetrieval="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  JsonObject params=new JsonObject().putString("String_Node_Str",user.getUserId()).putString("String_Node_Str",messageId).putString("String_Node_Str",State.DRAFT.name()).putBoolean("String_Node_Str",true);
  neo.execute(attachmentsRetrieval,params,validUniqueResultHandler(new Handler<Either<String,JsonObject>>(){
    public void handle(    Either<String,JsonObject> event){
      if (event.isLeft() || event.isRight() && event.right().getValue() == null) {
        result.handle(new Either.Left<String,JsonObject>("String_Node_Str"));
        return;
      }
      JsonArray attachments=event.right().getValue().getArray("String_Node_Str",new JsonArray());
      if (attachments.size() < 1) {
        sendWithoutAttachments(parentMessageId,messageId,user,result);
      }
 else {
        sendWithAttachments(parentMessageId,messageId,attachments,user,result);
      }
    }
  }
));
}
Program: 87147
Project: 87147
Buggy source:
@BusAddress("String_Node_Str") public void quotaEventBusHandler(final Message<JsonObject> message){
  Handler<Either<String,JsonObject>> responseHandler=new Handler<Either<String,JsonObject>>(){
    @Override public void handle(    Either<String,JsonObject> res){
      if (res.isRight()) {
        message.reply(res.right().getValue());
      }
 else {
        message.reply(new JsonArray());
      }
    }
  }
;
  String userId=message.body().getString("String_Node_Str");
switch (message.body().getString("String_Node_Str","String_Node_Str")) {
case "String_Node_Str":
    quotaService.quotaAndUsage(userId,responseHandler);
  break;
case "String_Node_Str":
long size=message.body().getLong("String_Node_Str");
int threshold=message.body().getInteger("String_Node_Str");
quotaService.incrementStorage(userId,size,threshold,responseHandler);
break;
default :
message.reply(new JsonObject().putString("String_Node_Str","String_Node_Str").putString("String_Node_Str","String_Node_Str"));
}
}

Fixed version (ground truth):
@BusAddress("String_Node_Str") public void quotaEventBusHandler(final Message<JsonObject> message){
  Handler<Either<String,JsonObject>> responseHandler=new Handler<Either<String,JsonObject>>(){
    @Override public void handle(    Either<String,JsonObject> res){
      if (res.isRight()) {
        message.reply(res.right().getValue());
      }
 else {
        message.reply(new JsonObject().putString("String_Node_Str","String_Node_Str").putString("String_Node_Str",res.left().getValue()));
      }
    }
  }
;
  String userId=message.body().getString("String_Node_Str");
switch (message.body().getString("String_Node_Str","String_Node_Str")) {
case "String_Node_Str":
    quotaService.quotaAndUsage(userId,responseHandler);
  break;
case "String_Node_Str":
long size=message.body().getLong("String_Node_Str");
int threshold=message.body().getInteger("String_Node_Str");
quotaService.incrementStorage(userId,size,threshold,responseHandler);
break;
default :
message.reply(new JsonObject().putString("String_Node_Str","String_Node_Str").putString("String_Node_Str","String_Node_Str"));
}
}
Program: 87148
Project: 87148
Buggy source:
@Override public void handle(Either<String,JsonObject> res){
  if (res.isRight()) {
    message.reply(res.right().getValue());
  }
 else {
    message.reply(new JsonArray());
  }
}

Fixed version (ground truth):
@Override public void handle(Either<String,JsonObject> res){
  if (res.isRight()) {
    message.reply(res.right().getValue());
  }
 else {
    message.reply(new JsonObject().putString("String_Node_Str","String_Node_Str").putString("String_Node_Str",res.left().getValue()));
  }
}
Program: 87150
Project: 87150
Buggy source:
private void sendResetPasswordLink(HttpServerRequest request,String email,String resetCode,final Handler<Boolean> handler){
  if (email == null || resetCode == null || email.trim().isEmpty() || resetCode.trim().isEmpty()) {
    handler.handle(false);
    return;
  }
  JsonObject json=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str","String_Node_Str") + "String_Node_Str" + resetCode);
  container.logger().debug(json.encode());
  try {
    notification.sendEmail(request,email,container.config().getString("String_Node_Str","String_Node_Str"),null,null,"String_Node_Str","String_Node_Str",json,true,new Handler<Message<JsonObject>>(){
      @Override public void handle(      Message<JsonObject> message){
        handler.handle("String_Node_Str".equals(message.body().getString("String_Node_Str")));
      }
    }
);
  }
 catch (  IOException e) {
    container.logger().error("String_Node_Str",e);
    handler.handle(false);
  }
}

Fixed version (ground truth):
private void sendResetPasswordLink(HttpServerRequest request,String email,String resetCode,final Handler<Boolean> handler){
  if (email == null || resetCode == null || email.trim().isEmpty() || resetCode.trim().isEmpty()) {
    handler.handle(false);
    return;
  }
  JsonObject json=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str","String_Node_Str") + "String_Node_Str" + resetCode);
  container.logger().debug(json.encode());
  notification.sendEmail(request,email,container.config().getString("String_Node_Str","String_Node_Str"),null,null,"String_Node_Str","String_Node_Str",json,true,new Handler<Message<JsonObject>>(){
    @Override public void handle(    Message<JsonObject> message){
      handler.handle("String_Node_Str".equals(message.body().getString("String_Node_Str")));
    }
  }
);
}
Program: 87151
Project: 87151
Buggy source:
public DefaultUserAuthAccount(Vertx vertx,Container container){
  EventBus eb=Server.getEventBus(vertx);
  this.neo=new Neo(eb,container.logger());
  this.vertx=vertx;
  this.container=container;
  notification=new NotificationHelper(eb,container);
}

Fixed version (ground truth):
public DefaultUserAuthAccount(Vertx vertx,Container container){
  EventBus eb=Server.getEventBus(vertx);
  this.neo=new Neo(eb,container.logger());
  this.vertx=vertx;
  this.container=container;
  notification=new NotificationHelper(vertx,eb,container);
}
Program: 87153
Project: 87153
Buggy source:
@Override public void notifyUpdateBlog(final HttpServerRequest request,final String blogId,final UserInfos user,final String resourceUri){
  if (resourceUri != null && user != null && blogId != null && request != null) {
    QueryBuilder query=QueryBuilder.start("String_Node_Str").is(blogId);
    JsonObject keys=new JsonObject().putNumber("String_Node_Str",1).putNumber("String_Node_Str",1);
    findRecipiants("String_Node_Str",query,keys,null,user,new Handler<Map<String,Object>>(){
      @Override public void handle(      Map<String,Object> event){
        if (event != null) {
          List<String> recipients=(List<String>)event.get("String_Node_Str");
          JsonObject blog=(JsonObject)event.get("String_Node_Str");
          if (recipients != null) {
            JsonObject p=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str") + "String_Node_Str" + user.getUserId()+ "String_Node_Str"+ user.getType()).putString("String_Node_Str",user.getUsername()).putString("String_Node_Str",blog.getString("String_Node_Str")).putString("String_Node_Str",resourceUri);
            try {
              notification.notifyTimeline(request,user,NOTIFICATION_TYPE,NOTIFICATION_TYPE + "String_Node_Str",recipients,blogId,"String_Node_Str",p);
            }
 catch (            IOException e) {
              log.error("String_Node_Str",e);
            }
          }
        }
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void notifyUpdateBlog(final HttpServerRequest request,final String blogId,final UserInfos user,final String resourceUri){
  if (resourceUri != null && user != null && blogId != null && request != null) {
    QueryBuilder query=QueryBuilder.start("String_Node_Str").is(blogId);
    JsonObject keys=new JsonObject().putNumber("String_Node_Str",1).putNumber("String_Node_Str",1);
    findRecipiants("String_Node_Str",query,keys,null,user,new Handler<Map<String,Object>>(){
      @Override public void handle(      Map<String,Object> event){
        if (event != null) {
          List<String> recipients=(List<String>)event.get("String_Node_Str");
          JsonObject blog=(JsonObject)event.get("String_Node_Str");
          if (recipients != null) {
            JsonObject p=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str") + "String_Node_Str" + user.getUserId()+ "String_Node_Str"+ user.getType()).putString("String_Node_Str",user.getUsername()).putString("String_Node_Str",blog.getString("String_Node_Str")).putString("String_Node_Str",resourceUri);
            notification.notifyTimeline(request,user,NOTIFICATION_TYPE,NOTIFICATION_TYPE + "String_Node_Str",recipients,blogId,"String_Node_Str",p);
          }
        }
      }
    }
);
  }
}
Program: 87155
Project: 87155
Buggy source:
public TimelineHelper(Vertx vertx,EventBus eb,Container container){
  this.eb=eb;
  this.render=new Renders(container);
  this.vertx=vertx;
  loadTimelineI18n();
}

Fixed version (ground truth):
public TimelineHelper(Vertx vertx,EventBus eb,Container container){
  this.eb=eb;
  this.render=new Renders(vertx,container);
  this.vertx=vertx;
  loadTimelineI18n();
}
Program: 87156
Project: 87156
Buggy source:
public void notifyTimeline(HttpServerRequest request,UserInfos sender,String type,String eventType,List<String> recipients,String resource,String subResource,String template,JsonObject params) throws IOException {
  JsonArray r=new JsonArray();
  for (  String userId : recipients) {
    r.addObject(new JsonObject().putString("String_Node_Str",userId).putNumber("String_Node_Str",1));
  }
  JsonObject event=new JsonObject().putString("String_Node_Str","String_Node_Str").putString("String_Node_Str",resource).putString("String_Node_Str",type).putString("String_Node_Str",eventType).putString("String_Node_Str",sender.getUserId()).putString("String_Node_Str",render.processTemplate(request,template,params)).putArray("String_Node_Str",r);
  if (subResource != null && !subResource.trim().isEmpty()) {
    event.putString("String_Node_Str",subResource);
  }
  eb.send(TIMELINE_ADDRESS,event);
}

Fixed version (ground truth):
public void notifyTimeline(HttpServerRequest request,UserInfos sender,String type,final String eventType,List<String> recipients,String resource,String subResource,String template,JsonObject params){
  JsonArray r=new JsonArray();
  for (  String userId : recipients) {
    r.addObject(new JsonObject().putString("String_Node_Str",userId).putNumber("String_Node_Str",1));
  }
  final JsonObject event=new JsonObject().putString("String_Node_Str","String_Node_Str").putString("String_Node_Str",resource).putString("String_Node_Str",type).putString("String_Node_Str",eventType).putString("String_Node_Str",sender.getUserId()).putArray("String_Node_Str",r);
  if (subResource != null && !subResource.trim().isEmpty()) {
    event.putString("String_Node_Str",subResource);
  }
  render.processTemplate(request,template,params,new Handler<String>(){
    @Override public void handle(    String message){
      if (message != null) {
        event.putString("String_Node_Str",message);
        eb.send(TIMELINE_ADDRESS,event);
      }
 else {
        log.error("String_Node_Str" + eventType + "String_Node_Str");
      }
    }
  }
);
}
Program: 87157
Project: 87157
Buggy source:
private void timelineNotification(HttpServerRequest request,JsonObject sentMessage,UserInfos user){
  log.debug(sentMessage.encode());
  JsonArray r=sentMessage.getArray("String_Node_Str");
  String id=sentMessage.getString("String_Node_Str");
  String subject=sentMessage.getString("String_Node_Str","String_Node_Str");
  sentMessage.removeField("String_Node_Str");
  sentMessage.removeField("String_Node_Str");
  sentMessage.removeField("String_Node_Str");
  if (r == null || id == null || user == null) {
    return;
  }
  final JsonObject params=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str") + "String_Node_Str" + user.getUserId()+ "String_Node_Str"+ user.getType()).putString("String_Node_Str",user.getUsername()).putString("String_Node_Str",subject).putString("String_Node_Str",container.config().getString("String_Node_Str","String_Node_Str") + pathPrefix + "String_Node_Str"+ id);
  String type=container.config().getString("String_Node_Str",Conversation.class.getSimpleName()).toUpperCase();
  List<String> recipients=new ArrayList<>();
  for (  Object o : r) {
    if (!(o instanceof String))     continue;
    recipients.add((String)o);
  }
  try {
    notification.notifyTimeline(request,user,type,type + "String_Node_Str",recipients,id,"String_Node_Str",params);
  }
 catch (  IOException|MustacheException e) {
    log.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void timelineNotification(HttpServerRequest request,JsonObject sentMessage,UserInfos user){
  log.debug(sentMessage.encode());
  JsonArray r=sentMessage.getArray("String_Node_Str");
  String id=sentMessage.getString("String_Node_Str");
  String subject=sentMessage.getString("String_Node_Str","String_Node_Str");
  sentMessage.removeField("String_Node_Str");
  sentMessage.removeField("String_Node_Str");
  sentMessage.removeField("String_Node_Str");
  if (r == null || id == null || user == null) {
    return;
  }
  final JsonObject params=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str") + "String_Node_Str" + user.getUserId()+ "String_Node_Str"+ user.getType()).putString("String_Node_Str",user.getUsername()).putString("String_Node_Str",subject).putString("String_Node_Str",container.config().getString("String_Node_Str","String_Node_Str") + pathPrefix + "String_Node_Str"+ id);
  String type=container.config().getString("String_Node_Str",Conversation.class.getSimpleName()).toUpperCase();
  List<String> recipients=new ArrayList<>();
  for (  Object o : r) {
    if (!(o instanceof String))     continue;
    recipients.add((String)o);
  }
  notification.notifyTimeline(request,user,type,type + "String_Node_Str",recipients,id,"String_Node_Str",params);
}
Program: 87158
Project: 87158
Buggy source:
@Override public void start(){
  super.start();
  final Renders render=new Renders(container);
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    @Override public void handle(    HttpServerRequest request){
      render.renderView(request,new JsonObject());
    }
  }
);
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    @Override public void handle(    HttpServerRequest request){
      request.response().putHeader("String_Node_Str","String_Node_Str");
      request.response().sendFile(request.params().get("String_Node_Str") + "String_Node_Str");
    }
  }
);
}

Fixed version (ground truth):
@Override public void start(){
  super.start();
  final Renders render=new Renders(vertx,container);
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    @Override public void handle(    HttpServerRequest request){
      render.renderView(request,new JsonObject());
    }
  }
);
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    @Override public void handle(    HttpServerRequest request){
      request.response().putHeader("String_Node_Str","String_Node_Str");
      request.response().sendFile(request.params().get("String_Node_Str") + "String_Node_Str");
    }
  }
);
}
Program: 87159
Project: 87159
Buggy source:
@SecuredAction("String_Node_Str") public void export(final HttpServerRequest request){
  String neoRequest="String_Node_Str";
  Map<String,Object> params=new HashMap<>();
  if (request.params().get("String_Node_Str").equals("String_Node_Str")) {
    neoRequest="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
 else   if (request.params().get("String_Node_Str") != null) {
    neoRequest="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    params.put("String_Node_Str",request.params().get("String_Node_Str"));
  }
 else {
    notFound(request);
  }
  neo.send(neoRequest,params,new Handler<Message<JsonObject>>(){
    @Override public void handle(    Message<JsonObject> res){
      if ("String_Node_Str".equals(res.body().getString("String_Node_Str"))) {
        JsonArray r=Neo.resultToJsonArray(res.body().getObject("String_Node_Str"));
        String export;
        try {
          export=processTemplate(request,"String_Node_Str",new JsonObject().putArray("String_Node_Str",r));
          request.response().putHeader("String_Node_Str","String_Node_Str");
          request.response().putHeader("String_Node_Str","String_Node_Str");
          request.response().end(export);
        }
 catch (        IOException e) {
          renderError(request);
        }
      }
 else {
        renderError(request);
      }
    }
  }
);
}

Fixed version (ground truth):
@SecuredAction("String_Node_Str") public void export(final HttpServerRequest request){
  String neoRequest="String_Node_Str";
  Map<String,Object> params=new HashMap<>();
  if (request.params().get("String_Node_Str").equals("String_Node_Str")) {
    neoRequest="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  }
 else   if (request.params().get("String_Node_Str") != null) {
    neoRequest="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    params.put("String_Node_Str",request.params().get("String_Node_Str"));
  }
 else {
    notFound(request);
  }
  neo.send(neoRequest,params,new Handler<Message<JsonObject>>(){
    @Override public void handle(    Message<JsonObject> res){
      if ("String_Node_Str".equals(res.body().getString("String_Node_Str"))) {
        JsonArray r=Neo.resultToJsonArray(res.body().getObject("String_Node_Str"));
        processTemplate(request,"String_Node_Str",new JsonObject().putArray("String_Node_Str",r),new Handler<String>(){
          @Override public void handle(          String export){
            if (export != null) {
              request.response().putHeader("String_Node_Str","String_Node_Str");
              request.response().putHeader("String_Node_Str","String_Node_Str");
              request.response().end(export);
            }
 else {
              renderError(request);
            }
          }
        }
);
      }
 else {
        renderError(request);
      }
    }
  }
);
}
Program: 87160
Project: 87160
Buggy source:
private void notifyTimeline(final HttpServerRequest request,final UserInfos user){
  UserUtils.findUsersCanSeeMe(eb,request,new Handler<JsonArray>(){
    @Override public void handle(    JsonArray users){
      String action=request.params().get("String_Node_Str");
      List<String> userIds=new ArrayList<>();
      for (      Object o : users) {
        JsonObject u=(JsonObject)o;
        userIds.add(u.getString("String_Node_Str"));
      }
      JsonObject params=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str") + pathPrefix + "String_Node_Str"+ user.getUserId()+ "String_Node_Str"+ user.getType()).putString("String_Node_Str",user.getUsername()).putString("String_Node_Str",request.params().get("String_Node_Str")).putString("String_Node_Str",request.params().get("String_Node_Str"));
      try {
        notification.notifyTimeline(request,user,NOTIFICATION_TYPE,NOTIFICATION_TYPE + "String_Node_Str" + action.toUpperCase(),userIds,user.getUserId() + System.currentTimeMillis() + action,"String_Node_Str" + action + "String_Node_Str",params);
      }
 catch (      IOException e) {
        log.error("String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
private void notifyTimeline(final HttpServerRequest request,final UserInfos user){
  UserUtils.findUsersCanSeeMe(eb,request,new Handler<JsonArray>(){
    @Override public void handle(    JsonArray users){
      String action=request.params().get("String_Node_Str");
      List<String> userIds=new ArrayList<>();
      for (      Object o : users) {
        JsonObject u=(JsonObject)o;
        userIds.add(u.getString("String_Node_Str"));
      }
      JsonObject params=new JsonObject().putString("String_Node_Str",container.config().getString("String_Node_Str") + pathPrefix + "String_Node_Str"+ user.getUserId()+ "String_Node_Str"+ user.getType()).putString("String_Node_Str",user.getUsername()).putString("String_Node_Str",request.params().get("String_Node_Str")).putString("String_Node_Str",request.params().get("String_Node_Str"));
      notification.notifyTimeline(request,user,NOTIFICATION_TYPE,NOTIFICATION_TYPE + "String_Node_Str" + action.toUpperCase(),userIds,user.getUserId() + System.currentTimeMillis() + action,"String_Node_Str" + action + "String_Node_Str",params);
    }
  }
);
}
Program: 87162
Project: 87162
Buggy source:
@Override public void start(){
  try {
    developerId=vertx.fileSystem().readFileSync("String_Node_Str").toString().trim();
    config=getConfig("String_Node_Str","String_Node_Str");
    super.start();
    neo=new Neo(vertx.eventBus(),log);
    deployApps();
  }
 catch (  Exception ex) {
    log.equals(ex.getMessage());
  }
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    public void handle(    HttpServerRequest request){
      renderView(request);
    }
  }
);
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    public void handle(    final HttpServerRequest request){
      neo.send(request);
    }
  }
);
}

Fixed version (ground truth):
@Override public void start(){
  try {
    developerId=vertx.fileSystem().readFileSync("String_Node_Str").toString().trim();
    config=getConfig("String_Node_Str","String_Node_Str");
    super.start();
    neo=new Neo(vertx.eventBus(),log);
    deployApps();
  }
 catch (  Exception ex) {
    log.error(ex.getMessage());
  }
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    public void handle(    HttpServerRequest request){
      renderView(request);
    }
  }
);
  rm.get("String_Node_Str",new Handler<HttpServerRequest>(){
    public void handle(    final HttpServerRequest request){
      neo.send(request);
    }
  }
);
}
Program: 87166
Project: 87166
Buggy source:
public boolean breakOnOperation(AtomicOperation operation,ExecutionEntity execution){
  boolean shouldBreak=true;
  shouldBreak&=processDefinitionId.equals(execution.getProcessDefinitionId());
  if (AT_TRANSITION.equals(breakPointSpec)) {
    shouldBreak&=transitionId.equals(execution.getTransitionBeingTaken().getId());
  }
 else {
    shouldBreak&=activityId.equals(execution.getActivityId());
  }
  shouldBreak&=breakPointSpec.breakOnOperation(operation);
  if (shouldBreak && condition != null) {
    shouldBreak&=condition.evaluate(execution);
  }
  return shouldBreak;
}

Fixed version (ground truth):
public boolean breakOnOperation(AtomicOperation operation,ExecutionEntity execution){
  boolean shouldBreak=true;
  shouldBreak&=processDefinitionId.equals(execution.getProcessDefinitionId());
  if (AT_TRANSITION.equals(breakPointSpec)) {
    shouldBreak&=transitionId.equals(execution.getCurrentTransitionId());
  }
 else {
    shouldBreak&=activityId.equals(execution.getActivityId());
  }
  shouldBreak&=breakPointSpec.breakOnOperation(operation);
  if (shouldBreak && condition != null) {
    shouldBreak&=condition.evaluate(execution);
  }
  return shouldBreak;
}
Program: 87167
Project: 87167
Buggy source:
public boolean breakOnOperation(AtomicOperation operation,ExecutionEntity execution){
  boolean shouldBreak=true;
  shouldBreak&=processDefinitionId.equals(execution.getProcessDefinitionId());
  if (AT_TRANSITION.equals(breakPointSpec)) {
    shouldBreak&=transitionId.equals(execution.getTransitionBeingTaken().getId());
  }
 else {
    shouldBreak&=activityId.equals(execution.getActivityId());
  }
  shouldBreak&=breakPointSpec.breakOnOperation(operation);
  if (condition != null) {
    shouldBreak&=condition.evaluate(execution);
  }
  return shouldBreak;
}

Fixed version (ground truth):
public boolean breakOnOperation(AtomicOperation operation,ExecutionEntity execution){
  boolean shouldBreak=true;
  shouldBreak&=processDefinitionId.equals(execution.getProcessDefinitionId());
  if (AT_TRANSITION.equals(breakPointSpec)) {
    shouldBreak&=transitionId.equals(execution.getTransitionBeingTaken().getId());
  }
 else {
    shouldBreak&=activityId.equals(execution.getActivityId());
  }
  shouldBreak&=breakPointSpec.breakOnOperation(operation);
  if (shouldBreak && condition != null) {
    shouldBreak&=condition.evaluate(execution);
  }
  return shouldBreak;
}
Program: 87168
Project: 87168
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseStatus(value=HttpStatus.OK) public void generateBlogViews() throws Exception {
  log.debug("String_Node_Str");
  long threeMonthsAgo=DateTime.now().minusMonths(3).getMillis();
  blogViewWriteRepository.clear(threeMonthsAgo);
  List<Blog> blogs=blogReadRepository.findAfterTime(threeMonthsAgo);
  long now=DateTime.now().getMillis();
  List<BlogView> blogViews=Lists.newArrayList();
  for (  Blog blog : blogs) {
    Long blogId=blog.getId();
    Long blogTime=blog.getTime();
    int preView=blog.getView();
    String link=blog.getLink();
    int total=DbaUtil.isCsdn(link) ? csdnFetcher.fetchView(link) : iteyeFetcher.fetchView(link);
    int increment=blogViewReadRepository.findByBlogId(blogId).isEmpty() ? total : (total - preView);
    blogViews.add(new BlogView(blogId,total,increment,blogTime,now));
  }
  log.debug(format("String_Node_Str",blogViews));
  blogViewWriteRepository.save(blogViews);
  log.debug("String_Node_Str");
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseStatus(value=HttpStatus.OK) public void generateBlogViews() throws Exception {
  log.debug("String_Node_Str");
  long threeMonthsAgo=DateTime.now().minusMonths(3).getMillis();
  blogViewWriteRepository.clear(threeMonthsAgo);
  List<Blog> blogs=blogReadRepository.findAfterTime(threeMonthsAgo);
  long now=DateTime.now().getMillis();
  List<BlogView> blogViews=Lists.newArrayList();
  for (  Blog blog : blogs) {
    Long blogId=blog.getId();
    Long blogTime=blog.getTime();
    int preView=blog.getView();
    String link=blog.getLink();
    int total=DbaUtil.isCsdn(link) ? csdnFetcher.fetchView(link) : iteyeFetcher.fetchView(link);
    if (total == -1)     continue;
    int increment=blogViewReadRepository.findByBlogId(blogId).isEmpty() ? total : (total - preView);
    blogViews.add(new BlogView(blogId,total,increment,blogTime,now));
  }
  log.debug(format("String_Node_Str",blogViews));
  blogViewWriteRepository.save(blogViews);
  log.debug("String_Node_Str");
}
Program: 87169
Project: 87169
Buggy source:
public int fetchView(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  return fetchNumber(doc.select("String_Node_Str").get(0).text());
}

Fixed version (ground truth):
public int fetchView(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  if (doc == null)   return -1;
  return fetchNumber(doc.select("String_Node_Str").get(0).text());
}
Program: 87170
Project: 87170
Buggy source:
private BatchBlogs fetchPage(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  BatchBlogs batchBlogs=new BatchBlogs();
  batchBlogs.addAllBatchBlogs(fetchBlogs(doc,"String_Node_Str"));
  batchBlogs.addAllBatchBlogs(fetchBlogs(doc,"String_Node_Str"));
  return batchBlogs;
}

Fixed version (ground truth):
private BatchBlogs fetchPage(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  if (doc == null)   return new BatchBlogs();
  BatchBlogs batchBlogs=new BatchBlogs();
  batchBlogs.addAllBatchBlogs(fetchBlogs(doc,"String_Node_Str"));
  batchBlogs.addAllBatchBlogs(fetchBlogs(doc,"String_Node_Str"));
  return batchBlogs;
}
Program: 87171
Project: 87171
Buggy source:
private int getTotalPage(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  Elements statistics=doc.select("String_Node_Str");
  int total=0;
  for (int i=0; i <= 2; i++) {
    total+=fetchNumber(statistics.get(i).text());
  }
  return (int)Math.ceil(total / CSDN_PAGE_COUNT);
}

Fixed version (ground truth):
private int getTotalPage(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  if (doc == null)   return 1;
  Elements statistics=doc.select("String_Node_Str");
  int total=0;
  for (int i=0; i <= 2; i++) {
    total+=fetchNumber(statistics.get(i).text());
  }
  return (int)Math.ceil(total / CSDN_PAGE_COUNT);
}
Program: 87172
Project: 87172
Buggy source:
public int fetchView(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  return fetchNumber(doc.select("String_Node_Str").get(1).text());
}

Fixed version (ground truth):
public int fetchView(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  if (doc == null)   return -1;
  return fetchNumber(doc.select("String_Node_Str").get(1).text());
}
Program: 87173
Project: 87173
Buggy source:
private BatchBlogs fetchBlogs(String url) throws Exception {
  BatchBlogs batchBlogs=new BatchBlogs();
  Document doc=fetchUrlDoc(url);
  Elements blogs=doc.select("String_Node_Str");
  log.debug("String_Node_Str" + blogs.size());
  for (  Element blogElement : blogs) {
    Element titleElement=blogElement.select("String_Node_Str").get(0);
    String title=fetchTitle(titleElement);
    String link=url.substring(0,url.lastIndexOf("String_Node_Str")) + titleElement.attr("String_Node_Str");
    log.debug(format("String_Node_Str",link));
    String blogId=fetchBlogId(link);
    long time=parseIteyeTime(blogElement.select("String_Node_Str").get(0).text());
    int view=fetchNumber(blogElement.select("String_Node_Str").get(1).text());
    int comment=fetchNumber(blogElement.select("String_Node_Str").get(2).text());
    Elements tags=blogElement.select("String_Node_Str");
    Author author=authorService.fetchAuthor(tags);
    Blog blog=new Blog(title,link,view,comment,time,author,blogId,ITEYE_KEY_WORD);
    Blog result=blogReadRepository.findByBlogIdAndWebsite(blogId,ITEYE_KEY_WORD);
    if (result != null) {
      blog.setId(result.getId());
      batchBlogs.addUpdateBlogs(blog);
      continue;
    }
    batchBlogs.addInsertBlogs(blog);
  }
  return batchBlogs;
}

Fixed version (ground truth):
private BatchBlogs fetchBlogs(String url) throws Exception {
  BatchBlogs batchBlogs=new BatchBlogs();
  Document doc=fetchUrlDoc(url);
  if (doc == null)   return new BatchBlogs();
  Elements blogs=doc.select("String_Node_Str");
  log.debug("String_Node_Str" + blogs.size());
  for (  Element blogElement : blogs) {
    Element titleElement=blogElement.select("String_Node_Str").get(0);
    String title=fetchTitle(titleElement);
    String link=url.substring(0,url.lastIndexOf("String_Node_Str")) + titleElement.attr("String_Node_Str");
    log.debug(format("String_Node_Str",link));
    String blogId=fetchBlogId(link);
    long time=parseIteyeTime(blogElement.select("String_Node_Str").get(0).text());
    int view=fetchNumber(blogElement.select("String_Node_Str").get(1).text());
    int comment=fetchNumber(blogElement.select("String_Node_Str").get(2).text());
    Elements tags=blogElement.select("String_Node_Str");
    Author author=authorService.fetchAuthor(tags);
    Blog blog=new Blog(title,link,view,comment,time,author,blogId,ITEYE_KEY_WORD);
    Blog result=blogReadRepository.findByBlogIdAndWebsite(blogId,ITEYE_KEY_WORD);
    if (result != null) {
      blog.setId(result.getId());
      batchBlogs.addUpdateBlogs(blog);
      continue;
    }
    batchBlogs.addInsertBlogs(blog);
  }
  return batchBlogs;
}
Program: 87174
Project: 87174
Buggy source:
private int getTotalPage(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  int total=fetchNumber(doc.select("String_Node_Str").get(0).text());
  return (int)Math.ceil(total / ITEYE_PAGE_COUNT);
}

Fixed version (ground truth):
private int getTotalPage(String url) throws Exception {
  Document doc=fetchUrlDoc(url);
  if (doc == null)   return 1;
  int total=fetchNumber(doc.select("String_Node_Str").get(0).text());
  return (int)Math.ceil(total / ITEYE_PAGE_COUNT);
}
Program: 87175
Project: 87175
Buggy source:
public static Document fetchUrlDoc(String url) throws IOException {
  return Jsoup.connect(url).userAgent("String_Node_Str").get();
}

Fixed version (ground truth):
public static Document fetchUrlDoc(String url) throws IOException {
  try {
    return Jsoup.connect(url).userAgent("String_Node_Str").get();
  }
 catch (  Exception e) {
    log.debug(format("String_Node_Str",url,e.getMessage()));
    return null;
  }
}
Program: 87176
Project: 87176
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseStatus(value=HttpStatus.OK) public void generateBlogViews() throws Exception {
  log.debug("String_Node_Str");
  long threeMonthsAgo=DateTime.now().minusMonths(3).getMillis();
  blogViewWriteRepository.clear(threeMonthsAgo);
  List<Blog> blogs=blogReadRepository.findAfterTime(threeMonthsAgo);
  long now=DateTime.now().getMillis();
  List<BlogView> blogViews=Lists.newArrayList();
  for (  Blog blog : blogs) {
    Long blogId=blog.getId();
    Long blogTime=blog.getTime();
    int preView=blog.getView();
    String link=blog.getLink();
    int total=DbaUtil.isCsdn(link) ? csdnFetcher.fetchView(link) : iteyeFetcher.fetchView(link);
    if (total == -1)     continue;
    int increment=blogViewReadRepository.findByBlogId(blogId).isEmpty() ? total : (total - preView);
    blogViews.add(new BlogView(blogId,total,increment,blogTime,now));
  }
  log.debug(format("String_Node_Str",blogViews));
  blogViewWriteRepository.save(blogViews);
  log.debug("String_Node_Str");
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseStatus(value=HttpStatus.OK) public void generateBlogViews() throws Exception {
  log.debug("String_Node_Str");
  long threeMonthsAgo=DateTime.now().minusMonths(3).getMillis();
  blogViewWriteRepository.clear(threeMonthsAgo);
  List<Blog> blogs=blogReadRepository.findAfterTime(threeMonthsAgo);
  long now=DateTime.now().getMillis();
  List<BlogView> blogViews=Lists.newArrayList();
  for (  Blog blog : blogs) {
    Long blogId=blog.getId();
    Long blogTime=blog.getTime();
    String link=blog.getLink();
    int total=DbaUtil.isCsdn(link) ? csdnFetcher.fetchView(link) : iteyeFetcher.fetchView(link);
    if (total == -1)     continue;
    List<BlogView> existBlogViews=blogViewReadRepository.findByBlogId(blogId);
    int increment=existBlogViews.isEmpty() ? total : total - existBlogViews.get(existBlogViews.size() - 1).getTotal();
    log.debug(format("String_Node_Str",blogId,total,increment));
    blogViews.add(new BlogView(blogId,total,increment,blogTime,now));
  }
  log.debug(format("String_Node_Str",blogViews));
  blogViewWriteRepository.save(blogViews);
  log.debug("String_Node_Str");
}
Program: 87177
Project: 87177
Buggy source:
private BatchBlogs fetchBlogs(Document doc,String elementId) throws Exception {
  BatchBlogs batchBlogs=new BatchBlogs();
  Elements blogs=doc.select(format("String_Node_Str",elementId));
  log.debug("String_Node_Str" + blogs.size());
  for (  Element blogElement : blogs) {
    Element titleLink=blogElement.select("String_Node_Str").get(0);
    String link=String.format("String_Node_Str",CSDN_INDEX,titleLink.attr("String_Node_Str"));
    log.debug(format("String_Node_Str",link));
    String title=fetchTitle(titleLink);
    String blogId=fetchBlogId(link);
    long time=parseTimeStringToLong(blogElement.select("String_Node_Str").get(0).text());
    int view=fetchNumber(blogElement.select("String_Node_Str").get(0).text());
    int comment=fetchNumber(blogElement.select("String_Node_Str").get(0).text());
    Document detailDoc=fetchUrlDoc(link);
    Elements tags=detailDoc.select("String_Node_Str");
    Author author=authorService.fetchAuthor(tags);
    Blog blog=new Blog(title,link,view,comment,time,author,blogId,CSDN_KEY_WORD);
    Blog result=blogReadRepository.findByBlogIdAndWebsite(blogId,CSDN_KEY_WORD);
    if (result != null) {
      blog.setId(result.getId());
      batchBlogs.addUpdateBlogs(blog);
      continue;
    }
    batchBlogs.addInsertBlogs(blog);
  }
  return batchBlogs;
}

Fixed version (ground truth):
private BatchBlogs fetchBlogs(Document doc,String elementId) throws Exception {
  BatchBlogs batchBlogs=new BatchBlogs();
  Elements blogs=doc.select(format("String_Node_Str",elementId));
  log.debug("String_Node_Str" + blogs.size());
  for (  Element blogElement : blogs) {
    Element titleLink=blogElement.select("String_Node_Str").get(0);
    String link=String.format("String_Node_Str",CSDN_INDEX,titleLink.attr("String_Node_Str"));
    log.debug(format("String_Node_Str",link));
    String title=fetchTitle(titleLink);
    String blogId=fetchBlogId(link);
    long time=parseTimeStringToLong(blogElement.select("String_Node_Str").get(0).text());
    int view=fetchNumber(blogElement.select("String_Node_Str").get(0).text());
    int comment=fetchNumber(blogElement.select("String_Node_Str").get(0).text());
    Document detailDoc=fetchUrlDoc(link);
    if (detailDoc == null)     continue;
    Elements tags=detailDoc.select("String_Node_Str");
    Author author=authorService.fetchAuthor(tags);
    Blog blog=new Blog(title,link,view,comment,time,author,blogId,CSDN_KEY_WORD);
    Blog result=blogReadRepository.findByBlogIdAndWebsite(blogId,CSDN_KEY_WORD);
    if (result != null) {
      blog.setId(result.getId());
      batchBlogs.addUpdateBlogs(blog);
      continue;
    }
    batchBlogs.addInsertBlogs(blog);
  }
  return batchBlogs;
}
Program: 87178
Project: 87178
Buggy source:
private List<Top> encapsulateResult(long afterTime){
  List<Top> tops=Lists.newArrayList();
  List<DepGroup> groups=depGroupReadRepository.findAll();
  groups.add(new DepGroup("String_Node_Str",Author.UNKNOWN));
  for (  DepGroup group : groups) {
    log.debug(format("String_Node_Str",group));
    String groupName=group.getName();
    List<Blog> blogs=blogReadRepository.topDetail(afterTime,groupName);
    for (    Blog blog : blogs) {
      List<BlogView> blogViews=blogViewReadRepository.findByBlogId(blog.getId());
      blog.statisticsViewByBlogViews(blogViews);
    }
    Top top=new Top(groupName,blogs.size(),blogs);
    top.calcView();
    tops.add(top);
  }
  sortTopsByView(tops);
  return tops;
}

Fixed version (ground truth):
private List<Top> encapsulateResult(long afterTime){
  List<Top> tops=Lists.newArrayList();
  List<DepGroup> groups=depGroupReadRepository.findAll();
  for (  DepGroup group : groups) {
    log.debug(format("String_Node_Str",group));
    String groupName=group.getName();
    List<Blog> blogs=blogReadRepository.topDetail(afterTime,groupName);
    for (    Blog blog : blogs) {
      List<BlogView> blogViews=blogViewReadRepository.findByBlogId(blog.getId());
      blog.statisticsViewByBlogViews(blogViews);
    }
    Top top=new Top(groupName,blogs.size(),blogs);
    top.calcView();
    tops.add(top);
  }
  sortTopsByView(tops);
  return tops;
}
Program: 87179
Project: 87179
Buggy source:
public void sendMailDirectly(MailInfo mailInfo){
  SaeMail mail=createSaeMailInstance();
  mail.setTo(StringUtils.split(mailInfo.getTo(),"String_Node_Str"));
  mail.setSubject(mailInfo.getSubject());
  mail.setContent(mailInfo.getContent());
  log.debug(format("String_Node_Str",mailInfo.getContent()));
  if (!mail.send()) {
    log.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
public void sendMailDirectly(MailInfo mailInfo){
  SaeMail mail=createSaeMailInstance();
  mail.setTo(StringUtils.split(mailInfo.getTo(),"String_Node_Str"));
  mail.setSubject(mailInfo.getSubject());
  mail.setContent(mailInfo.getContent());
  log.debug(format("String_Node_Str",mailInfo.getTo(),mailInfo.getSubject(),mailInfo.getContent()));
  if (!mail.send()) {
    log.debug("String_Node_Str");
  }
}
Program: 87180
Project: 87180
Buggy source:
public Author fetchAuthor(Elements tags){
  if (tags.size() == 0)   return Author.defaultAuthor();
  String tag=tags.get(tags.size() - 1).text();
  if (Strings.isNullOrEmpty(tag))   return Author.defaultAuthor();
  String[] texts=tag.split("String_Node_Str");
  if (texts.length != 2)   return Author.defaultAuthor();
  DepGroup group=depGroupReadRepository.findByGroupShort(texts[0]);
  String groupName=group != null ? group.getName() : "String_Node_Str";
  DepMember member=depMemberReadRepository.findByMemberShort(texts[1],texts[0]);
  String memberName=member != null ? member.getName() : "String_Node_Str";
  return new Author(groupName,memberName);
}

Fixed version (ground truth):
public Author fetchAuthor(Elements tags){
  if (tags.size() == 0)   return Author.defaultAuthor();
  String tag=tags.get(tags.size() - 1).text();
  if (Strings.isNullOrEmpty(tag))   return Author.defaultAuthor();
  String[] texts=tag.toUpperCase().split("String_Node_Str");
  if (texts.length != 2)   return Author.defaultAuthor();
  DepGroup group=depGroupReadRepository.findByGroupShort(texts[0]);
  String groupName=group != null ? group.getName() : "String_Node_Str";
  DepMember member=depMemberReadRepository.findByMemberShort(texts[1],texts[0]);
  String memberName=member != null ? member.getName() : "String_Node_Str";
  return new Author(groupName,memberName);
}