public static boolean isSimplifiableImplicitAssignment(GrIfStatement ifStatement) {
    if (ifStatement.getElseBranch() != null) {
      return false;
    }
    GrStatement thenBranch = ifStatement.getThenBranch();
    thenBranch = ConditionalUtils.stripBraces(thenBranch);
    final PsiElement nextStatement =
      PsiTreeUtil.skipWhitespacesBackward(ifStatement);
    if (!(nextStatement instanceof GrStatement elseBranch)) {
      return false;
    }

    elseBranch = ConditionalUtils.stripBraces(elseBranch);
    if (ConditionalUtils.isAssignment(thenBranch, "true") &&
        ConditionalUtils.isAssignment(elseBranch, "false")) {
      final GrAssignmentExpression thenExpression =
          (GrAssignmentExpression) thenBranch;
      final GrAssignmentExpression elseExpression =
          (GrAssignmentExpression) elseBranch;
      final IElementType thenSign = thenExpression.getOperationTokenType();
      final IElementType elseSign = elseExpression.getOperationTokenType();
      if (!thenSign.equals(elseSign)) {
        return false;
      }
      final GrExpression thenLhs = thenExpression.getLValue();
      final GrExpression elseLhs = elseExpression.getLValue();
      return EquivalenceChecker.expressionsAreEquivalent(thenLhs,
          elseLhs);
    } else {
      return false;
    }
  }
public static boolean isSimplifiableImplicitAssignment(GrIfStatement ifStatement)