boolean (@NotNull ControlFlow flow, int offset, @NotNull PsiVariable variable) { Instruction instruction = flow.getInstructions().get(offset); PsiManager psiManager = variable.getManager(); return instruction instanceof ReadVariableInstruction && psiManager.areElementsEquivalent(((ReadVariableInstruction)instruction).variable, variable) || instruction instanceof WriteVariableInstruction && psiManager.areElementsEquivalent(((WriteVariableInstruction)instruction).variable, variable); }