void (@NotNull final Set<? super PsiElement> res, @NotNull final Instruction instruction, int index) { if (instruction instanceof ReadVariableInstruction) { ReadVariableInstruction instructionR = (ReadVariableInstruction)instruction; if (psiManager.areElementsEquivalent(instructionR.variable, def)) { final PsiElement element = flow.getElement(index); element.accept(new JavaRecursiveElementWalkingVisitor() { @Override public void visitReferenceExpression(@NotNull PsiReferenceExpression ref) { if (ref.isReferenceTo(def)) { res.add(ref); } } }); } } }