MatchResultImpl (@NotNull PsiElement match, int start, int end) { final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByPsiElement(match); assert profile != null; final String image = profile.getText(match, start, end); if (myNestedResult == null) { return new MatchResultImpl(name, image, match, start, end, target); } final MatchResultImpl result = myNestedResult; result.setName(name); result.setMatchImage(image); result.setMatch(match); result.setStart(start); result.setEnd(end); result.setTarget(target); myNestedResult = null; return result; }