private static String @NotNull [] getOverlappedNameVersions(String prefix, String @NotNull [] suggestedNames, String suffix) {
    List<String> newSuggestions = new ArrayList<>();
    int longestOverlap = 0;

    for (String suggestedName : suggestedNames) {
      if (suggestedName.length() < 3) {
        continue;
      }

      if (StringUtil.startsWithIgnoreCase(suggestedName, prefix)) {
        newSuggestions.add(suggestedName);
        longestOverlap = prefix.length();
      }

      suggestedName = Character.toUpperCase(suggestedName.charAt(0)) + suggestedName.substring(1);
      int overlap = getOverlap(suggestedName, prefix);

      if (overlap < longestOverlap) continue;

      if (overlap > longestOverlap) {
        newSuggestions.clear();
        longestOverlap = overlap;
      }

      String suggestion = prefix.substring(0, prefix.length() - overlap) + suggestedName;

      int lastIndexOfSuffix = suggestion.lastIndexOf(suffix);
      if (lastIndexOfSuffix >= 0 && suffix.length() < suggestion.length() - lastIndexOfSuffix) {
        suggestion = suggestion.substring(0, lastIndexOfSuffix) + suffix;
      }

      if (!newSuggestions.contains(suggestion)) {
        newSuggestions.add(suggestion);
      }
    }
    return ArrayUtilRt.toStringArray(newSuggestions);
  }
private static String @NotNull [] getOverlappedNameVersions(String prefix, String @NotNull [] suggestedNames, String suffix)