List<SimpleMatch> (final @Nullable List<? extends PsiElement> scope, @NotNull final PsiElement generatedMethod) { final List<SimpleMatch> result = new ArrayList<>(); annotatePattern(); if (scope != null) { for (PsiElement element : scope) { findPatternOccurrences(result, element, generatedMethod); } } deannotatePattern(); return result; }