public static void removeIndexFiles(File buildDir, Throwable cause) {
    final File indexDir = getIndexDir(buildDir);
    if (indexDir.exists()) {
      try {
        FileUtilRt.deleteRecursively(indexDir.toPath());
        LOG.info("backward reference index deleted", cause != null ? cause : new Exception());
      }
      catch (Throwable e) {
        LOG.info("failed to delete backward reference index", e);
      }
    }
  }
public static void removeIndexFiles(File buildDir, Throwable cause)