private static @Nullable PsiModifierList findMissingAnnotations(@NotNull PsiPackageStatement packageStatement,
                                                                  @NotNull PsiPackageStatement packageStatementInPackageInfoFile) {
    PsiModifierList annotationList = packageStatementInPackageInfoFile.getAnnotationList();
    if (annotationList == null) return packageStatement.getAnnotationList();
    PsiPackageStatement copy = (PsiPackageStatement)packageStatement.copy();
    StreamEx.of(copy.getAnnotationList().getChildren())
      .select(PsiAnnotation.class)
      .filter(annotation -> {
        String qualifiedName = annotation.getQualifiedName();
        return qualifiedName != null && annotationList.hasAnnotation(qualifiedName);
      })
      .forEach(PsiElement::delete);
    return copy.getAnnotationList();
  }
private static @Nullable PsiModifierList findMissingAnnotations(@NotNull PsiPackageStatement packageStatement,
                                                                  @NotNull PsiPackageStatement packageStatementInPackageInfoFile)