private static boolean forInStatementsAreEquivalent(
     @NotNull GrForStatement statement1, @NotNull GrForStatement statement2) {
   final GrForClause clause1 = statement1.getClause();
   final GrForClause clause2 = statement2.getClause();
   if (!forClausesAreEquivalent(clause1, clause2)) {
     return false;
   }
   final GrStatement body1 = statement1.getBody();
   final GrStatement body2 = statement2.getBody();
   return statementsAreEquivalent(body1, body2);
 }
  public void visitForStatement(GrForStatement forStatement) {
    final GrForClause clause = forStatement.getClause();

    processForLoopInitializer(clause);

    InstructionImpl start = startNode(forStatement);

    addForLoopBreakingEdge(forStatement, clause);

    flushForeachLoopVariable(clause);

    final GrStatement body = forStatement.getBody();
    if (body != null) {
      InstructionImpl bodyInstruction = startNode(body);
      body.accept(this);
      finishNode(bodyInstruction);
    }
    checkPending(start); // check for breaks targeted here

    if (clause instanceof GrTraditionalForClause) {
      acceptNullable(((GrTraditionalForClause) clause).getUpdate());
    }
    if (myHead != null) addEdge(myHead, start); // loop
    interruptFlow();

    finishNode(start);
  }