private static boolean collectionMayBeChangedBeforeLoop(PsiForStatement forStatement,
                                                          Holder holder) {
    PsiStatement sizeStatement = PsiTreeUtil.getParentOfType(holder.getMethodExpression(), PsiStatement.class);
    if (forStatement == null || sizeStatement == null) return false;
    PsiElement context = PsiTreeUtil.findCommonParent(sizeStatement, forStatement);
    if (context == null) return false;
    if (sizeStatement.getParent() != context) return false;
    int toOffset = forStatement.getTextOffset();
    int fromOffset = sizeStatement.getTextOffset();
    if (toOffset <= fromOffset) return false;
    if (holder.isDummyVariable()) {
      return processFromAssignmentToLoop(sizeStatement, forStatement, getSideEffectPredicateWithSkipOptions());
    }
    else {
      return processFromAssignmentToLoop(sizeStatement, forStatement,
                                         getIsAssignedPredicateWithSkipOptions(holder.getVariable()),
                                         getNonLocalSideEffectPredicateWithSkipOptions());
    }
  }
private static boolean collectionMayBeChangedBeforeLoop(PsiForStatement forStatement,
                                                          Holder holder)