@Override
    public void visitIfStatement(@NotNull GrIfStatement ifStatement) {
      super.visitIfStatement(ifStatement);
      final GrExpression condition = ifStatement.getCondition();
      if (condition == null) {
        return;
      }
      final PsiType type = condition.getType();
      if (type == null || !(PsiTypes.booleanType().isAssignableFrom(type))) {
        return;
      }

      if (isSimplifiableAssignment(ifStatement)) {
        registerStatementError(ifStatement);
        return;
      }

      if (isSimplifiableReturn(ifStatement)) {
        registerStatementError(ifStatement);
        return;
      }

      if (isSimplifiableImplicitReturn(ifStatement)) {
        registerStatementError(ifStatement);
        return;
      }
      if (isSimplifiableAssignmentNegated(ifStatement)) {
        registerStatementError(ifStatement);
        return;
      }

      if (isSimplifiableReturnNegated(ifStatement)) {
        registerStatementError(ifStatement);
        return;
      }

      if (isSimplifiableImplicitReturnNegated(ifStatement)) {
        registerStatementError(ifStatement);
        return;
      }
      if (isSimplifiableImplicitAssignment(ifStatement)) {
        registerStatementError(ifStatement);
        return;
      }

      if (isSimplifiableImplicitAssignmentNegated(ifStatement)) {
        registerStatementError(ifStatement);
      }
    }
@Override
    public void visitIfStatement(@NotNull GrIfStatement ifStatement)