boolean ( @NotNull PsiVariable arrayVariable, @NotNull PsiVariable indexVariable, @Nullable PsiStatement body) { if (body == null) { return true; } final VariableOnlyUsedAsIndexVisitor visitor = new VariableOnlyUsedAsIndexVisitor(arrayVariable, indexVariable); body.accept(visitor); return visitor.isIndexVariableUsedOnlyAsIndex(); }