ULocalVariable (UExpression passThrough) { UElement uastParent = passThrough.getUastParent(); ULocalVariable uVar = null; if (uastParent instanceof ULocalVariable) { uVar = (ULocalVariable)uastParent; } else if (uastParent instanceof UBinaryExpression && (((UBinaryExpression)uastParent).getOperator() == UastBinaryOperator.ASSIGN || ((UBinaryExpression)uastParent).getOperator() == UastBinaryOperator.PLUS_ASSIGN) && AnnotationContext.expressionsAreEquivalent(((UBinaryExpression)uastParent).getRightOperand(), passThrough)) { UExpression left = ((UBinaryExpression)uastParent).getLeftOperand(); if (left instanceof UResolvable) { PsiElement target = ((UResolvable)left).resolve(); uVar = ObjectUtils.tryCast(UastContextKt.toUElement(target), ULocalVariable.class); if (uVar == null && target != null) { uVar = ObjectUtils.tryCast(UastContextKt.toUElement(target.getParent()), ULocalVariable.class); } } } return uVar; }