text: public static long getLastCommitGeneration(String[] files) {long max = -1;for (String file : files) {if (file.startsWith(IndexFileNames.SEGMENTS) &&file.startsWith(OLD_SEGMENTS_GEN) == false) {long gen = generationFromSegmentsFileName(file);if (gen > max) {max = gen;}}}return max;}