private static boolean isApplicable(@NotNull PsiElement source) {
    if (source.isValid()) {
      PsiFile file = source.getContainingFile();
      return file instanceof PsiJavaFile || file instanceof JavaDummyHolder;
    }
    return false;
  }
private static boolean isApplicable(@NotNull PsiElement source)