nus-yam/ex-repair huggingface dataset:
Program: 82481
Project: 82481
Buggy source:
private void updateOnlineControllers(List<String> controllers) throws KeeperException, InterruptedException {
  for (  String controller : controllers) {
    String blurVersion="String_Node_Str";
    byte[] b=this.zookeeper.getData("String_Node_Str",false,null);
    if (b != null && b.length > 0) {
      blurVersion=new String(b);
    }
    this.database.updateOnlineController(controller,zookeeperId,blurVersion);
  }
}

Fixed version (ground truth):
private void updateOnlineControllers(List<String> controllers) throws KeeperException, InterruptedException {
  for (  String controller : controllers) {
    String blurVersion="String_Node_Str";
    byte[] b=this.zookeeper.getData("String_Node_Str" + controller,false,null);
    if (b != null && b.length > 0) {
      blurVersion=new String(b);
    }
    this.database.updateOnlineController(controller,zookeeperId,blurVersion);
  }
}
Program: 82482
Project: 82482
Buggy source:
private void updateOnlineShards(List<String> shards) throws KeeperException, InterruptedException {
  for (  String shard : shards) {
    String blurVersion="String_Node_Str";
    byte[] b=this.zookeeper.getData("String_Node_Str" + clusterName + "String_Node_Str",false,null);
    if (b != null && b.length > 0) {
      blurVersion=new String(b);
    }
    this.database.updateOnlineShard(shard,this.clusterId,blurVersion);
  }
}

Fixed version (ground truth):
private void updateOnlineShards(List<String> shards) throws KeeperException, InterruptedException {
  for (  String shard : shards) {
    String blurVersion="String_Node_Str";
    byte[] b=this.zookeeper.getData("String_Node_Str" + clusterName + "String_Node_Str"+ shard,false,null);
    if (b != null && b.length > 0) {
      blurVersion=new String(b);
    }
    this.database.updateOnlineShard(shard,this.clusterId,blurVersion);
  }
}
Program: 82483
Project: 82483
Buggy source:
private void setupCleaners(JdbcTemplate jdbc,List<String> activeCollectors){
  new Thread(new AgentCleaners(activeCollectors,jdbc)).start();
}

Fixed version (ground truth):
private void setupCleaners(JdbcTemplate jdbc,List<String> activeCollectors){
  new Thread(new AgentCleaners(activeCollectors,new CleanerDatabaseConnection(jdbc)),"String_Node_Str").start();
}
Program: 82484
Project: 82484
Buggy source:
private void setupBlur(Properties props,JdbcTemplate jdbc,List<String> activeCollectors){
  Map<String,String> blurInstances=loadBlurInstances(props);
  for (  Map.Entry<String,String> blurEntry : blurInstances.entrySet()) {
    final String zookeeperName=blurEntry.getKey();
    final String connection=blurEntry.getValue();
    new Thread(new BlurCollector(zookeeperName,connection,activeCollectors,new BlurDatabaseConnection(jdbc),jdbc)).start();
  }
}

Fixed version (ground truth):
private void setupBlur(Properties props,JdbcTemplate jdbc,List<String> activeCollectors){
  Map<String,String> blurInstances=loadBlurInstances(props);
  for (  Map.Entry<String,String> blurEntry : blurInstances.entrySet()) {
    final String zookeeperName=blurEntry.getKey();
    final String connection=blurEntry.getValue();
    new Thread(new BlurCollector(zookeeperName,connection,activeCollectors,new BlurDatabaseConnection(jdbc),jdbc),"String_Node_Str" + zookeeperName).start();
  }
}
Program: 82485
Project: 82485
Buggy source:
private void setupHdfs(Properties props,final JdbcTemplate jdbc,List<String> activeCollectors){
  Map<String,Map<String,String>> hdfsInstances=loadHdfsInstances(props);
  for (  Map<String,String> instance : hdfsInstances.values()) {
    final String name=instance.get("String_Node_Str");
    final String thriftUri=instance.get("String_Node_Str");
    final String defaultUri=instance.get("String_Node_Str");
    final String user=props.getProperty("String_Node_Str" + name + "String_Node_Str");
    try {
      new Thread(new HdfsCollector(name,defaultUri,thriftUri,user,activeCollectors,new HdfsDatabaseConnection(jdbc))).start();
    }
 catch (    HdfsThreadException e) {
      log.error("String_Node_Str" + name + "String_Node_Str");
      continue;
    }
  }
}

Fixed version (ground truth):
private void setupHdfs(Properties props,final JdbcTemplate jdbc,List<String> activeCollectors){
  Map<String,Map<String,String>> hdfsInstances=loadHdfsInstances(props);
  for (  Map<String,String> instance : hdfsInstances.values()) {
    final String name=instance.get("String_Node_Str");
    final String thriftUri=instance.get("String_Node_Str");
    final String defaultUri=instance.get("String_Node_Str");
    final String user=props.getProperty("String_Node_Str" + name + "String_Node_Str");
    try {
      new Thread(new HdfsCollector(name,defaultUri,thriftUri,user,activeCollectors,new HdfsDatabaseConnection(jdbc)),"String_Node_Str" + name).start();
    }
 catch (    HdfsThreadException e) {
      log.error("String_Node_Str" + name + "String_Node_Str");
      continue;
    }
  }
}
Program: 82486
Project: 82486
Buggy source:
@Override public void run(){
  while (true) {
    String resolvedConnection=getResolvedConnection();
    Iface blurConnection=BlurClient.getClient(resolvedConnection);
    int zookeeperId=getZookeeperId();
    for (    Map<String,Object> cluster : this.database.getClusters(zookeeperId)) {
      String clusterName=(String)cluster.get("String_Node_Str");
      Integer clusterId=(Integer)cluster.get("String_Node_Str");
      List<String> tables;
      try {
        tables=blurConnection.tableListByCluster(clusterName);
      }
 catch (      Exception e) {
        log.error("String_Node_Str" + clusterName + "String_Node_Str",e);
        continue;
      }
      for (      final String tableName : tables) {
        int tableId=this.database.getTableId(clusterId,tableName);
        if (this.collectTables) {
          new Thread(new TableCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + this.zookeeperName).start();
        }
        if (this.collectQueries) {
          new Thread(new QueryCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + this.zookeeperName).start();
        }
      }
    }
    try {
      Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
    }
 catch (    InterruptedException e) {
      break;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  while (true) {
    String resolvedConnection=getResolvedConnection();
    Iface blurConnection=BlurClient.getClient(resolvedConnection);
    int zookeeperId=getZookeeperId();
    for (    Map<String,Object> cluster : this.database.getClusters(zookeeperId)) {
      String clusterName=(String)cluster.get("String_Node_Str");
      Integer clusterId=(Integer)cluster.get("String_Node_Str");
      List<String> tables;
      try {
        tables=blurConnection.tableListByCluster(clusterName);
      }
 catch (      Exception e) {
        log.error("String_Node_Str" + clusterName + "String_Node_Str",e);
        continue;
      }
      for (      final String tableName : tables) {
        int tableId=this.database.getTableId(clusterId,tableName);
        if (this.collectTables) {
          new Thread(new TableCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + tableName).start();
        }
        if (this.collectQueries) {
          new Thread(new QueryCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + tableName).start();
        }
      }
    }
    try {
      Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
    }
 catch (    InterruptedException e) {
      break;
    }
  }
}
Program: 82487
Project: 82487
Buggy source:
@Override public void run(){
  try {
    TableDescriptor descriptor;
    try {
      descriptor=blurConnection.describe(tableName);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + tableName + "String_Node_Str",e);
      return;
    }
    if (descriptor.isEnabled) {
      new Thread(new SchemaCollector(this.blurConnection,this.tableName,this.tableId,descriptor,this.database)).start();
    }
    new Thread(new ServerCollector(this.blurConnection,this.tableName,this.tableId,this.database)).start();
    new Thread(new StatsCollector(this.blurConnection,this.tableName,this.tableId,this.database)).start();
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    TableDescriptor descriptor;
    try {
      descriptor=blurConnection.describe(tableName);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + tableName + "String_Node_Str",e);
      return;
    }
    if (descriptor.isEnabled) {
      new Thread(new SchemaCollector(this.blurConnection,this.tableName,this.tableId,descriptor,this.database),"String_Node_Str" + this.tableName).start();
    }
    new Thread(new ServerCollector(this.blurConnection,this.tableName,this.tableId,this.database),"String_Node_Str" + this.tableName).start();
    new Thread(new StatsCollector(this.blurConnection,this.tableName,this.tableId,this.database),"String_Node_Str" + this.tableName).start();
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
}
Program: 82488
Project: 82488
Buggy source:
@Override public void run(){
  List<String> onlineClusters;
  try {
    onlineClusters=zookeeper.getChildren("String_Node_Str",false);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return;
  }
  for (  String cluster : onlineClusters) {
    try {
      boolean safeMode=isClusterInSafeMode(cluster);
      int clusterId=this.database.insertOrUpdateCluster(safeMode,cluster,zookeeperId);
      new Thread(new ShardCollector(clusterId,cluster,this.zookeeper,this.database)).start();
      new Thread(new TableCollector(clusterId,cluster,this.zookeeper,this.database)).start();
    }
 catch (    KeeperException e) {
      log.error("String_Node_Str",e);
    }
catch (    InterruptedException e) {
      log.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  List<String> onlineClusters;
  try {
    onlineClusters=zookeeper.getChildren("String_Node_Str",false);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return;
  }
  for (  String cluster : onlineClusters) {
    try {
      boolean safeMode=isClusterInSafeMode(cluster);
      int clusterId=this.database.insertOrUpdateCluster(safeMode,cluster,zookeeperId);
      new Thread(new ShardCollector(clusterId,cluster,this.zookeeper,this.database),"String_Node_Str" + cluster).start();
      new Thread(new TableCollector(clusterId,cluster,this.zookeeper,this.database),"String_Node_Str" + cluster).start();
    }
 catch (    KeeperException e) {
      log.error("String_Node_Str",e);
    }
catch (    InterruptedException e) {
      log.error("String_Node_Str",e);
    }
  }
}
Program: 82490
Project: 82490
Buggy source:
private void closeZookeeper(){
  try {
    this.zookeeper.close();
    log.warn("String_Node_Str" + this.name + "String_Node_Str");
  }
 catch (  InterruptedException e) {
    log.error("String_Node_Str" + this.name + "String_Node_Str");
  }
 finally {
    this.zookeeper=null;
    this.database.setZookeeperOffline(this.id);
  }
}

Fixed version (ground truth):
private void closeZookeeper(){
  try {
    if (this.zookeeper != null) {
      this.zookeeper.close();
      log.warn("String_Node_Str" + this.name + "String_Node_Str");
    }
 else {
      log.warn("String_Node_Str" + this.name + "String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    log.error("String_Node_Str" + this.name + "String_Node_Str");
  }
 finally {
    this.zookeeper=null;
    this.database.setZookeeperOffline(this.id);
  }
}
Program: 82491
Project: 82491
Buggy source:
@Override public void updateOnlineController(String controller,int zookeeperId,String blurVersion){
  int updatedCount=this.jdbc.update("String_Node_Str",controller,zookeeperId,blurVersion);
  if (updatedCount == 0) {
    this.jdbc.update("String_Node_Str",controller,zookeeperId,blurVersion);
  }
}

Fixed version (ground truth):
@Override public void updateOnlineController(String controller,int zookeeperId,String blurVersion){
  int updatedCount=this.jdbc.update("String_Node_Str",blurVersion,controller,zookeeperId);
  if (updatedCount == 0) {
    this.jdbc.update("String_Node_Str",controller,zookeeperId,blurVersion);
  }
}
Program: 82492
Project: 82492
Buggy source:
@Override public void run(){
  while (true) {
    String resolvedConnection=getResolvedConnection();
    Iface blurConnection=BlurClient.getClient(resolvedConnection);
    int zookeeperId=getZookeeperId();
    for (    Map<String,Object> cluster : this.database.getClusters(zookeeperId)) {
      String clusterName=(String)cluster.get("String_Node_Str");
      Integer clusterId=(Integer)cluster.get("String_Node_Str");
      List<String> tables;
      try {
        tables=blurConnection.tableListByCluster(clusterName);
      }
 catch (      Exception e) {
        log.error("String_Node_Str" + clusterName + "String_Node_Str",e);
        continue;
      }
      for (      final String tableName : tables) {
        int tableId=this.database.getTableId(clusterId,tableName);
        if (this.collectTables) {
          new Thread(new TableCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + tableName).start();
        }
        if (this.collectQueries) {
          new Thread(new QueryCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + tableName).start();
        }
      }
    }
    try {
      Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
    }
 catch (    InterruptedException e) {
      break;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  while (true) {
    String resolvedConnection=getResolvedConnection();
    Iface blurConnection=BlurClient.getClient(resolvedConnection);
    int zookeeperId=getZookeeperId();
    for (    Map<String,Object> cluster : this.database.getClusters(zookeeperId)) {
      String clusterName=(String)cluster.get("String_Node_Str");
      Integer clusterId=(Integer)cluster.get("String_Node_Str");
      List<String> tables;
      try {
        tables=blurConnection.tableListByCluster(clusterName);
      }
 catch (      Exception e) {
        log.error("String_Node_Str" + clusterName + "String_Node_Str",e);
        continue;
      }
      for (      final String tableName : tables) {
        int tableId=this.database.getTableId(clusterId,tableName);
        if (tableId == -1) {
          continue;
        }
        if (this.collectTables) {
          new Thread(new TableCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + tableName).start();
        }
        if (this.collectQueries) {
          new Thread(new QueryCollector(BlurClient.getClient(resolvedConnection),tableName,tableId,this.database),"String_Node_Str" + tableName).start();
        }
      }
    }
    try {
      Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
    }
 catch (    InterruptedException e) {
      break;
    }
  }
}
Program: 82493
Project: 82493
Buggy source:
@Override public void run(){
  List<Long> currentQueries;
  try {
    currentQueries=blurConnection.queryStatusIdList(tableName);
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + tableName + "String_Node_Str",e);
    return;
  }
  for (  Long queryUUID : currentQueries) {
    BlurQueryStatus status;
    try {
      status=blurConnection.queryStatusById(tableName,queryUUID);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + tableName + "String_Node_Str",e);
      continue;
    }
    Map<String,Object> oldQuery=this.database.getQuery(queryUUID);
    String times;
    try {
      times=new ObjectMapper().writeValueAsString(status.getCpuTimes());
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      times=null;
    }
    if (oldQuery == null) {
      SimpleQuery query=status.getQuery().getSimpleQuery();
      long startTimeLong=status.getQuery().getStartTime();
      Date startTime=(startTimeLong > 0) ? TimeHelper.getAdjustedTime(startTimeLong).getTime() : TimeHelper.now().getTime();
      this.database.createQuery(status,query,times,startTime.getTime(),this.tableId);
    }
 else     if (queryHasChanged(status,times,oldQuery)) {
      this.database.updateQuery(status,times,(Integer)oldQuery.get("String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  List<Long> currentQueries;
  try {
    currentQueries=blurConnection.queryStatusIdList(tableName);
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + tableName + "String_Node_Str",e);
    return;
  }
  for (  Long queryUUID : currentQueries) {
    BlurQueryStatus status;
    try {
      status=blurConnection.queryStatusById(tableName,queryUUID);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + tableName + "String_Node_Str",e);
      continue;
    }
    Map<String,Object> oldQuery=this.database.getQuery(this.tableId,queryUUID);
    String times;
    try {
      times=new ObjectMapper().writeValueAsString(status.getCpuTimes());
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      times=null;
    }
    if (oldQuery == null) {
      SimpleQuery query=status.getQuery().getSimpleQuery();
      long startTimeLong=status.getQuery().getStartTime();
      Date startTime=(startTimeLong > 0) ? TimeHelper.getAdjustedTime(startTimeLong).getTime() : TimeHelper.now().getTime();
      this.database.createQuery(status,query,times,startTime,this.tableId);
    }
 else     if (queryHasChanged(status,times,oldQuery)) {
      this.database.updateQuery(status,times,(Integer)oldQuery.get("String_Node_Str"));
    }
  }
}
Program: 82495
Project: 82495
Buggy source:
public void createQuery(BlurQueryStatus status,SimpleQuery query,String times,long startTime,int tableId){
  this.jdbc.update("String_Node_Str",query.getQueryStr(),times,status.getCompleteShards(),status.getTotalShards(),status.getState().getValue(),status.getUuid(),startTime,TimeHelper.now().getTime(),tableId,query.isSuperQueryOn(),StringUtils.join(status.getQuery().getFacets(),"String_Node_Str"),status.getQuery().getStart(),status.getQuery().getFetch(),query.getPreSuperFilter(),query.getPostSuperFilter(),status.getQuery().getSelector() == null ? null : JSONValue.toJSONString(status.getQuery().getSelector().getColumnFamiliesToFetch()),status.getQuery().getSelector() == null ? null : JSONValue.toJSONString(status.getQuery().getSelector().getColumnsToFetch()),status.getQuery().getUserContext(),status.getQuery().getSelector() == null ? null : status.getQuery().getSelector().isRecordOnly());
}

Fixed version (ground truth):
public void createQuery(BlurQueryStatus status,SimpleQuery query,String times,Date startTime,int tableId){
  this.jdbc.update("String_Node_Str",query.getQueryStr(),times,status.getCompleteShards(),status.getTotalShards(),status.getState().getValue(),status.getUuid(),startTime,TimeHelper.now().getTime(),tableId,query.isSuperQueryOn(),StringUtils.join(status.getQuery().getFacets(),"String_Node_Str"),status.getQuery().getStart(),status.getQuery().getFetch(),query.getPreSuperFilter(),query.getPostSuperFilter(),status.getQuery().getSelector() == null ? null : JSONValue.toJSONString(status.getQuery().getSelector().getColumnFamiliesToFetch()),status.getQuery().getSelector() == null ? null : JSONValue.toJSONString(status.getQuery().getSelector().getColumnsToFetch()),status.getQuery().getUserContext(),status.getQuery().getSelector() == null ? null : status.getQuery().getSelector().isRecordOnly());
}
Program: 82496
Project: 82496
Buggy source:
@Override public int getTableId(int clusterId,String tableName){
  return jdbc.queryForInt("String_Node_Str",clusterId,tableName);
}

Fixed version (ground truth):
@Override public int getTableId(int clusterId,String tableName){
  try {
    return jdbc.queryForInt("String_Node_Str",clusterId,tableName);
  }
 catch (  IncorrectResultSizeDataAccessException e) {
    return -1;
  }
}
Program: 82497
Project: 82497
Buggy source:
public Map<String,Object> getQuery(long UUID){
  return this.jdbc.queryForMap("String_Node_Str",UUID);
}

Fixed version (ground truth):
public Map<String,Object> getQuery(int tableId,long UUID){
  try {
    return this.jdbc.queryForMap("String_Node_Str",tableId,UUID);
  }
 catch (  IncorrectResultSizeDataAccessException e) {
    return null;
  }
}
Program: 82498
Project: 82498
Buggy source:
void createQuery(BlurQueryStatus status,SimpleQuery query,String times,long startTime,int tableId);

Fixed version (ground truth):
void createQuery(BlurQueryStatus status,SimpleQuery query,String times,Date startTime,int tableId);
Program: 82499
Project: 82499
Buggy source:
Map<String,Object> getQuery(long UUID);

Fixed version (ground truth):
Map<String,Object> getQuery(int tableId,long UUID);
Program: 82500
Project: 82500
Buggy source:
@Override public int getHdfsId(String name) throws NullReturnedException {
  int id=jdbc.queryForInt("String_Node_Str",name);
  if (id == 0) {
    throw new NullReturnedException();
  }
  return id;
}

Fixed version (ground truth):
@Override public int getHdfsId(String name) throws NullReturnedException {
  try {
    return jdbc.queryForInt("String_Node_Str",name);
  }
 catch (  IncorrectResultSizeDataAccessException e) {
    return -1;
  }
}
Program: 82502
Project: 82502
Buggy source:
private void setupZookeeper(Properties props,JdbcTemplate jdbc){
  if (props.containsKey("String_Node_Str")) {
    List<String> zooKeeperInstances=new ArrayList<String>(Arrays.asList(props.getProperty("String_Node_Str").split("String_Node_Str")));
    for (    String zkInstance : zooKeeperInstances) {
      String zkUrl=props.getProperty("String_Node_Str" + zkInstance + "String_Node_Str");
      new Thread(new ZookeeperCollector(zkInstance,zkUrl,new ZookeeperDatabaseConnection(jdbc)),"String_Node_Str" + zkInstance).start();
    }
  }
}

Fixed version (ground truth):
private void setupZookeeper(Properties props,JdbcTemplate jdbc){
  if (props.containsKey("String_Node_Str")) {
    List<String> zooKeeperInstances=new ArrayList<String>(Arrays.asList(props.getProperty("String_Node_Str").split("String_Node_Str")));
    for (    String zkInstance : zooKeeperInstances) {
      String zkUrl=props.getProperty("String_Node_Str" + zkInstance + "String_Node_Str");
      String blurConnection=props.getProperty("String_Node_Str" + zkInstance + "String_Node_Str");
      new Thread(new ZookeeperCollector(zkUrl,zkInstance,blurConnection,new ZookeeperDatabaseConnection(jdbc)),"String_Node_Str" + zkInstance).start();
    }
  }
}
Program: 82503
Project: 82503
Buggy source:
public ZookeeperCollector(String url,String name,ZookeeperDatabaseInterface database){
  this.url=url;
  this.name=name;
  this.database=database;
  this.id=database.getZookeeperId(name);
}

Fixed version (ground truth):
public ZookeeperCollector(String url,String name,String blurConnection,ZookeeperDatabaseInterface database){
  this.url=url;
  this.name=name;
  this.database=database;
  this.id=database.insertOrUpdateZookeeper(name,url,blurConnection);
}
Program: 82504
Project: 82504
Buggy source:
private void closeZookeeper(){
  try {
    this.zookeeper.close();
    log.warn("String_Node_Str" + this.name + "String_Node_Str");
  }
 catch (  InterruptedException e) {
    log.error("String_Node_Str" + this.name + "String_Node_Str");
  }
 finally {
    this.zookeeper=null;
    this.database.setZookeeperOffline(id);
  }
}

Fixed version (ground truth):
private void closeZookeeper(){
  try {
    this.zookeeper.close();
    log.warn("String_Node_Str" + this.name + "String_Node_Str");
  }
 catch (  InterruptedException e) {
    log.error("String_Node_Str" + this.name + "String_Node_Str");
  }
 finally {
    this.zookeeper=null;
    this.database.setZookeeperOffline(this.id);
  }
}
Program: 82506
Project: 82506
Buggy source:
@Override public void run(){
  List<Long> currentQueries;
  try {
    currentQueries=blurConnection.queryStatusIdList(tableName);
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + tableName + "String_Node_Str",e);
    return;
  }
  for (  Long queryUUID : currentQueries) {
    BlurQueryStatus status;
    try {
      status=blurConnection.queryStatusById(tableName,queryUUID);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + tableName + "String_Node_Str",e);
      continue;
    }
    Map<String,Object> oldQuery=this.database.getQuery(this.tableId,queryUUID);
    String times;
    try {
      times=new ObjectMapper().writeValueAsString(status.getCpuTimes());
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      times=null;
    }
    if (oldQuery == null) {
      SimpleQuery query=status.getQuery().getSimpleQuery();
      long startTimeLong=status.getQuery().getStartTime();
      Date startTime=(startTimeLong > 0) ? TimeHelper.getAdjustedTime(startTimeLong).getTime() : TimeHelper.now().getTime();
      this.database.createQuery(status,query,times,startTime,this.tableId);
    }
 else     if (queryHasChanged(status,times,oldQuery)) {
      this.database.updateQuery(status,times,(Integer)oldQuery.get("String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  Set<Long> currentQueries=new HashSet<Long>();
  try {
    currentQueries.addAll(blurConnection.queryStatusIdList(tableName));
    currentQueries.addAll(this.database.getRunningQueries());
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + tableName + "String_Node_Str",e);
    return;
  }
  for (  Long queryUUID : currentQueries) {
    BlurQueryStatus status;
    try {
      status=blurConnection.queryStatusById(tableName,queryUUID);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + tableName + "String_Node_Str",e);
      continue;
    }
    Map<String,Object> oldQuery=this.database.getQuery(this.tableId,queryUUID);
    String times;
    try {
      times=new ObjectMapper().writeValueAsString(status.getCpuTimes());
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      times=null;
    }
    if (oldQuery == null) {
      SimpleQuery query=status.getQuery().getSimpleQuery();
      long startTimeLong=status.getQuery().getStartTime();
      Date startTime=(startTimeLong > 0) ? TimeHelper.getAdjustedTime(startTimeLong).getTime() : TimeHelper.now().getTime();
      this.database.createQuery(status,query,times,startTime,this.tableId);
    }
 else     if (queryHasChanged(status,times,oldQuery)) {
      this.database.updateQuery(status,times,(Integer)oldQuery.get("String_Node_Str"));
    }
  }
}
Program: 82507
Project: 82507
Buggy source:
@Test public void testFacetQueryNoSuper() throws IOException {
  BooleanQuery bq=new BooleanQuery();
  bq.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.SHOULD);
  bq.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.SHOULD);
  Query f1=new TermQuery(new Term("String_Node_Str","String_Node_Str"));
  BooleanQuery f2=new BooleanQuery();
  f2.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.MUST);
  f2.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.MUST);
  Query[] facets=new Query[]{f1,f2};
  AtomicLongArray counts=new AtomicLongArray(facets.length);
  FacetQuery facetQuery=new FacetQuery(bq,facets,counts);
  IndexSearcher indexSearcher=new IndexSearcher(reader);
  TopDocs topDocs=indexSearcher.search(facetQuery,10);
  for (int i=0; i < counts.length(); i++) {
    System.out.println(counts.get(i));
  }
}

Fixed version (ground truth):
@Test public void testFacetQueryNoSuper() throws IOException {
  BooleanQuery bq=new BooleanQuery();
  bq.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.SHOULD);
  bq.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.SHOULD);
  Query f1=new TermQuery(new Term("String_Node_Str","String_Node_Str"));
  BooleanQuery f2=new BooleanQuery();
  f2.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.MUST);
  f2.add(new TermQuery(new Term("String_Node_Str","String_Node_Str")),Occur.MUST);
  Query[] facets=new Query[]{f1,f2};
  AtomicLongArray counts=new AtomicLongArray(facets.length);
  FacetQuery facetQuery=new FacetQuery(bq,facets,counts);
  IndexSearcher indexSearcher=new IndexSearcher(reader);
  indexSearcher.search(facetQuery,10);
  for (int i=0; i < counts.length(); i++) {
    System.out.println(counts.get(i));
  }
}
Program: 82508
Project: 82508
Buggy source:
public TableCollector(Iface connection,String zookeeperName,TableDatabaseInterface database){
  this.connection=connection;
  this.zookeeper=zookeeperName;
  this.database=database;
}

Fixed version (ground truth):
public TableCollector(Iface connection,String zookeeperName,BlurDatabaseInterface blurDatabase,TableDatabaseInterface database){
  this.blurConnection=connection;
  this.zookeeper=zookeeperName;
  this.blurDatabase=blurDatabase;
  this.database=database;
}
Program: 82510
Project: 82510
Buggy source:
@Override public int docID(){
  return primeDoc;
}

Fixed version (ground truth):
@Override public int docID(){
  return print(DOC_ID,primeDoc);
}
Program: 82511
Project: 82511
Buggy source:
@Override public int advance(int target) throws IOException {
  if (target == NO_MORE_DOCS) {
    return scorer.advance(NO_MORE_DOCS);
  }
  int doc=scorer.docID();
  int odoc=doc;
  if (isScorerExhausted(doc)) {
    return primeDoc=doc;
  }
  if (target > doc || doc == -1) {
    doc=scorer.advance(target);
    if (isScorerExhausted(doc)) {
      return primeDoc=doc;
    }
  }
 else   if (isScorerExhausted(doc)) {
    return primeDoc == -1 ? primeDoc=doc : primeDoc;
  }
  int gatherAllHitsSuperDoc=gatherAllHitsSuperDoc(doc);
  return gatherAllHitsSuperDoc;
}

Fixed version (ground truth):
@Override public int advance(int target) throws IOException {
  if (target == NO_MORE_DOCS) {
    return print(ADVANCE,primeDoc=scorer.advance(NO_MORE_DOCS));
  }
  int doc=scorer.docID();
  int odoc=doc;
  if (isScorerExhausted(doc)) {
    return print(ADVANCE,primeDoc=doc);
  }
  if (target > doc || doc == -1) {
    doc=scorer.advance(target);
    if (isScorerExhausted(doc)) {
      return print(ADVANCE,primeDoc=doc);
    }
  }
 else   if (isScorerExhausted(doc)) {
    return print(ADVANCE,primeDoc == -1 ? primeDoc=doc : primeDoc);
  }
  return print(ADVANCE,gatherAllHitsSuperDoc(doc));
}
Program: 82512
Project: 82512
Buggy source:
@Override public int nextDoc() throws IOException {
  int doc=scorer.docID();
  int odoc=doc;
  if (isScorerExhausted(doc)) {
    return primeDoc=doc;
  }
  if (doc == -1) {
    doc=scorer.nextDoc();
    if (isScorerExhausted(doc)) {
      return primeDoc=doc;
    }
  }
 else   if (isScorerExhausted(doc)) {
    return primeDoc == -1 ? primeDoc=doc : primeDoc;
  }
  int gatherAllHitsSuperDoc=gatherAllHitsSuperDoc(doc);
  return gatherAllHitsSuperDoc;
}

Fixed version (ground truth):
@Override public int nextDoc() throws IOException {
  int doc=scorer.docID();
  int odoc=doc;
  if (isScorerExhausted(doc)) {
    return primeDoc=doc;
  }
  if (doc == -1) {
    doc=scorer.nextDoc();
    if (isScorerExhausted(doc)) {
      return print(NEXT_DOC,primeDoc=doc);
    }
  }
 else   if (isScorerExhausted(doc)) {
    return print(NEXT_DOC,primeDoc == -1 ? primeDoc=doc : primeDoc);
  }
  return print(NEXT_DOC,gatherAllHitsSuperDoc(doc));
}
Program: 82515
Project: 82515
Buggy source:
public void init() throws IOException {
  initIndexWriterConfig();
  initIndexReader(IndexReader.open(getDirectory(),true));
}

Fixed version (ground truth):
public void init() throws IOException {
  initIndexWriterConfig();
  DirectIODirectory directory=getDirectory();
  if (!IndexReader.indexExists(directory)) {
    IndexWriterConfig conf=new IndexWriterConfig(Version.LUCENE_35,new KeywordAnalyzer());
    new IndexWriter(directory,conf).close();
  }
  initIndexReader(IndexReader.open(directory,true));
}
Program: 82516
Project: 82516
Buggy source:
private void waitForTheTableToEnable(String cluster,String table) throws BlurException {
  LOG.info("String_Node_Str" + table + "String_Node_Str");
}

Fixed version (ground truth):
private void waitForTheTableToEnable(String cluster,String table) throws BlurException {
  LOG.info("String_Node_Str" + table + "String_Node_Str");
  while (true) {
    if (_clusterStatus.isEnabled(false,cluster,table)) {
      return;
    }
    try {
      Thread.sleep(3000);
    }
 catch (    InterruptedException e) {
      LOG.error("String_Node_Str" + table + "String_Node_Str",e);
      throw new BException("String_Node_Str" + table + "String_Node_Str",e);
    }
  }
}
Program: 82517
Project: 82517
Buggy source:
private void waitForTheTableToDisengage(String cluster,String table) throws BlurException, TException {
  LOG.info("String_Node_Str" + table + "String_Node_Str");
}

Fixed version (ground truth):
private void waitForTheTableToDisengage(String cluster,String table) throws BlurException, TException {
}
Program: 82518
Project: 82518
Buggy source:
@Override public boolean isEnabled(boolean useCache,String cluster,String table){
  if (useCache) {
    Boolean enabled=_enabledMap.get(getClusterTableKey(cluster,table));
    if (enabled == null) {
      throw new RuntimeException("String_Node_Str" + table + "String_Node_Str");
    }
 else {
      return enabled;
    }
  }
  LOG.debug("String_Node_Str");
  String tablePathIsEnabled=ZookeeperPathConstants.getTableEnabledPath(cluster,table);
  try {
    if (_zk.exists(tablePathIsEnabled,false) == null) {
      return false;
    }
  }
 catch (  KeeperException e) {
    throw new RuntimeException(e);
  }
catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isEnabled(boolean useCache,String cluster,String table){
  if (useCache) {
    Boolean enabled=_enabledMap.get(getClusterTableKey(cluster,table));
    if (enabled == null) {
      return false;
    }
 else {
      return enabled;
    }
  }
  LOG.debug("String_Node_Str");
  String tablePathIsEnabled=ZookeeperPathConstants.getTableEnabledPath(cluster,table);
  try {
    if (_zk.exists(tablePathIsEnabled,false) == null) {
      return false;
    }
  }
 catch (  KeeperException e) {
    throw new RuntimeException(e);
  }
catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
  return true;
}
Program: 82519
Project: 82519
Buggy source:
private void waitForTheTableToEnable(String cluster,String table) throws BlurException {
  LOG.info("String_Node_Str" + table + "String_Node_Str");
  while (true) {
    if (_clusterStatus.isEnabled(true,cluster,table)) {
      return;
    }
    try {
      Thread.sleep(3000);
    }
 catch (    InterruptedException e) {
      LOG.error("String_Node_Str" + table + "String_Node_Str",e);
      throw new BException("String_Node_Str" + table + "String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private void waitForTheTableToEnable(String cluster,String table) throws BlurException {
  LOG.info("String_Node_Str" + table + "String_Node_Str");
  while (true) {
    if (_clusterStatus.isEnabled(false,cluster,table)) {
      return;
    }
    try {
      Thread.sleep(3000);
    }
 catch (    InterruptedException e) {
      LOG.error("String_Node_Str" + table + "String_Node_Str",e);
      throw new BException("String_Node_Str" + table + "String_Node_Str",e);
    }
  }
}
Program: 82520
Project: 82520
Buggy source:
public static void disableTable(ZooKeeper zookeeper,String cluster,String table) throws IOException, InterruptedException, KeeperException {
  if (zookeeper.exists(ZookeeperPathConstants.getTablePath(cluster,table),false) == null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  String blurTableEnabledPath=ZookeeperPathConstants.getTableEnabledPath(cluster,table);
  if (zookeeper.exists(blurTableEnabledPath,false) == null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  zookeeper.delete(blurTableEnabledPath,-1);
  waitForWriteLocksToClear(zookeeper,cluster,table);
}

Fixed version (ground truth):
public static void disableTable(ZooKeeper zookeeper,String cluster,String table) throws IOException, InterruptedException, KeeperException {
  if (zookeeper.exists(ZookeeperPathConstants.getTablePath(cluster,table),false) == null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  String blurTableEnabledPath=ZookeeperPathConstants.getTableEnabledPath(cluster,table);
  if (zookeeper.exists(blurTableEnabledPath,false) == null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  zookeeper.delete(blurTableEnabledPath,-1);
}
Program: 82521
Project: 82521
Buggy source:
public static void enableTable(ZooKeeper zookeeper,String cluster,String table) throws IOException, KeeperException, InterruptedException {
  if (zookeeper.exists(ZookeeperPathConstants.getTablePath(cluster,table),false) == null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  String blurTableEnabledPath=ZookeeperPathConstants.getTableEnabledPath(cluster,table);
  if (zookeeper.exists(blurTableEnabledPath,false) != null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  zookeeper.create(blurTableEnabledPath,null,Ids.OPEN_ACL_UNSAFE,CreateMode.PERSISTENT);
  int shardCount=getShardCount(zookeeper,cluster,table);
  waitForWriteLocksToEngage(zookeeper,cluster,table,shardCount);
}

Fixed version (ground truth):
public static void enableTable(ZooKeeper zookeeper,String cluster,String table) throws IOException, KeeperException, InterruptedException {
  if (zookeeper.exists(ZookeeperPathConstants.getTablePath(cluster,table),false) == null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  String blurTableEnabledPath=ZookeeperPathConstants.getTableEnabledPath(cluster,table);
  if (zookeeper.exists(blurTableEnabledPath,false) != null) {
    throw new IOException("String_Node_Str" + table + "String_Node_Str");
  }
  zookeeper.create(blurTableEnabledPath,null,Ids.OPEN_ACL_UNSAFE,CreateMode.PERSISTENT);
}
Program: 82522
Project: 82522
Buggy source:
@Override public final void enableTable(String table) throws BlurException, TException {
  try {
    String cluster=_clusterStatus.getCluster(false,table);
    if (cluster == null) {
      throw new BlurException("String_Node_Str" + table + "String_Node_Str",null);
    }
    EnableTable.enableTable(_zookeeper,cluster,table);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e,table);
    throw new BException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public final void enableTable(String table) throws BlurException, TException {
  try {
    String cluster=_clusterStatus.getCluster(false,table);
    if (cluster == null) {
      throw new BlurException("String_Node_Str" + table + "String_Node_Str",null);
    }
    EnableTable.enableTable(_zookeeper,cluster,table);
    waitForTheTableToEnable(cluster,table);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e,table);
    throw new BException(e.getMessage(),e);
  }
}
Program: 82524
Project: 82524
Buggy source:
public void deleteDocuments(boolean wal,Term term) throws CorruptIndexException, IOException {
  _dirty.incrementAndGet();
  deleteDocuments(wal,term);
}

Fixed version (ground truth):
public void deleteDocuments(boolean wal,Term... terms) throws CorruptIndexException, IOException {
  _dirty.incrementAndGet();
  if (wal) {
    Future<Boolean> valid=walWriterDelete(terms);
    super.deleteDocuments(terms);
    try {
      if (!valid.get()) {
        throw new IOException("String_Node_Str");
      }
    }
 catch (    InterruptedException e) {
      throw new IOException(e);
    }
catch (    ExecutionException e) {
      throw new IOException(e);
    }
  }
 else {
    super.deleteDocuments(terms);
  }
}
Program: 82525
Project: 82525
Buggy source:
@Override public void action(WalIndexWriter indexWriter) throws CorruptIndexException, IOException {
  Collection<Document> docs=getDocs();
  indexWriter.updateDocuments(false,new Term("String_Node_Str","String_Node_Str"),docs);
}

Fixed version (ground truth):
@Override public void action(WalIndexWriter indexWriter) throws CorruptIndexException, IOException {
  indexWriter.deleteDocuments(true,new Term("String_Node_Str","String_Node_Str"));
}
Program: 82526
Project: 82526
Buggy source:
public SuperParser(Version matchVersion,Analyzer a,boolean superSearch,Filter queryFilter,ScoreType scoreType){
  super(matchVersion,SUPER,a);
  this.setAllowLeadingWildcard(true);
  this.superSearch=superSearch;
  this.queryFilter=queryFilter;
  this.scoreType=scoreType;
}

Fixed version (ground truth):
public SuperParser(Version matchVersion,Analyzer a,boolean superSearch,Filter queryFilter,ScoreType scoreType){
  super(matchVersion,SUPER,a);
  this.setAutoGeneratePhraseQueries(true);
  this.setAllowLeadingWildcard(true);
  this.superSearch=superSearch;
  this.queryFilter=queryFilter;
  this.scoreType=scoreType;
}
Program: 82528
Project: 82528
Buggy source:
@Override public String getCluster(boolean useCache,String table){
  if (useCache) {
    Map<String,List<String>> map=_tableToClusterCache.get();
    List<String> clusters=map.get(table);
    if (clusters == null || clusters.size() == 0) {
      return null;
    }
 else     if (clusters.size() == 1) {
      return clusters.get(0);
    }
 else {
      throw new RuntimeException("String_Node_Str" + table + "String_Node_Str"+ clusters+ "String_Node_Str");
    }
  }
  List<String> clusterList=getClusterList();
  for (  String cluster : clusterList) {
    try {
      Stat stat=_zk.exists(ZookeeperPathConstants.getTablePath(cluster,table),false);
      if (stat != null) {
        return cluster;
      }
    }
 catch (    KeeperException e) {
      throw new RuntimeException(e);
    }
catch (    InterruptedException e) {
      throw new RuntimeException(e);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public String getCluster(boolean useCache,String table){
  if (useCache) {
    Map<String,List<String>> map=_tableToClusterCache.get();
    List<String> clusters=map.get(table);
    if (clusters == null || clusters.size() == 0) {
      throw new RuntimeException("String_Node_Str" + table + "String_Node_Str");
    }
 else     if (clusters.size() == 1) {
      return clusters.get(0);
    }
 else {
      throw new RuntimeException("String_Node_Str" + table + "String_Node_Str"+ clusters+ "String_Node_Str");
    }
  }
  List<String> clusterList=getClusterList();
  for (  String cluster : clusterList) {
    try {
      Stat stat=_zk.exists(ZookeeperPathConstants.getTablePath(cluster,table),false);
      if (stat != null) {
        return cluster;
      }
    }
 catch (    KeeperException e) {
      throw new RuntimeException(e);
    }
catch (    InterruptedException e) {
      throw new RuntimeException(e);
    }
  }
  throw new RuntimeException("String_Node_Str" + table + "String_Node_Str");
}
Program: 82529
Project: 82529
Buggy source:
@Override public void run(){
  clearMapOfOldTables(_tableAnalyzers);
  clearMapOfOldTables(_tableDescriptors);
  clearMapOfOldTables(_layoutManagers);
  clearMapOfOldTables(_layoutCache);
  clearMapOfOldTables(_tableSimilarity);
  Map<String,Map<String,BlurIndex>> oldIndexesThatNeedToBeClosed=clearMapOfOldTables(_indexes);
  for (  String table : oldIndexesThatNeedToBeClosed.keySet()) {
    Map<String,BlurIndex> indexes=oldIndexesThatNeedToBeClosed.get(table);
    if (indexes == null) {
      continue;
    }
    for (    String shard : indexes.keySet()) {
      BlurIndex index=indexes.get(shard);
      if (index == null) {
        continue;
      }
      close(index,table,shard);
    }
  }
  for (  String table : _indexes.keySet()) {
    Map<String,BlurIndex> shardMap=_indexes.get(table);
    if (shardMap != null) {
      Set<String> shards=new HashSet<String>(shardMap.keySet());
      Set<String> shardsToServe=getShardsToServe(table);
      shards.removeAll(shardsToServe);
      if (!shards.isEmpty()) {
        LOG.info("String_Node_Str",table,shards);
      }
      for (      String shard : shards) {
        LOG.info("String_Node_Str",table,shard);
        BlurIndex index=shardMap.remove(shard);
        close(index,table,shard);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    cleanup();
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 82530
Project: 82530
Buggy source:
private void removeAnyTableLocks(){
  List<String> tableList=_clusterStatus.getTableList();
  for (  String table : tableList) {
    _clusterStatus.clearLocks(cluster,table);
  }
}

Fixed version (ground truth):
private void removeAnyTableLocks(){
  List<String> tableList=_clusterStatus.getTableList(cluster);
  for (  String table : tableList) {
    _clusterStatus.clearLocks(cluster,table);
  }
}
Program: 82533
Project: 82533
Buggy source:
public void init(){
  _timer=new Timer("String_Node_Str",true);
  _timer.schedule(new TimerTask(){
    @Override public void run(){
      sampleAll();
    }
  }
,_delay,_period);
}

Fixed version (ground truth):
public void init(){
  _timer=new Timer("String_Node_Str",true);
  _timer.schedule(new TimerTask(){
    @Override public void run(){
      try {
        sampleAll();
      }
 catch (      Throwable e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
,_delay,_period);
}
Program: 82534
Project: 82534
Buggy source:
@Override public void run(){
  sampleAll();
}

Fixed version (ground truth):
@Override public void run(){
  try {
    sampleAll();
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 82535
Project: 82535
Buggy source:
public void init(){
  statusCleanupTimer=new Timer("String_Node_Str",true);
  statusCleanupTimer.schedule(new TimerTask(){
    @Override public void run(){
      try {
        cleanupFinishedQueryStatuses();
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
,statusCleanupTimerDelay,statusCleanupTimerDelay);
}

Fixed version (ground truth):
public void init(){
  statusCleanupTimer=new Timer("String_Node_Str",true);
  statusCleanupTimer.schedule(new TimerTask(){
    @Override public void run(){
      try {
        cleanupFinishedQueryStatuses();
      }
 catch (      Throwable e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
,statusCleanupTimerDelay,statusCleanupTimerDelay);
}
Program: 82536
Project: 82536
Buggy source:
@Override public void run(){
  try {
    cleanupFinishedQueryStatuses();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    cleanupFinishedQueryStatuses();
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 82537
Project: 82537
Buggy source:
@Override public void run(){
  for (  BlurIndex index : _indexes) {
    try {
      index.refresh();
    }
 catch (    IOException e) {
      LOG.error("String_Node_Str",e,index);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    refreshInternal();
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
}