@NotNull
  public static Map<String, String> stubIndexVersions(@NotNull List<? extends StubIndexExtension<?, ?>> stubIndexExtensions) {
    var builder = new HashMap<String, String>();

    FileBasedIndexExtension<?, ?> stubUpdatingIndex =
      FileBasedIndexExtension.EXTENSION_POINT_NAME.findFirstSafe(ex -> ex.getName().equals(StubUpdatingIndex.INDEX_ID));

    if (stubUpdatingIndex == null) {
      LOG.warn("Failed to find " + StubUpdatingIndex.INDEX_ID);
      return Collections.emptyMap();
    }

    String commonPrefix = stubUpdatingIndex.getVersion() + ":";
    for (StubIndexExtension<?, ?> ex : stubIndexExtensions) {
      String name = ex.getKey().getName();
      String newValue = commonPrefix + ex.getVersion();
      var oldValue = builder.put(name, newValue);
      if (oldValue != null && !oldValue.equals(newValue)) {
        LOG.warn("Multiple declarations of the same stub based index: " + name + ", old value " + oldValue + ", new value: " + newValue);
      }
    }

    return builder;
  }
@NotNull
  public static Map<String, String> stubIndexVersions(@NotNull List<? extends StubIndexExtension<?, ?>> stubIndexExtensions)