private static boolean isConstantMask(PsiExpression expression) {
      if (expression == null) {
        return false;
      }
      if (!(expression instanceof PsiBinaryExpression binaryExpression)) {
        return false;
      }
      final IElementType tokenType =
        binaryExpression.getOperationTokenType();
      if (!tokenType.equals(JavaTokenType.OR) &&
          !tokenType.equals(JavaTokenType.AND)) {
        return false;
      }
      final PsiExpression rhs = binaryExpression.getROperand();
      if (PsiUtil.isConstantExpression(rhs)) {
        return true;
      }
      final PsiExpression lhs = binaryExpression.getLOperand();
      return PsiUtil.isConstantExpression(lhs);
    }
private static boolean isConstantMask(PsiExpression expression)