private static void mergeIfs(@NotNull PsiIfStatement outerIf, @NotNull PsiIfStatement innerIf) {
      PsiExpression outerCondition = outerIf.getCondition();
      PsiExpression innerCondition = innerIf.getCondition();
      if (outerCondition != null && innerCondition != null) {
        innerCondition.replace(
          JavaPsiFacade.getElementFactory(outerIf.getProject())
            .createExpressionFromText(ParenthesesUtils.getText(outerCondition, ParenthesesUtils.OR_PRECEDENCE) + "&&" +
                                      ParenthesesUtils.getText(innerCondition, ParenthesesUtils.OR_PRECEDENCE), null));
        outerIf.replace(innerIf);
      }
    }
private static void mergeIfs(@NotNull PsiIfStatement outerIf, @NotNull PsiIfStatement innerIf)