boolean (PsiLoopStatement forLoop, PsiExpression arg) { if (!(forLoop instanceof PsiForStatement)) return false; CountingLoop loop = CountingLoop.from((PsiForStatement)forLoop); if (loop == null) return false; if (loop.isDescending()) { return ExpressionUtils.isReferenceTo(arg, loop.getCounter()); } return PsiEquivalenceUtil.areElementsEquivalent(arg, loop.getInitializer()); }