private boolean isAllOnes(PsiExpression expression) {
    final PsiType expressionType = expression.getType();
    final Object value;
    if (m_ignoreExpressionsContainingConstants) {
      value = JavaPsiMathUtil.getNumberFromLiteral(expression);
    }
    else {
      value = ConstantExpressionUtil.computeCastTo(expression, expressionType);
    }
    return (value instanceof Integer || value instanceof Short || value instanceof Byte) && ((Number)value).intValue() == -1 ||
           value instanceof Long && ((Long)value).longValue() == 0xffffffffffffffffL;
  }
private boolean isAllOnes(PsiExpression expression)