public PsiVariable getNextElementVariable(PsiStatement statement) {
    PsiLocalVariable var = getDeclaredVariable(statement);
    if (var == null || !isIteratorMethodCall(var.getInitializer(), "next")) return null;
    return var;
  }
public PsiVariable getNextElementVariable(PsiStatement statement)