boolean (@NotNull PsiVariable arrayVariable, @NotNull PsiReferenceExpression from, @Nullable PsiStatement to) { if (to == null) return false; int fromOffset = from.getTextOffset(); int toOffset = to.getTextOffset(); if (fromOffset >= toOffset) return false; PsiElement context = PsiTreeUtil.findCommonParent(from, to); PsiStatement fromStatement = PsiTreeUtil.getParentOfType(from, PsiStatement.class); if(fromStatement == null) return false; if (context == null) return false; if (arrayVariable instanceof PsiLocalVariable || arrayVariable instanceof PsiParameter) { return processFromAssignmentToLoop(fromStatement, to, getIsAssignedPredicateWithSkipOptions(arrayVariable)); } else { return processFromAssignmentToLoop(fromStatement, to, getIsAssignedPredicateWithSkipOptions(arrayVariable), getNonLocalSideEffectPredicateWithSkipOptions()); } }