ReadWriteVariableInstruction (final GrReferenceExpression refExpr, final Instruction[] flow) { for (Instruction instruction : flow) { if (instruction instanceof ReadWriteVariableInstruction && instruction.getElement() == refExpr) { return (ReadWriteVariableInstruction)instruction; } } return null; }