code: public static void getAllSplits(final Set<String> splits, final File path, final String trainingSuffix, final String testSuffix) {
          if (path == null) {
              return;
          }
          File[] files = path.listFiles();
          if (files == null) {
              return;
          }
          for (File file : files) {
              if (file.isDirectory()) {
                  getAllSplits(splits, file, trainingSuffix, testSuffix);
              } else if (file.getName().endsWith(trainingSuffix)) {
                  splits.add(file.getAbsolutePath().replaceAll(trainingSuffix + "$", ""));
              } else if (file.getName().endsWith(testSuffix)) {
                  splits.add(file.getAbsolutePath().replaceAll(testSuffix + "$", ""));
              }
          }
      }
docs: Get all training/test splits.
  
  @param splits The splits.
  @param path The path where the splits are.
  @param trainingSuffix The suffix of the training files.
  @param testSuffix The suffix of the test files.