FileIndexingState isUpToDateState(int fileId, @NotNull VirtualFile file) throws IOException {
    int indexedVersion = VERSION_STAMP.readInt(fileId);

    if (indexedVersion == 0) {
      return FileIndexingState.NOT_INDEXED;
    }

    int actualVersion = getBuilderCumulativeVersion(file);
    return actualVersion == indexedVersion ? FileIndexingState.UP_TO_DATE : FileIndexingState.OUT_DATED;
  }
FileIndexingState isUpToDateState(int fileId, @NotNull VirtualFile file)