@SuppressWarnings("AssignmentToForLoopParameter")
  private static void mixNames(@NotNull Wrapped wrapped1, @NotNull Wrapped wrapped2) {
    if (!wrapped1.prepare() || !wrapped2.prepare()) {
      return;
    }
    String wrapped1AltText = null;
    String wrapped2AltText = null;

    for (File file1 = wrapped1.currentFile, file2 = wrapped2.currentFile;
         file1 != null && file2 != null;
         file1 = file1.getParentFile(), file2 = file2.getParentFile())
    {
      while (file1 != null && !StringUtil.isEmpty(file1.getName()) && NON_UNIQUE_PATH_ENTRIES.containsKey(file1.getName())) {
        if (NON_UNIQUE_PATH_ENTRIES.get(file1.getName())) {
          if (StringUtil.isEmpty(wrapped1AltText)) {
            wrapped1AltText = file1.getName();
          }
          else {
            wrapped1AltText += NAME_SEPARATOR + file1.getName();
          }
        }
        file1 = file1.getParentFile();
      }
      while (file2 != null && !StringUtil.isEmpty(file2.getName()) && NON_UNIQUE_PATH_ENTRIES.containsKey(file2.getName())) {
        if (NON_UNIQUE_PATH_ENTRIES.get(file2.getName())) {
          if (StringUtil.isEmpty(wrapped2AltText)) {
            wrapped2AltText = file2.getName();
          }
          else {
            wrapped2AltText += NAME_SEPARATOR + file2.getName();
          }
        }
        file2 = file2.getParentFile();
      }

      if (file1 == null) {
        wrapped1.nextFile();
      }
      else if (!wrapped1.library.getExternalName().startsWith(file1.getName())) {
        wrapped1.library.setExternalName(file1.getName() + NAME_SEPARATOR + wrapped1.library.getExternalName());
      }
      if (file2 == null) {
        wrapped2.nextFile();
      }
      else if (!wrapped2.library.getExternalName().startsWith(file2.getName())) {
        wrapped2.library.setExternalName(file2.getName() + NAME_SEPARATOR + wrapped2.library.getExternalName());
      }

      if (wrapped1.library.getExternalName().equals(wrapped2.library.getExternalName())) {
        if (wrapped1AltText != null) {
          diversifyName(wrapped1AltText, wrapped1, file1);
          return;
        }
        else if (wrapped2AltText != null) {
          diversifyName(wrapped2AltText, wrapped2, file1);
          return;
        }
      }
      else {
        return;
      }

      if (file1 == null || file2 == null) {
        return;
      }
    }
  }
@SuppressWarnings("AssignmentToForLoopParameter")
  private static void mixNames(@NotNull Wrapped wrapped1, @NotNull Wrapped wrapped2)