void (List<? super Match> array, PsiElement scope) { PsiElement[] children = scope.getChildren(); for (PsiElement child : children) { ProgressManager.checkCanceled(); final Match match = isDuplicateFragment(child, false); if (match != null && (myTextRanges == null || myTextRanges.contains(match.getTextRange()))) { array.add(match); continue; } findPatternOccurrences(array, child); } }