@SuppressWarnings("SSBasedInspection")
  private static @NotNull List<OrderRoot> filterAlreadyAdded(List<OrderRoot> roots, LibraryTable.ModifiableModel moduleLibrariesModel) {
    if (roots == null || roots.isEmpty()) {
      return Collections.emptyList();
    }

    Library[] libraries = moduleLibrariesModel.getLibraries();
    if (libraries.length == 0) {
      return roots;
    }

    return roots.stream()
      .filter(root -> {
        return Arrays.stream(libraries).noneMatch(library -> ArrayUtil.contains(root.getFile(), library.getFiles(root.getType())));
      })
      .collect(Collectors.toList());
  }
@SuppressWarnings("SSBasedInspection")
  private static @NotNull List<OrderRoot> filterAlreadyAdded(List<OrderRoot> roots, LibraryTable.ModifiableModel moduleLibrariesModel)