private static void reportStubFileElementTypeVersionConflict(List<StubFileElementType<?>> types, String storedVersion) {
    var data = describeStubFileElementTypes(types);
    var responsiblePluginIds = ContainerUtil.mapNotNull(data, p -> p.second);
    var responsiblePluginId = responsiblePluginIds.isEmpty()
                              ? null
                              // eventually, all relevant plugins will be notified
                              : responsiblePluginIds.get(new Random(System.nanoTime()).nextInt(responsiblePluginIds.size()));
    var attachment = new Attachment(
      "element-types.txt",
      "StubFileElementType version: " + storedVersion + "\n" +
      "List of suitable conflicting StubFileElementTypes:\n" +
      String.join("\n", ContainerUtil.map(data, p -> p.first))
    );
    attachment.setIncluded(true);
    var message = "Cannot distinguish StubFileElementTypes. This might worsen the performance. " +
                  "Providing unique externalId or adding a distinctive debugName when instantiating StubFileElementTypes can help " +
                  "(override getExternalId() and/or getDebugName() in StubFileElementType). " +
                  "See attachment for additional information.";
    if (responsiblePluginId != null) {
      LOG.error(new PluginException(message, responsiblePluginId, List.of(attachment)));
    } else {
      LOG.error(message, attachment);
    }
  }
private static void reportStubFileElementTypeVersionConflict(List<StubFileElementType<?>> types, String storedVersion)