Program: 188809
Project: 188809
Buggy source:
public void run(){
  long start=System.currentTimeMillis();
  LOGGER.error("String_Node_Str" + basePath.toString());
  try {
    EnumSet<FileVisitOption> opts=EnumSet.of(FileVisitOption.FOLLOW_LINKS);
    Files.walkFileTree(basePath,opts,100,new FileVisitor<Path>(){
      @Override public FileVisitResult preVisitDirectory(      Path dir,      BasicFileAttributes attrs) throws IOException {
        return FileVisitResult.CONTINUE;
      }
      @Override public FileVisitResult visitFile(      Path file,      BasicFileAttributes attrs) throws IOException {
        Date modifiedDate=new Date(attrs.lastModifiedTime().toMillis());
        if (from == null || from.before(modifiedDate)) {
          transferredResourceAdded(FolderMonitorNIO.createTransferredResource(file,basePath),false);
          counter++;
          if (counter >= 1000) {
            try {
              LOGGER.error("String_Node_Str");
              index.commit(RodaConstants.INDEX_SIP);
              counter=0;
            }
 catch (            IOException|SolrServerException e) {
              LOGGER.error(e.getMessage(),e);
            }
          }
        }
        return FileVisitResult.CONTINUE;
      }
      @Override public FileVisitResult visitFileFailed(      Path file,      IOException exc) throws IOException {
        return FileVisitResult.CONTINUE;
      }
      @Override public FileVisitResult postVisitDirectory(      Path dir,      IOException exc) throws IOException {
        return FileVisitResult.CONTINUE;
      }
    }
);
    index.commit(RodaConstants.INDEX_SIP);
    LOGGER.error("String_Node_Str");
    LOGGER.error("String_Node_Str" + ((System.currentTimeMillis() - start) / 1000) + "String_Node_Str");
    RodaCoreFactory.setFolderMonitorDate(basePath,new Date());
  }
 catch (  IOException|SolrServerException e) {
    LOGGER.error("String_Node_Str");
  }
}

Fixed version (ground truth):
public void run(){
  long start=System.currentTimeMillis();
  LOGGER.error("String_Node_Str" + basePath.toString());
  try {
    EnumSet<FileVisitOption> opts=EnumSet.of(FileVisitOption.FOLLOW_LINKS);
    Files.walkFileTree(basePath,opts,Integer.MAX_VALUE,new FileVisitor<Path>(){
      @Override public FileVisitResult preVisitDirectory(      Path dir,      BasicFileAttributes attrs) throws IOException {
        indexPath(dir,attrs);
        return FileVisitResult.CONTINUE;
      }
      @Override public FileVisitResult visitFile(      Path file,      BasicFileAttributes attrs) throws IOException {
        indexPath(file,attrs);
        return FileVisitResult.CONTINUE;
      }
      @Override public FileVisitResult visitFileFailed(      Path file,      IOException exc) throws IOException {
        return FileVisitResult.CONTINUE;
      }
      @Override public FileVisitResult postVisitDirectory(      Path dir,      IOException exc) throws IOException {
        return FileVisitResult.CONTINUE;
      }
    }
);
    index.commit(RodaConstants.INDEX_SIP);
    LOGGER.error("String_Node_Str");
    LOGGER.error("String_Node_Str" + ((System.currentTimeMillis() - start) / 1000) + "String_Node_Str");
    RodaCoreFactory.setFolderMonitorDate(basePath,new Date());
  }
 catch (  IOException|SolrServerException e) {
    LOGGER.error("String_Node_Str");
  }
}