boolean (PsiLocalVariable variable, PsiReferenceExpression referenceExpression) { PsiElement parent = PsiTreeUtil.findCommonParent(variable, referenceExpression); if (parent == null) { return false; } PsiExpression initializer = variable.getInitializer(); if (initializer != null && !(isField(initializer) || assignedFromMethodCall(initializer))) { return false; } return !VariableAccessUtils.variableIsAssigned(variable, t -> isField(t) || assignedFromMethodCall(t), parent); }