boolean ( Holder collectionHolder, PsiVariable indexVariable, PsiStatement body) { if (body == null) { return true; } final VariableOnlyUsedAsListIndexVisitor visitor = new VariableOnlyUsedAsListIndexVisitor(collectionHolder, indexVariable); body.accept(visitor); return visitor.isIndexVariableUsedOnlyAsIndex(); }