private static List<Module> getModules(List<String> moduleNames, Project project) {
    return moduleNames.isEmpty() ? Collections.emptyList() : Arrays.stream(ModuleManager.getInstance(project).getModules())
      .filter(module -> moduleNames.contains(module.getName()))
      .toList();
  }
private static List<Module> getModules(List<String> moduleNames, Project project)