public static boolean isSimplifiableImplicitReturnNegated(GrIfStatement ifStatement) {
    if (ifStatement.getElseBranch() != null) {
      return false;
    }
    GrStatement thenBranch = ifStatement.getThenBranch();
    thenBranch = ConditionalUtils.stripBraces(thenBranch);

    final PsiElement nextStatement =
      PsiTreeUtil.skipWhitespacesForward(ifStatement);
    if (!(nextStatement instanceof GrStatement elseBranch)) {
      return false;
    }
    return ConditionalUtils.isReturn(thenBranch, "false")
        && ConditionalUtils.isReturn(elseBranch, "true");
  }
public static boolean isSimplifiableImplicitReturnNegated(GrIfStatement ifStatement)