@NotNull
  private static List<String> getModuleNames(@NotNull List<? extends PsiPackageAccessibilityStatement> statements) {
    final List<String> result = new ArrayList<>();
    for (PsiPackageAccessibilityStatement statement : statements) {
      final List<String> moduleNames = statement.getModuleNames();
      if (moduleNames.isEmpty()) {
        return Collections.emptyList();
      }
      result.addAll(moduleNames);
    }
    return result;
  }
@NotNull
  private static List<String> getModuleNames(@NotNull List<? extends PsiPackageAccessibilityStatement> statements)