nus-yam/ex-repair huggingface dataset:
Program: 18006
Project: 18006
Buggy source:
@Override public void collect(int i){
  Document d;
  try {
    d=reader.document(this.baseDoc + i,fieldsToLoad);
    for (    String f : fieldsToLoad) {
      String[] vals=d.getValues(f);
      for (      String s : vals) {
        TokenStream ts=analyzer.tokenStream(targetAnalyzer,new StringReader(s));
        ts.reset();
        while (ts.incrementToken()) {
        }
      }
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
@Override public void collect(int i){
  Document d;
  try {
    d=reader.document(i,fieldsToLoad);
    for (    String f : fieldsToLoad) {
      String[] vals=d.getValues(f);
      for (      String s : vals) {
        TokenStream ts=analyzer.tokenStream(targetAnalyzer,new StringReader(s));
        ts.reset();
        while (ts.incrementToken()) {
        }
      }
    }
  }
 catch (  IOException e) {
  }
}
Program: 18008
Project: 18008
Buggy source:
@Override public void reset() throws IOException {
  super.reset();
  tokenBuffer.clear();
  authorInput=null;
  resetCounter++;
  if (resetCounter > 2) {
    synMap.persist();
  }
}

Fixed version (ground truth):
@Override public void reset() throws IOException {
  super.reset();
  addTokensToSynMap();
  resetCounter++;
  if (resetCounter > 2) {
    synMap.persist();
  }
}
Program: 18009
Project: 18009
Buggy source:
@Override public boolean incrementToken() throws IOException {
  resetCounter=0;
  if (!input.incrementToken()) {
    addTokensToSynMap();
    return false;
  }
  if (authorInput != null) {
    if (tokenTypes.contains(typeAtt.type())) {
      tokenBuffer.add(termAtt.toString());
      if (emitTokens) {
        return true;
      }
      while (input.incrementToken()) {
        if (tokenTypes.contains(typeAtt.type())) {
          tokenBuffer.add(termAtt.toString());
        }
 else {
          if (typeAtt.type().equals(AuthorUtils.AUTHOR_INPUT)) {
            addTokensToSynMap();
            authorInput=termAtt.toString();
            tokenBuffer.clear();
          }
          return true;
        }
      }
    }
  }
  if (typeAtt.type().equals(AuthorUtils.AUTHOR_INPUT)) {
    authorInput=termAtt.toString();
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean incrementToken() throws IOException {
  resetCounter=0;
  if (!input.incrementToken()) {
    return false;
  }
  if (authorInput != null && tokenTypes.contains(typeAtt.type())) {
    tokenBuffer.add(termAtt.toString());
    if (emitTokens) {
      return true;
    }
    while (input.incrementToken()) {
      if (tokenTypes.contains(typeAtt.type())) {
        tokenBuffer.add(termAtt.toString());
      }
 else {
        if (typeAtt.type().equals(AuthorUtils.AUTHOR_INPUT)) {
          addTokensToSynMap();
          authorInput=termAtt.toString();
        }
        return true;
      }
    }
    return false;
  }
  if (typeAtt.type().equals(AuthorUtils.AUTHOR_INPUT)) {
    authorInput=termAtt.toString();
  }
  return true;
}
Program: 18010
Project: 18010
Buggy source:
public void init(Context context,Properties initProps){
  super.init(context,initProps);
  mongoDocIdField=initProps.getProperty(MONGO_DOC_ID);
  mongoHost=initProps.getProperty(MONGO_HOST);
  mongoPort=initProps.getProperty(MONGO_PORT);
  mongoDBName=initProps.getProperty(MONGO_DB_NAME);
  mongoCollectionName=initProps.getProperty(MONGO_COLLECTION_NAME);
  List<Map<String,String>> fields=context.getAllEntityFields();
  fieldColumnMap=new HashMap<String,String>();
  mongoFields=new BasicDBObject();
  mongoFields.put("String_Node_Str",0);
  for (  Map<String,String> field : fields) {
    if ("String_Node_Str".equals(field.get(MONGO_FIELD_ATTR))) {
      String mongoFieldName=field.get(MONGO_FIELD_NAME_ATTR);
      String columnName=field.get(FIELD_COLUMN_ATTR);
      if (mongoFieldName == null) {
        mongoFieldName=columnName;
      }
      mongoFields.put(mongoFieldName,1);
      fieldColumnMap.put(columnName,mongoFieldName);
    }
  }
}

Fixed version (ground truth):
@Override public void init(Context context,Properties initProps){
  super.init(context,initProps);
  mongoDocIdField=initProps.getProperty(MONGO_DOC_ID);
  mongoHost=initProps.getProperty(MONGO_HOST);
  mongoPort=initProps.getProperty(MONGO_PORT);
  mongoDBName=initProps.getProperty(MONGO_DB_NAME);
  mongoCollectionName=initProps.getProperty(MONGO_COLLECTION_NAME);
  List<Map<String,String>> fields=context.getAllEntityFields();
  fieldColumnMap=new HashMap<String,String>();
  mongoFields=new BasicDBObject();
  mongoFields.put("String_Node_Str",0);
  for (  Map<String,String> field : fields) {
    if ("String_Node_Str".equals(field.get(MONGO_FIELD_ATTR))) {
      String mongoFieldName=field.get(MONGO_FIELD_NAME_ATTR);
      String columnName=field.get(FIELD_COLUMN_ATTR);
      if (mongoFieldName == null) {
        mongoFieldName=columnName;
      }
      mongoFields.put(mongoFieldName,1);
      fieldColumnMap.put(columnName,mongoFieldName);
    }
  }
}
Program: 18013
Project: 18013
Buggy source:
protected void runProcessingAdded(int[] recids,SolrQueryRequest req) throws IOException {
  IndexSchema schema=req.getSchema();
  UpdateHandler updateHandler=req.getCore().getUpdateHandler();
  String uniqField=schema.getUniqueKeyField().getName();
  SolrParams params=req.getParams();
  AddUpdateCommand addCmd=new AddUpdateCommand(req);
  addCmd.commitWithin=params.getInt(UpdateParams.COMMIT_WITHIN,-1);
  addCmd.setFlags(UpdateCommand.IGNORE_AUTOCOMMIT);
  if (recids.length > 0) {
    SolrInputDocument doc=new SolrInputDocument();
    for (int i=0; i < recids.length; i++) {
      doc.clear();
      doc.addField(uniqField,recids[i]);
      addCmd.solrDoc=doc;
      updateHandler.addDoc(addCmd);
    }
  }
}

Fixed version (ground truth):
protected void runProcessingAdded(int[] recids,SolrQueryRequest req) throws IOException {
  IndexSchema schema=req.getSchema();
  UpdateHandler updateHandler=req.getCore().getUpdateHandler();
  String uniqField=schema.getUniqueKeyField().getName();
  AddUpdateCommand addCmd=new AddUpdateCommand(req);
  if (recids.length > 0) {
    for (int i=0; i < recids.length; i++) {
      addCmd.clear();
      addCmd.solrDoc=new SolrInputDocument();
      addCmd.solrDoc.addField(uniqField,recids[i]);
      updateHandler.addDoc(addCmd);
    }
  }
}
Program: 18015
Project: 18015
Buggy source:
protected void runProcessingUpdated(int[] recids,SolrQueryRequest req) throws IOException {
  IndexSchema schema=req.getSchema();
  UpdateHandler updateHandler=req.getCore().getUpdateHandler();
  String uniqField=schema.getUniqueKeyField().getName();
  SolrParams params=req.getParams();
  AddUpdateCommand addCmd=new AddUpdateCommand(req);
  addCmd.commitWithin=params.getInt(UpdateParams.COMMIT_WITHIN,-1);
  addCmd.setFlags(UpdateCommand.IGNORE_AUTOCOMMIT);
  if (recids.length > 0) {
    Map<Integer,Integer> map=DictionaryRecIdCache.INSTANCE.getTranslationCache(req.getSearcher().getAtomicReader(),uniqField);
    SolrInputDocument doc=new SolrInputDocument();
    for (int i=0; i < recids.length; i++) {
      if (!map.containsKey(recids[i])) {
        doc.clear();
        doc.addField(uniqField,recids[i]);
        addCmd.solrDoc=doc;
        updateHandler.addDoc(addCmd);
      }
    }
  }
}

Fixed version (ground truth):
protected void runProcessingUpdated(int[] recids,SolrQueryRequest req) throws IOException {
  IndexSchema schema=req.getSchema();
  UpdateHandler updateHandler=req.getCore().getUpdateHandler();
  String uniqField=schema.getUniqueKeyField().getName();
  AddUpdateCommand addCmd=new AddUpdateCommand(req);
  if (recids.length > 0) {
    for (int i=0; i < recids.length; i++) {
      addCmd.clear();
      addCmd.solrDoc=new SolrInputDocument();
      addCmd.solrDoc.addField(uniqField,recids[i]);
      updateHandler.addDoc(addCmd);
    }
  }
}
Program: 18016
Project: 18016
Buggy source:
protected void runProcessingDeleted(int[] recids,SolrQueryRequest req) throws IOException {
  IndexSchema schema=req.getSchema();
  UpdateHandler updateHandler=req.getCore().getUpdateHandler();
  SolrParams params=req.getParams();
  DeleteUpdateCommand delCmd=new DeleteUpdateCommand(req);
  delCmd.commitWithin=params.getInt(UpdateParams.COMMIT_WITHIN,-1);
  delCmd.setFlags(UpdateCommand.IGNORE_AUTOCOMMIT);
  if (recids.length > 0) {
    for (int i=0; i < recids.length; i++) {
      delCmd.id=Integer.toString(recids[i]);
      updateHandler.delete(delCmd);
    }
  }
}

Fixed version (ground truth):
protected void runProcessingDeleted(int[] recids,SolrQueryRequest req) throws IOException {
  UpdateHandler updateHandler=req.getCore().getUpdateHandler();
  DeleteUpdateCommand delCmd=new DeleteUpdateCommand(req);
  if (recids.length > 0) {
    for (int i=0; i < recids.length; i++) {
      delCmd.clear();
      delCmd.id=Integer.toString(recids[i]);
      updateHandler.delete(delCmd);
    }
  }
}
Program: 18017
Project: 18017
Buggy source:
private void runSynchronously(RequestQueue queue,SolrQueryRequest req) throws MalformedURLException, IOException, InterruptedException {
  SolrCore core=req.getCore();
  SolrRequestHandler handler=req.getCore().getRequestHandler(handlerName);
  SolrQueryResponse rsp=new SolrQueryResponse();
  RequestData data=queue.pop();
  LocalSolrQueryRequest locReq=new LocalSolrQueryRequest(req.getCore(),data.getReqParams());
  log.warn("String_Node_Str" + handlerName + "String_Node_Str"+ locReq.getParamString());
  core.execute(handler,locReq,rsp);
  setWorkerMessage("String_Node_Str" + handlerName + "String_Node_Str"+ locReq.getParamString()+ "String_Node_Str"+ rsp.getValues().toString());
}

Fixed version (ground truth):
private void runSynchronously(RequestQueue queue,SolrQueryRequest req) throws MalformedURLException, IOException, InterruptedException {
  SolrCore core=req.getCore();
  SolrRequestHandler handler=req.getCore().getRequestHandler(handlerName);
  RequestData data=queue.pop();
  LocalSolrQueryRequest locReq=new LocalSolrQueryRequest(req.getCore(),data.getReqParams());
  setWorkerMessage("String_Node_Str" + handlerName + "String_Node_Str"+ locReq.getParamString());
  SolrQueryResponse rsp;
  boolean repeat=false;
  do {
    rsp=new SolrQueryResponse();
    core.execute(handler,locReq,rsp);
    String is=(String)rsp.getValues().get("String_Node_Str");
    if (is.equals("String_Node_Str")) {
      repeat=true;
      Thread.sleep(sleepTime);
      setWorkerMessage("String_Node_Str" + handlerName);
    }
  }
 while (repeat);
  setWorkerMessage("String_Node_Str" + handlerName + "String_Node_Str"+ locReq.getParamString()+ "String_Node_Str"+ rsp.getValues().toString());
}
Program: 18018
Project: 18018
Buggy source:
@SuppressWarnings("String_Node_Str") public void init(NamedList args){
  super.init(args);
  if (args.get("String_Node_Str") == null) {
    return;
  }
  NamedList defs=(NamedList)args.get("String_Node_Str");
  if (defs.get("String_Node_Str") != null) {
    handlerName=(String)defs.get("String_Node_Str");
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void init(NamedList args){
  super.init(args);
  if (args.get("String_Node_Str") == null) {
    return;
  }
  NamedList defs=(NamedList)args.get("String_Node_Str");
  if (defs.get("String_Node_Str") != null) {
    handlerName=(String)defs.get("String_Node_Str");
  }
  if (defs.get("String_Node_Str") != null) {
    sleepTime=Long.parseLong((String)defs.get("String_Node_Str"));
  }
}
Program: 18019
Project: 18019
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (!(o instanceof PositionSearchFunction))   return false;
  PositionSearchFunction that=(PositionSearchFunction)o;
  if (this.hashCode() != that.hashCode())   return false;
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (!(o instanceof PositionSearchFunction))   return false;
  PositionSearchFunction that=(PositionSearchFunction)o;
  if (this.hashCode() == that.hashCode())   return true;
  return false;
}
Program: 18021
Project: 18021
Buggy source:
@Override protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
  if (node instanceof AqpANTLRNode && ((AqpANTLRNode)node).getTokenLabel().equals("String_Node_Str")) {
    if (node.getChildren().size() == 1) {
      return node.getChildren().get(0);
    }
    String modifier=((AqpANTLRNode)node.getChildren().get(0)).getTokenName();
    QueryNode childNode=node.getChildren().get(node.getChildren().size() - 1);
    if (modifier.equals("String_Node_Str")) {
      return new ModifierQueryNode(childNode,ModifierQueryNode.Modifier.MOD_REQ);
    }
 else     if (modifier.equals("String_Node_Str")) {
      return new ModifierQueryNode(childNode,ModifierQueryNode.Modifier.MOD_REQ);
    }
 else {
      throw new QueryNodeException(new MessageImpl(QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR,"String_Node_Str" + modifier + "String_Node_Str"+ node.toString()));
    }
  }
  return node;
}

Fixed version (ground truth):
@Override protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
  if (node instanceof AqpANTLRNode && ((AqpANTLRNode)node).getTokenLabel().equals("String_Node_Str")) {
    if (node.getChildren().size() == 1) {
      return node.getChildren().get(0);
    }
    String modifier=((AqpANTLRNode)node.getChildren().get(0)).getTokenName();
    QueryNode childNode=node.getChildren().get(node.getChildren().size() - 1);
    if (modifier.equals("String_Node_Str")) {
      return new ModifierQueryNode(childNode,ModifierQueryNode.Modifier.MOD_REQ);
    }
 else     if (modifier.equals("String_Node_Str")) {
      return new ModifierQueryNode(childNode,ModifierQueryNode.Modifier.MOD_NOT);
    }
 else {
      throw new QueryNodeException(new MessageImpl(QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR,"String_Node_Str" + modifier + "String_Node_Str"+ node.toString()));
    }
  }
  return node;
}
Program: 18022
Project: 18022
Buggy source:
public void handleRequestBody(SolrQueryRequest req,SolrQueryResponse rsp) throws IOException, InterruptedException {
  if (isBusy()) {
    rsp.add("String_Node_Str","String_Node_Str");
    rsp.add("String_Node_Str","String_Node_Str");
    return;
  }
  setBusy(true);
  SolrParams params=req.getParams();
  long start=System.currentTimeMillis();
  Properties prop=loadProperties(params);
  Map<String,Object> dictData=null;
  try {
    dictData=retrieveRecids(prop,req,rsp);
  }
 catch (  RuntimeException e) {
    setBusy(false);
    throw e;
  }
  if (dictData == null) {
    setBusy(false);
    return;
  }
  LocalSolrQueryRequest locReq=new LocalSolrQueryRequest(req.getCore(),params);
  locReq.getContext().put(IKRU_PROPERTIES,prop);
  if (isAsynchronous()) {
    runAsynchronously(dictData,locReq);
  }
 else {
    runSynchronously(dictData,locReq);
    locReq.close();
  }
  long end=System.currentTimeMillis();
  rsp.add("String_Node_Str",isBusy() ? "String_Node_Str" : "String_Node_Str");
  rsp.add("String_Node_Str",end - start);
}

Fixed version (ground truth):
public void handleRequestBody(SolrQueryRequest req,SolrQueryResponse rsp) throws IOException, InterruptedException {
  if (isBusy()) {
    rsp.add("String_Node_Str","String_Node_Str");
    rsp.add("String_Node_Str","String_Node_Str");
    return;
  }
  setBusy(true);
  SolrParams params=req.getParams();
  long start=System.currentTimeMillis();
  Properties prop=loadProperties(params);
  Map<String,Object> dictData=null;
  try {
    dictData=retrieveRecids(prop,req,rsp);
  }
 catch (  RuntimeException e) {
    setBusy(false);
    throw e;
  }
  if (dictData == null) {
    setBusy(false);
    return;
  }
  LocalSolrQueryRequest locReq=new LocalSolrQueryRequest(req.getCore(),params);
  locReq.getContext().put(IKRU_PROPERTIES,prop);
  if (isAsynchronous()) {
    runAsynchronously(dictData,locReq);
  }
 else {
    runSynchronously(dictData,locReq);
    locReq.close();
    setBusy(false);
  }
  long end=System.currentTimeMillis();
  rsp.add("String_Node_Str",isBusy() ? "String_Node_Str" : "String_Node_Str");
  rsp.add("String_Node_Str",end - start);
}
Program: 18023
Project: 18023
Buggy source:
protected String getFetchURL(String importurl,String inveniourl,String queryPart,Integer maximport) throws UnsupportedEncodingException {
  String sign=importurl.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str";
  return importurl + sign + "String_Node_Str"+ java.net.URLEncoder.encode(inveniourl + "String_Node_Str" + queryPart+ "String_Node_Str"+ maximport+ "String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
protected String getFetchURL(String importurl,String inveniourl,String queryPart,Integer maximport) throws UnsupportedEncodingException {
  String sign=importurl.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str";
  return importurl + sign + "String_Node_Str"+ java.net.URLEncoder.encode(inveniourl + "String_Node_Str" + java.net.URLEncoder.encode(queryPart,"String_Node_Str")+ "String_Node_Str"+ maximport+ "String_Node_Str","String_Node_Str");
}
Program: 18024
Project: 18024
Buggy source:
protected String getFetchURL(String importurl,String inveniourl,String queryPart,Integer maximport) throws UnsupportedEncodingException {
  String sign=importurl.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str";
  return importurl + sign + "String_Node_Str"+ java.net.URLEncoder.encode(inveniourl + "String_Node_Str" + queryPart+ "String_Node_Str"+ maximport+ "String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
protected String getFetchURL(String importurl,String inveniourl,String queryPart,Integer maximport) throws UnsupportedEncodingException {
  String sign=importurl.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str";
  return importurl + sign + "String_Node_Str"+ java.net.URLEncoder.encode(inveniourl + "String_Node_Str" + java.net.URLEncoder.encode(queryPart,"String_Node_Str")+ "String_Node_Str"+ maximport+ "String_Node_Str","String_Node_Str");
}
Program: 18025
Project: 18025
Buggy source:
private void ban(BanType type,String targetName,String targetUUID,String senderName,String senderUUID,String reason,String duration,String measure){
  if (targetName == null || senderName == null) {
    return;
  }
  String targetIP="String_Node_Str";
  if (type != BanType.UNBAN) {
    final Player target=Bukkit.getPlayerExact(targetName);
    targetIP=(target != null) ? target.getAddress().getAddress().getHostAddress() : "String_Node_Str";
  }
  Ban banControl=new Ban(plugin,type.getActionName(),targetName,targetIP,senderName,reason,duration,measure);
  Thread triggerThread=new Thread(banControl);
  triggerThread.start();
}

Fixed version (ground truth):
private void ban(BanType type,String targetName,String targetUUID,String senderName,String senderUUID,String reason,String duration,String measure){
  if (targetName == null || senderName == null) {
    return;
  }
  String targetIP="String_Node_Str";
  if (type != BanType.UNBAN) {
    final Player target=Bukkit.getPlayerExact(targetName);
    targetIP=(target != null) ? target.getAddress().getAddress().getHostAddress() : "String_Node_Str";
  }
  Ban banControl=new Ban(plugin,type.getActionName(),targetName,targetUUID,targetIP,senderName,senderUUID,reason,duration,measure,null,false);
  Thread triggerThread=new Thread(banControl);
  triggerThread.start();
}
Program: 18026
Project: 18026
Buggy source:
private void bukkitBan(final boolean flag){
  OfflinePlayer target=plugin.getServer().getOfflinePlayer(playerName);
  if (target == null) {
    return;
  }
  if (flag) {
    if (!target.isBanned()) {
      target.setBanned(true);
      this.kickPlayer(playerName,_("String_Node_Str",I18n.PLAYER,playerName,I18n.SENDER,senderName,I18n.REASON,reason,I18n.IP,playerIP));
    }
  }
 else {
    if (target.isBanned()) {
      target.setBanned(false);
    }
  }
  if (!target.isBanned()) {
    target.setBanned(true);
  }
}

Fixed version (ground truth):
private void bukkitBan(final boolean flag){
  OfflinePlayer target=plugin.getServer().getOfflinePlayer(playerName);
  if (target == null) {
    return;
  }
  if (flag) {
    if (!target.isBanned()) {
      target.setBanned(true);
      this.kickPlayer(playerName,_("String_Node_Str",I18n.PLAYER,playerName,I18n.SENDER,senderName,I18n.REASON,reason,I18n.IP,playerIP));
    }
  }
 else {
    if (target.isBanned()) {
      target.setBanned(false);
    }
  }
}
Program: 18031
Project: 18031
Buggy source:
public static MCBansAPI getHandle(final MCBans plugin,final Plugin otherPlugin){
  if (otherPlugin == null)   return null;
  MCBansAPI api=apiHandles.get(plugin);
  if (api == null) {
    api=new MCBansAPI(plugin,otherPlugin.getName());
    apiHandles.put(plugin,api);
  }
  return api;
}

Fixed version (ground truth):
public static MCBansAPI getHandle(final MCBans plugin,final Plugin otherPlugin){
  if (otherPlugin == null)   return null;
  MCBansAPI api=apiHandles.get(otherPlugin);
  if (api == null) {
    api=new MCBansAPI(plugin,otherPlugin.getName());
    apiHandles.put(otherPlugin,api);
  }
  return api;
}
Program: 18032
Project: 18032
Buggy source:
public boolean run(final BukkitInterface plugin,final CommandSender sender,final String cmd,final String[] preArgs){
  if (name == null) {
    plugin.broadcastPlayer(sender,"String_Node_Str");
    return true;
  }
  this.plugin=plugin;
  this.config=plugin.settings;
  this.sender=sender;
  this.command=cmd;
  args.clear();
  for (  String arg : preArgs)   args.add(arg);
  if (argLength > args.size()) {
    plugin.broadcastPlayer(sender,ChatColor.DARK_RED + plugin.language.getFormat("String_Node_Str"));
    return true;
  }
  if (bePlayer && !(sender instanceof Player)) {
    plugin.broadcastPlayer(sender,"String_Node_Str");
    return true;
  }
  if (sender instanceof Player) {
    player=(Player)sender;
    senderName=player.getName();
    isPlayer=true;
  }
  if (!permission(sender)) {
    plugin.broadcastPlayer(sender,plugin.language.getFormat("String_Node_Str"));
    return true;
  }
  if (banning && args.size() > 0) {
    target=args.get(0).trim();
    final Player targetPlayer=Bukkit.getPlayerExact(target);
    if (targetPlayer != null && targetPlayer.isOnline()) {
      targetIP=targetPlayer.getAddress().getAddress().getHostAddress();
    }
  }
  try {
    execute();
  }
 catch (  CommandException ex) {
    Throwable error=ex;
    while (error instanceof Exception) {
      plugin.broadcastPlayer(sender,error.getMessage());
      error=error.getCause();
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean run(final BukkitInterface plugin,final CommandSender sender,final String cmd,final String[] preArgs){
  if (name == null) {
    plugin.broadcastPlayer(sender,"String_Node_Str");
    return true;
  }
  init();
  this.plugin=plugin;
  this.config=plugin.settings;
  this.sender=sender;
  this.command=cmd;
  for (  String arg : preArgs)   args.add(arg);
  if (argLength > args.size()) {
    plugin.broadcastPlayer(sender,ChatColor.DARK_RED + plugin.language.getFormat("String_Node_Str"));
    return true;
  }
  if (bePlayer && !(sender instanceof Player)) {
    plugin.broadcastPlayer(sender,"String_Node_Str");
    return true;
  }
  if (sender instanceof Player) {
    player=(Player)sender;
    senderName=player.getName();
    isPlayer=true;
  }
  if (!permission(sender)) {
    plugin.broadcastPlayer(sender,plugin.language.getFormat("String_Node_Str"));
    return true;
  }
  if (banning && args.size() > 0) {
    target=args.get(0).trim();
    final Player targetPlayer=Bukkit.getPlayerExact(target);
    if (targetPlayer != null && targetPlayer.isOnline()) {
      targetIP=targetPlayer.getAddress().getAddress().getHostAddress();
    }
  }
  try {
    execute();
  }
 catch (  CommandException ex) {
    Throwable error=ex;
    while (error instanceof Exception) {
      plugin.broadcastPlayer(sender,error.getMessage());
      error=error.getCause();
    }
  }
  return true;
}
Program: 18033
Project: 18033
Buggy source:
private static void extractLanguageFile(final String locale,final File langDir,final boolean force){
  FileStructure.extractResource("String_Node_Str" + locale,langDir,force,true);
}

Fixed version (ground truth):
private static void extractLanguageFile(final String locale,final File langDir,final boolean force){
  FileStructure.extractResource("String_Node_Str" + locale + "String_Node_Str",langDir,force,true);
}
Program: 18034
Project: 18034
Buggy source:
/** 
 * Setup and select rollback method
 * @return true if integration plugin found
 */
public boolean setupHandler(){
  PluginManager pm=plugin.getServer().getPluginManager();
  Plugin check=pm.getPlugin("String_Node_Str");
  if (check != null) {
    logblock=(LogBlock)check;
    method=RollbackMethod.LOGBLOCK;
    plugin.log(LogLevels.INFO,"String_Node_Str");
    return true;
  }
  check=pm.getPlugin("String_Node_Str");
  if (check != null) {
    hawkeye=(HawkEye)check;
    method=RollbackMethod.HAWKEYE;
    plugin.log(LogLevels.INFO,"String_Node_Str");
    return true;
  }
  method=null;
  return false;
}

Fixed version (ground truth):
/** 
 * Setup and select rollback method
 * @return true if integration plugin found
 */
public boolean setupHandler(){
  PluginManager pm=plugin.getServer().getPluginManager();
  Plugin checkLb=pm.getPlugin("String_Node_Str");
  if (checkLb != null && checkLb.isEnabled()) {
    method=new LbRollback(plugin);
    plugin.log(LogLevels.INFO,"String_Node_Str");
    return true;
  }
  Plugin checkHe=pm.getPlugin("String_Node_Str");
  if (checkHe != null && checkHe.isEnabled()) {
    method=new HeRollback(plugin);
    plugin.log(LogLevels.INFO,"String_Node_Str");
    return true;
  }
  plugin.log(LogLevels.INFO,"String_Node_Str");
  method=null;
  return false;
}
Program: 18035
Project: 18035
Buggy source:
/** 
 * Rollback with detected rollback method
 */
public boolean rollback(final String admin,final String target,final int time){
  if (method == null) {
    return false;
  }
  worlds=plugin.Settings.getString("String_Node_Str").split("String_Node_Str");
  CommandSender sender=plugin.getServer().getPlayer(admin);
  if (sender == null)   sender=plugin.getServer().getPlayer(target);
  if (sender == null)   sender=plugin.getServer().getConsoleSender();
switch (method) {
case LOGBLOCK:
    return rb_logblock(sender,admin,target,time);
case HAWKEYE:
  return rb_hawkeye(sender,admin,target);
}
return false;
}

Fixed version (ground truth):
/** 
 * Rollback with detected rollback method
 */
public boolean rollback(final String admin,final String target,final int time){
  if (method == null) {
    return false;
  }
  CommandSender sender=plugin.getServer().getPlayer(admin);
  if (sender == null)   sender=plugin.getServer().getPlayer(target);
  if (sender == null)   sender=plugin.getServer().getConsoleSender();
  return method.rollback(sender,admin,target,time);
}
Program: 18037
Project: 18037
Buggy source:
public Media getMedia(long mediaId){
  return get(buildUri(MEDIA_ENDPOINT + Long.toString(mediaId) + "String_Node_Str"),Media.class);
}

Fixed version (ground truth):
public Media getMedia(long mediaId){
  return get(buildUri(MEDIA_ENDPOINT + Long.toString(mediaId) + "String_Node_Str"),MediaContainer.class).getMedia();
}
Program: 18038
Project: 18038
Buggy source:
public InstagramProfile getUser(long userId){
  return get(buildUri(USERS_ENDPOINT + Long.toString(userId) + "String_Node_Str"),InstagramProfile.class);
}

Fixed version (ground truth):
public InstagramProfile getUser(long userId){
  return get(buildUri(USERS_ENDPOINT + Long.toString(userId) + "String_Node_Str"),InstagramProfileContainer.class).getProfile();
}
Program: 18039
Project: 18039
Buggy source:
@Test public void getMedia(){
  mockServer.expect(requestTo("String_Node_Str")).andExpect(method(GET)).andRespond(withResponse(new ClassPathResource("String_Node_Str",getClass()),responseHeaders));
  Media media=instagram.mediaOperations().getMedia(48904105);
  mockServer.verify();
}

Fixed version (ground truth):
@Test public void getMedia(){
  mockServer.expect(requestTo("String_Node_Str")).andExpect(method(GET)).andRespond(withResponse(new ClassPathResource("String_Node_Str",getClass()),responseHeaders));
  Media media=instagram.mediaOperations().getMedia(48904105);
  assertEquals(48904105,media.getId());
  mockServer.verify();
}
Program: 18040
Project: 18040
Buggy source:
@Test public void getUser(){
  mockServer.expect(requestTo("String_Node_Str")).andExpect(method(GET)).andRespond(withResponse(new ClassPathResource("String_Node_Str",getClass()),responseHeaders));
  InstagramProfile user=instagram.userOperations().getUser();
  mockServer.verify();
}

Fixed version (ground truth):
@Test public void getUser(){
  mockServer.expect(requestTo("String_Node_Str")).andExpect(method(GET)).andRespond(withResponse(new ClassPathResource("String_Node_Str",getClass()),responseHeaders));
  InstagramProfile user=instagram.userOperations().getUser();
  assertEquals("String_Node_Str",user.getUsername());
  mockServer.verify();
}
Program: 18041
Project: 18041
Buggy source:
@Test public void getSpecificUser(){
  mockServer.expect(requestTo("String_Node_Str")).andExpect(method(GET)).andRespond(withResponse(new ClassPathResource("String_Node_Str",getClass()),responseHeaders));
  InstagramProfile user=instagram.userOperations().getUser(12345);
  mockServer.verify();
}

Fixed version (ground truth):
@Test public void getSpecificUser(){
  mockServer.expect(requestTo("String_Node_Str")).andExpect(method(GET)).andRespond(withResponse(new ClassPathResource("String_Node_Str",getClass()),responseHeaders));
  InstagramProfile user=instagram.userOperations().getUser(12345);
  assertEquals("String_Node_Str",user.getUsername());
  mockServer.verify();
}
Program: 18042
Project: 18042
Buggy source:
@Override protected void doWakefulWork(Intent intent){
  context=getApplicationContext();
  new Thread(this).start();
}

Fixed version (ground truth):
@Override protected void doWakefulWork(Intent intent){
  context=getApplicationContext();
  if (!intent.getBooleanExtra("String_Node_Str",false))   new Thread(this).start();
}
Program: 18043
Project: 18043
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  bindService();
  bindList();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  activity=this;
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  bindService();
  bindList();
}
Program: 18044
Project: 18044
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  Bundle extras=intent.getExtras();
  boolean success=extras.getBoolean(WebService.EXTRAS_SUCCESS,false);
  String message=extras.getString(WebService.EXTRAS_RESPONSE_MESSAGE);
  if (message == null)   message="String_Node_Str";
  if (success) {
    try {
      loadData();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
  }
  if (dialog != null && dialog.isShowing())   dialog.dismiss();
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  Bundle extras=intent.getExtras();
  boolean success=extras.getBoolean(WebService.EXTRAS_SUCCESS,false);
  String message=extras.getString(WebService.EXTRAS_RESPONSE_MESSAGE);
  if (message == null)   message="String_Node_Str";
  if (success) {
    try {
      loadData();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    AlertDialog.Builder builder=new AlertDialog.Builder(activity);
    builder.setMessage(message).setCancelable(false).setNeutralButton("String_Node_Str",new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int id){
        dialog.cancel();
      }
    }
);
    final AlertDialog alert=builder.create();
  }
  if (dialog != null && dialog.isShowing())   dialog.dismiss();
}
Program: 18045
Project: 18045
Buggy source:
@Override public void onPause(){
  super.onPause();
  mLocalActivityManager.dispatchResume();
}

Fixed version (ground truth):
@Override public void onPause(){
  super.onPause();
  mLocalActivityManager.dispatchPause(getActivity().isFinishing());
}
Program: 18046
Project: 18046
Buggy source:
@Override public boolean onQueryTextSubmit(String query){
  return false;
}

Fixed version (ground truth):
@Override public boolean onQueryTextSubmit(String query){
  Log.e("String_Node_Str",query);
  return false;
}
Program: 18047
Project: 18047
Buggy source:
private void addCompatSearch(Menu menu){
  MenuItem item=menu.add("String_Node_Str");
  item.setIcon(android.R.drawable.ic_menu_search);
  item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
  SearchView sv=new SearchView(this);
  sv.setQuery("String_Node_Str",false);
  sv.setOnQueryTextListener(this);
  item.setActionView(sv);
}

Fixed version (ground truth):
private void addCompatSearch(Menu menu){
  MenuItem item=menu.add("String_Node_Str");
  item.setIcon(android.R.drawable.ic_menu_search);
  item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
  SearchView sv=new SearchView(this);
  sv.setQuery("String_Node_Str",false);
  sv.setOnQueryTextListener(this);
  sv.setSubmitButtonEnabled(true);
  sv.setQueryHint("String_Node_Str");
  item.setActionView(sv);
}
Program: 18048
Project: 18048
Buggy source:
@Override public boolean onQueryTextChange(String newText){
  return false;
}

Fixed version (ground truth):
@Override public boolean onQueryTextChange(String newText){
  Log.e("String_Node_Str",newText);
  return false;
}
Program: 18049
Project: 18049
Buggy source:
public static final double[] inv(double[] x){
  double[] z=new double[2];
  if (x[1] != 0.0) {
    double scalar;
    if (Math.abs(x[0]) >= Math.abs(z[1])) {
      scalar=1.0 / (x[0] + x[1] * (x[1] / x[0]));
      z[0]=scalar;
      z[1]=scalar * (-x[1] / x[0]);
    }
 else {
      scalar=1.0 / (x[0] * (x[0] / x[1]) + x[1]);
      z[0]=scalar * (x[0] / x[1]);
      z[1]=-scalar;
    }
  }
 else {
    z[0]=1 / x[0];
    z[1]=0;
  }
  return z;
}

Fixed version (ground truth):
public static final double[] inv(double[] x){
  double[] z=new double[2];
  if (x[1] != 0.0) {
    double scalar;
    if (Math.abs(x[0]) >= Math.abs(x[1])) {
      scalar=1.0 / (x[0] + x[1] * (x[1] / x[0]));
      z[0]=scalar;
      z[1]=scalar * (-x[1] / x[0]);
    }
 else {
      scalar=1.0 / (x[0] * (x[0] / x[1]) + x[1]);
      z[0]=scalar * (x[0] / x[1]);
      z[1]=-scalar;
    }
  }
 else {
    z[0]=1 / x[0];
    z[1]=0;
  }
  return z;
}
Program: 18050
Project: 18050
Buggy source:
public static final float[] inv(float[] x){
  float[] z=new float[2];
  if (x[1] != 0.0) {
    float scalar;
    if (Math.abs(x[0]) >= Math.abs(z[1])) {
      scalar=(float)(1.0 / (x[0] + x[1] * (x[1] / x[0])));
      z[0]=scalar;
      z[1]=scalar * (-x[1] / x[0]);
    }
 else {
      scalar=(float)(1.0 / (x[0] * (x[0] / x[1]) + x[1]));
      z[0]=scalar * (x[0] / x[1]);
      z[1]=-scalar;
    }
  }
 else {
    z[0]=1 / x[0];
    z[1]=0;
  }
  return z;
}

Fixed version (ground truth):
public static final float[] inv(float[] x){
  float[] z=new float[2];
  if (x[1] != 0.0) {
    float scalar;
    if (Math.abs(x[0]) >= Math.abs(x[1])) {
      scalar=(float)(1.0 / (x[0] + x[1] * (x[1] / x[0])));
      z[0]=scalar;
      z[1]=scalar * (-x[1] / x[0]);
    }
 else {
      scalar=(float)(1.0 / (x[0] * (x[0] / x[1]) + x[1]));
      z[0]=scalar * (x[0] / x[1]);
      z[1]=-scalar;
    }
  }
 else {
    z[0]=1 / x[0];
    z[1]=0;
  }
  return z;
}
Program: 18051
Project: 18051
Buggy source:
public void initializeProvider() throws InitializationFailedException {
  try {
    client=ModelControllerClient.Factory.create(InetAddress.getLocalHost(),9999);
  }
 catch (  Exception e) {
    throw new InitializationFailedException();
  }
catch (  NoClassDefFoundError e) {
    throw new InitializationFailedException();
  }
}

Fixed version (ground truth):
public void initializeProvider() throws InitializationFailedException {
  try {
    client=ModelControllerClient.Factory.create("String_Node_Str",9999);
  }
 catch (  Exception e) {
    throw new InitializationFailedException();
  }
catch (  NoClassDefFoundError e) {
    throw new InitializationFailedException();
  }
}
Program: 18052
Project: 18052
Buggy source:
@Override public void encodeEnd(FacesContext context) throws IOException {
  ResponseWriter writer=context.getResponseWriter();
  writer.startElement("String_Node_Str",null);
  writer.writeAttribute("String_Node_Str",this.getClientId(context),null);
  writer.writeAttribute("String_Node_Str",this.getStyleClass(),null);
  writer.writeAttribute("String_Node_Str",this.getStyle(),null);
  writer.startElement("String_Node_Str",null);
  writer.writeAttribute("String_Node_Str",new StringBuffer().append("String_Node_Str").append(this.getSourceType()),null);
  renderContent(context);
  writer.endElement("String_Node_Str");
  JSFunction function=new JSFunction("String_Node_Str");
  writer.startElement("String_Node_Str",null);
  writer.write("String_Node_Str" + this.getClientId(context).replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str");
  writer.write("String_Node_Str");
  writer.write(function.toScript());
  writer.endElement("String_Node_Str");
  writer.endElement("String_Node_Str");
}

Fixed version (ground truth):
@Override public void encodeEnd(FacesContext context) throws IOException {
  ResponseWriter writer=context.getResponseWriter();
  writer.startElement("String_Node_Str",null);
  writer.writeAttribute("String_Node_Str",this.getClientId(context),null);
  writer.writeAttribute("String_Node_Str",this.getStyleClass(),null);
  writer.writeAttribute("String_Node_Str",this.getStyle(),null);
  writer.startElement("String_Node_Str",null);
  writer.writeAttribute("String_Node_Str",new StringBuffer().append("String_Node_Str").append(this.getSourceType()),null);
  renderContent(context);
  writer.endElement("String_Node_Str");
  JSFunction function=new JSFunction("String_Node_Str");
  writer.startElement("String_Node_Str",null);
  writer.writeAttribute("String_Node_Str","String_Node_Str",null);
  writer.write("String_Node_Str" + this.getClientId(context).replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str");
  writer.write("String_Node_Str");
  writer.write(function.toScript());
  writer.endElement("String_Node_Str");
  writer.endElement("String_Node_Str");
}
Program: 18053
Project: 18053
Buggy source:
@Override public void onPageStarted(WebView view,String url,Bitmap favicon){
  try {
    URI uri=new URI(url);
    String[] segments=uri.getPath().split("String_Node_Str");
    String filename=segments[segments.length - 1];
    if (filename.contains("String_Node_Str")) {
      currentPage=Integer.parseInt(filename.substring(0,filename.indexOf("String_Node_Str")));
    }
 else {
      currentPage=Integer.parseInt(filename.substring(0,filename.indexOf("String_Node_Str")));
    }
  }
 catch (  URISyntaxException e) {
    e.printStackTrace();
  }
  System.out.println(currentPage + "String_Node_Str" + url);
}

Fixed version (ground truth):
@Override public void onPageStarted(WebView view,String url,Bitmap favicon){
  try {
    URI uri=new URI(url);
    String[] segments=uri.getPath().split("String_Node_Str");
    String filename=segments[segments.length - 1];
    currentPage=htmlMap.get(filename);
  }
 catch (  URISyntaxException e) {
    e.printStackTrace();
  }
  System.out.println(currentPage + "String_Node_Str" + url);
}
Program: 18054
Project: 18054
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(final Bundle savedInstanceState){
  System.out.println("String_Node_Str");
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  htmlFiles=loadBook();
  totalPages=htmlFiles.size();
  webView=(WebView)findViewById(R.id.webview);
  webView.setWebViewClient(new FriarWebViewClient());
  webView.getSettings().setJavaScriptEnabled(false);
  gestureDetector=new GestureDetector(gestureListener);
  webView.setOnTouchListener(new View.OnTouchListener(){
    public boolean onTouch(    View wv,    MotionEvent event){
      gestureDetector.onTouchEvent(event);
      return false;
    }
  }
);
  webView.loadUrl(BASE_URL + htmlFiles.get(currentPage));
  System.out.println(BASE_URL + htmlFiles.get(currentPage));
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(final Bundle savedInstanceState){
  System.out.println("String_Node_Str");
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  htmlFiles=loadBook();
  totalPages=htmlFiles.size();
  int count=0;
  for (  String filename : htmlFiles) {
    htmlMap.put(filename,count++);
  }
  webView=(WebView)findViewById(R.id.webview);
  webView.setWebViewClient(new FriarWebViewClient());
  webView.getSettings().setJavaScriptEnabled(false);
  gestureDetector=new GestureDetector(gestureListener);
  webView.setOnTouchListener(new View.OnTouchListener(){
    public boolean onTouch(    View wv,    MotionEvent event){
      gestureDetector.onTouchEvent(event);
      return false;
    }
  }
);
  webView.loadUrl(BASE_URL + htmlFiles.get(currentPage));
  System.out.println(BASE_URL + htmlFiles.get(currentPage));
}
Program: 18055
Project: 18055
Buggy source:
private List<String> loadBook(){
  List<String> htmlFiles=new ArrayList<String>();
  try {
    String[] files=getAssets().list("String_Node_Str");
    for (    String file : files) {
      if (file.endsWith("String_Node_Str")) {
        htmlFiles.add(file);
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  Collections.sort(htmlFiles,new AlphanumComparator());
  return htmlFiles;
}

Fixed version (ground truth):
private List<String> loadBook(){
  try {
    String[] files=getAssets().list("String_Node_Str");
    for (    String file : files) {
      if (file.endsWith("String_Node_Str")) {
        htmlFiles.add(file);
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  Collections.sort(htmlFiles,new AlphanumComparator());
  return htmlFiles;
}
Program: 18056
Project: 18056
Buggy source:
@Override public boolean onFling(MotionEvent e1,MotionEvent e2,float velocityX,float velocityY){
  final float xDistance=Math.abs(e1.getX() - e2.getX());
  final float yDistance=Math.abs(e1.getY() - e2.getY());
  if (xDistance > this.SWIPE_MAX_DISTANCE || yDistance > this.SWIPE_MAX_DISTANCE) {
    return false;
  }
  velocityX=Math.abs(velocityX);
  velocityY=Math.abs(velocityY);
  if (velocityX > this.SWIPE_MIN_VELOCITY && xDistance > this.SWIPE_MIN_DISTANCE) {
    if (e1.getX() > e2.getX()) {
      if (currentPage + 1 > totalPages) {
        showToast("String_Node_Str");
      }
 else {
        showUrl(++currentPage);
        return true;
      }
    }
 else {
      if (currentPage - 1 < 0) {
        showToast("String_Node_Str");
      }
 else {
        showUrl(--currentPage);
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onFling(MotionEvent e1,MotionEvent e2,float velocityX,float velocityY){
  final float xDistance=Math.abs(e1.getX() - e2.getX());
  final float yDistance=Math.abs(e1.getY() - e2.getY());
  if (xDistance > this.SWIPE_MAX_DISTANCE || yDistance > this.SWIPE_MAX_DISTANCE) {
    return false;
  }
  velocityX=Math.abs(velocityX);
  velocityY=Math.abs(velocityY);
  if (velocityX > this.SWIPE_MIN_VELOCITY && xDistance > this.SWIPE_MIN_DISTANCE) {
    if (e1.getX() > e2.getX()) {
      if (currentPage + 1 >= totalPages) {
        showToast("String_Node_Str");
      }
 else {
        showUrl(++currentPage);
        return true;
      }
    }
 else {
      if (currentPage - 1 < 0) {
        showToast("String_Node_Str");
      }
 else {
        showUrl(--currentPage);
        return true;
      }
    }
  }
  return false;
}
Program: 18058
Project: 18058
Buggy source:
private void onClientRequest(ClientRequest request,ClientProxy client) throws InterruptedException {
  RequestId reqId=request.getRequestId();
  Reply lastReply=lastReplies.get(reqId.getClientId());
  boolean newRequest=lastReply == null || reqId.getSeqNumber() > lastReply.getRequestId().getSeqNumber();
  if (newRequest) {
    logger.debug(processDescriptor.logMark_OldBenchmark,"String_Node_Str",request);
    if (USE_FLOW_CONTROL)     if (!pendingClientProxies.containsKey(reqId))     pendingRequestsSem.acquire();
    if (client != null)     pendingClientProxies.put(reqId,client);
 else     if (USE_FLOW_CONTROL)     pendingClientProxies.put(reqId,NULL_CLIENT_PROXY);
    if (paxos.isLeader()) {
      paxos.enqueueRequest(request);
    }
 else {
      cBatcher.enqueueRequest(request);
    }
  }
 else {
    if (client == null)     return;
    if (lastReply.getRequestId().equals(reqId)) {
      client.send(new ClientReply(Result.OK,lastReply.toByteArray()));
    }
 else {
      String errorMsg="String_Node_Str" + request.getRequestId() + "String_Node_Str"+ lastReply.getRequestId();
      logger.error(errorMsg);
      client.send(new ClientReply(Result.NACK,errorMsg.getBytes()));
    }
  }
}

Fixed version (ground truth):
private void onClientRequest(ClientRequest request,ClientProxy client) throws InterruptedException {
  RequestId reqId=request.getRequestId();
  Reply lastReply=lastReplies.get(reqId.getClientId());
  boolean newRequest=lastReply == null || reqId.getSeqNumber() > lastReply.getRequestId().getSeqNumber();
  if (newRequest) {
    logger.debug(processDescriptor.logMark_OldBenchmark,"String_Node_Str",request);
    if (USE_FLOW_CONTROL)     if (!pendingClientProxies.containsKey(reqId))     pendingRequestsSem.acquire();
    if (client != null)     pendingClientProxies.put(reqId,client);
 else     if (USE_FLOW_CONTROL)     pendingClientProxies.put(reqId,NULL_CLIENT_PROXY);
    if (!processDescriptor.indirectConsensus && paxos.isLeader()) {
      paxos.enqueueRequest(request);
    }
 else {
      cBatcher.enqueueRequest(request);
    }
  }
 else {
    if (client == null)     return;
    if (lastReply.getRequestId().equals(reqId)) {
      client.send(new ClientReply(Result.OK,lastReply.toByteArray()));
    }
 else {
      String errorMsg="String_Node_Str" + request.getRequestId() + "String_Node_Str"+ lastReply.getRequestId();
      logger.error(errorMsg);
      client.send(new ClientReply(Result.NACK,errorMsg.getBytes()));
    }
  }
}
Program: 18059
Project: 18059
Buggy source:
public EchoService(){
  super();
  random=new Random(System.currentTimeMillis() + this.hashCode());
}

Fixed version (ground truth):
public EchoService(){
  super();
  random=new Random(System.currentTimeMillis() + this.hashCode());
  Executors.newSingleThreadScheduledExecutor(new ThreadFactory(){
    public Thread newThread(    Runnable r){
      Thread thread=new Thread(r,"String_Node_Str");
      thread.setDaemon(true);
      return thread;
    }
  }
).scheduleAtFixedRate(new Runnable(){
    private int lastSeenSeqNo=0;
    public void run(){
      int lastSeqNoSnapshot=lastSeqNo;
      logger.info(ProcessDescriptor.processDescriptor.logMark_Benchmark,"String_Node_Str",(lastSeqNoSnapshot - lastSeenSeqNo) * (1000 / SAMPLING_MS));
      lastSeenSeqNo=lastSeqNoSnapshot;
    }
  }
,SAMPLING_MS,SAMPLING_MS,TimeUnit.MILLISECONDS);
}
Program: 18060
Project: 18060
Buggy source:
public byte[] execute(byte[] value,int seqNo){
  logger.info("String_Node_Str",seqNo);
  if (random.nextInt(10) == 0) {
    assert(last != null);
    fireSnapshotMade(seqNo + 1,new byte[]{1},value);
    logger.info("String_Node_Str");
  }
  last=value;
  if (seqNo % 10000 == 0) {
    long now=System.currentTimeMillis();
    System.err.println("String_Node_Str" + (10000.0 * 1000) / (now - lastTs));
    lastTs=now;
  }
  return value;
}

Fixed version (ground truth):
public byte[] execute(byte[] value,int seqNo){
  logger.info("String_Node_Str",seqNo);
  if (random.nextInt(10000) == 0) {
    assert(last != null);
    fireSnapshotMade(seqNo + 1,new byte[]{1},value);
    logger.info("String_Node_Str");
  }
  last=value;
  lastSeqNo=seqNo;
  return value;
}
Program: 18061
Project: 18061
Buggy source:
public Thread newThread(Runnable r){
  lastCreatedThread=new Thread(r,name);
  return lastCreatedThread;
}

Fixed version (ground truth):
public Thread newThread(Runnable r){
}