private static StreamEx<PsiExpression> conditions(PsiElement element) {
    return StreamEx.iterate(element, e -> e != null &&
                                          !(e instanceof PsiLambdaExpression) && !(e instanceof PsiMethod), PsiElement::getParent)
      .pairMap((child, parent) -> parent instanceof PsiIfStatement && ((PsiIfStatement)parent).getThenBranch() == child ? parent : null)
      .select(PsiIfStatement.class)
      .map(PsiIfStatement::getCondition)
      .flatMap(cond -> cond instanceof PsiPolyadicExpression && ((PsiPolyadicExpression)cond).getOperationTokenType().equals(
        JavaTokenType.ANDAND) ? StreamEx.of(((PsiPolyadicExpression)cond).getOperands()) : StreamEx.of(cond));
  }
private static StreamEx<PsiExpression> conditions(PsiElement element)