private static boolean forClausesAreEquivalent(@Nullable GrForClause statement1,
                                                 @Nullable GrForClause statement2) {
    if (statement1 == null && statement2 == null) return true;
    if (statement1 == null || statement2 == null) return false;
    GrVariable[] variables1 = statement1.getDeclaredVariables();
    GrVariable[] variables2 = statement2.getDeclaredVariables();
    return ArrayUtil.areEqual(variables1, variables2, (var1, var2) -> 
      (var1 == null && var2 == null) || (var1 != null && var2 != null && variablesAreEquivalent(var1, var2)));
  }
private static boolean forClausesAreEquivalent(@Nullable GrForClause statement1,
                                                 @Nullable GrForClause statement2)