PsiExpression (PsiExpression iteratedValue) { PsiLocalVariable variable = ExpressionUtils.resolveLocalVariable(iteratedValue); if (variable != null) { final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(variable, PsiMethod.class); if (VariableAccessUtils.variableIsAssignedAtPoint(variable, containingMethod, iteratedValue)) { return null; } return PsiUtil.skipParenthesizedExprDown(variable.getInitializer()); } return iteratedValue; }