Program: 82341
Project: 82341
Buggy source:
@Override public void run(){
  Path path=_shardContext.getHdfsDirPath();
  Configuration configuration=_shardContext.getTableContext().getConfiguration();
  try {
    FileSystem fileSystem=path.getFileSystem(configuration);
    SortedSet<FileStatus> listStatus;
    while (true) {
      try {
        listStatus=sort(fileSystem.listStatus(path,new PathFilter(){
          @Override public boolean accept(          Path path){
            if (path != null && path.getName().endsWith("String_Node_Str")) {
              return true;
            }
            return false;
          }
        }
));
        break;
      }
 catch (      FileNotFoundException e) {
        LOG.warn("String_Node_Str");
      }
      try {
        Thread.sleep(100);
      }
 catch (      InterruptedException e) {
        return;
      }
    }
    List<HdfsDirectory> indexesToImport=new ArrayList<HdfsDirectory>();
    for (    FileStatus fileStatus : listStatus) {
      Path file=fileStatus.getPath();
      if (fileStatus.isDir() && file.getName().endsWith("String_Node_Str")) {
        HdfsDirectory hdfsDirectory=new HdfsDirectory(configuration,file);
        if (!DirectoryReader.indexExists(hdfsDirectory)) {
          LOG.error("String_Node_Str",file);
        }
 else {
          indexesToImport.add(hdfsDirectory);
        }
      }
    }
    if (indexesToImport.isEmpty()) {
      return;
    }
    String table=_shardContext.getTableContext().getTable();
    String shard=_shardContext.getShard();
    for (    Directory directory : indexesToImport) {
      LOG.info("String_Node_Str",directory,shard,table);
    }
    LOG.info("String_Node_Str",shard,table);
    _lock.writeLock().lock();
    try {
      for (      HdfsDirectory directory : indexesToImport) {
        LOG.info("String_Node_Str",directory,shard,table);
        _indexWriter.commit();
        boolean isSuccess=true;
        boolean isRollbackDueToException=false;
        boolean emitDeletes=_indexWriter.numDocs() != 0;
        try {
          isSuccess=applyDeletes(directory,_indexWriter,shard,emitDeletes);
        }
 catch (        IOException e) {
          LOG.error("String_Node_Str",e,shard,table);
          isSuccess=false;
          isRollbackDueToException=true;
        }
        Path dirPath=directory.getPath();
        if (isSuccess) {
          LOG.info("String_Node_Str",directory,shard,table);
          _indexWriter.addIndexes(directory);
          LOG.info("String_Node_Str",directory,shard,table);
          _indexWriter.deleteDocuments(new Term(BlurConstants.DELETE_MARKER,BlurConstants.DELETE_MARKER_VALUE));
          LOG.info("String_Node_Str",directory,shard,table);
          _indexWriter.commit();
          _indexWriter.maybeMerge();
          LOG.info("String_Node_Str",dirPath,shard,table);
          fileSystem.delete(dirPath,true);
          LOG.info("String_Node_Str",shard,table);
        }
 else {
          if (!isRollbackDueToException) {
            LOG.error("String_Node_Str",shard,table,directory);
          }
          LOG.info("String_Node_Str",shard,table);
          _indexWriter.rollback();
          LOG.info("String_Node_Str",shard,table);
          String name=dirPath.getName();
          int lastIndexOf=name.lastIndexOf('.');
          String badRowIdsName=name.substring(0,lastIndexOf) + "String_Node_Str";
          fileSystem.rename(dirPath,new Path(dirPath.getParent(),badRowIdsName));
        }
      }
    }
  finally {
      _lock.writeLock().unlock();
    }
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  Path path=_shardContext.getHdfsDirPath();
  Configuration configuration=_shardContext.getTableContext().getConfiguration();
  try {
    FileSystem fileSystem=path.getFileSystem(configuration);
    SortedSet<FileStatus> listStatus;
    while (true) {
      try {
        listStatus=sort(fileSystem.listStatus(path,new PathFilter(){
          @Override public boolean accept(          Path path){
            if (path != null && path.getName().endsWith("String_Node_Str")) {
              return true;
            }
            return false;
          }
        }
));
        break;
      }
 catch (      FileNotFoundException e) {
        LOG.warn("String_Node_Str");
      }
      try {
        Thread.sleep(100);
      }
 catch (      InterruptedException e) {
        return;
      }
    }
    List<HdfsDirectory> indexesToImport=new ArrayList<HdfsDirectory>();
    for (    FileStatus fileStatus : listStatus) {
      Path file=fileStatus.getPath();
      if (fileStatus.isDir() && file.getName().endsWith("String_Node_Str")) {
        HdfsDirectory hdfsDirectory=new HdfsDirectory(configuration,file);
        if (!DirectoryReader.indexExists(hdfsDirectory)) {
          LOG.error("String_Node_Str",file);
        }
 else {
          indexesToImport.add(hdfsDirectory);
        }
      }
    }
    if (indexesToImport.isEmpty()) {
      return;
    }
    IndexAction indexAction=getIndexAction(indexesToImport,fileSystem);
    _blurIndex.process(indexAction);
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e,_shard,_table);
  }
}