Test if the given expression has side effects.

@param expression the expression.
@param context the list of context expressions.
@return {@code true} if the expression has side effects.
966776
protected Boolean _hasSideEffects(XVariableDeclaration expression, ISideEffectContext context) {
		if (hasSideEffects(expression.getRight(), context)) {
			return true;
		}
		context.declareVariable(expression.getIdentifier(), expression.getRight());
		return false;
	}
46309
public boolean evaluate(Object context){
		switch (operatorType){
		case OPERATOR_AND:
			for (BooleanExpression e: children){
				if (e.evaluate(context) == false){
					return false;
				}
			}
			return true;
		case OPERATOR_OR:
			for (BooleanExpression e: children){
				if (e.evaluate(context) == true){
					return true;
				}
			}
			return false;
		case OPERATOR_NOT:
			if (children.size() != 1){
				throw new UnsupportedOperationException("One and only one operand is allowed for NOT operator.");
			}
			BooleanExpression e = children.get(0);
			return !e.evaluate(context);
		default:
			throw new UnsupportedOperationException("Operand should implement its own evaluation method.");
		}
	}
700734
@NonNull
    public Expression is(@NonNull Expression expression) {
        if (expression == null) {
            throw new IllegalArgumentException("expression cannot be null.");
        }
        return new BinaryExpression(this, expression, BinaryExpression.OpType.Is);
    }
933489
protected Boolean _hasSideEffects(XAssignment expression, ISideEffectContext context) {
		if (internalHasOperationSideEffects(expression, context, true)) {
			return true;
		}
		if (hasSideEffects(expression.getValue(), context)) {
			return true;
		}
		final JvmIdentifiableElement feature = expression.getFeature();
		if (feature instanceof XVariableDeclaration) {
			context.assignVariable(feature.getIdentifier(), expression.getValue());
		}
		return false;
	}
1228470
private boolean passesExpression(LoggingEvent event) {
    if (event != null) {
      if (expressionRule != null) {
        return (expressionRule.evaluate(event, null));
      }
    }
    return true;
  }
380153
protected Boolean _hasSideEffects(XCollectionLiteral expression, ISideEffectContext context) {
		context.open();
		for (final XExpression ex : expression.getElements()) {
			if (hasSideEffects(ex, context)) {
				return true;
			}
		}
		context.close();
		return false;
	}
529633
private boolean isValidDefineType(JSTypeExpression expression) {
    JSTypeRegistry registry = compiler.getTypeRegistry();
    JSType type = registry.evaluateTypeExpressionInGlobalScope(expression);
    return !type.isUnknownType()
        && type.isSubtypeOf(registry.getNativeType(NUMBER_STRING_BOOLEAN));
  }
783756
protected Boolean _hasSideEffects(XSwitchExpression expression, ISideEffectContext context) {
		context.open();
		if (hasSideEffects(expression.getSwitch(), context)) {
			return true;
		}
		final List<Map<String, List<XExpression>>> buffers = new ArrayList<>();
		for (final XCasePart ex : expression.getCases()) {
			context.open();
			if (hasSideEffects(ex.getCase(), context)) {
				return true;
			}
			final Map<String, List<XExpression>> buffer = context.createVariableAssignmentBufferForBranch();
			if (hasSideEffects(ex.getThen(), context.branch(buffer))) {
				return true;
			}
			buffers.add(buffer);
			context.close();
		}
		final Map<String, List<XExpression>> buffer = context.createVariableAssignmentBufferForBranch();
		if (hasSideEffects(expression.getDefault(), context.branch(buffer))) {
			return true;
		}
		buffers.add(buffer);
		context.mergeBranchVariableAssignments(buffers);
		context.close();
		return false;
	}
1202580
public void addExpression(final String _expression)
    {
        this.tokens.add(new Token(ValueList.TokenType.EXPRESSION, _expression));
        getExpressions().add(_expression);
    }
1242347
public void visitBooleanExpression(BooleanExpression expression) {
        controller.getCompileStack().pushBooleanExpression();
        int mark = controller.getOperandStack().getStackLength();
        Expression inner = expression.getExpression();
        inner.visit(this);
        controller.getOperandStack().castToBool(mark, true);
        controller.getCompileStack().pop();
    }
933942
public boolean hasNested(String expression) {
    if (expression == null || expression.length() == 0) return false;
    else return remove(expression) != null;

  }
1167460
public static boolean isExpressionContainsFunction(String expression) {
		
		// Si la chaine est vide : false
		if(expression == null || expression.trim().length() == 0) {
			
			// On retourne false
			return false;
		}
		
		// On split
		return isExpressionContainPattern(expression, FUNC_CHAIN_PATTERN);
	}
1087194
protected Boolean hasSideEffects(XExpression expr, ISideEffectContext context) {
		if (expr != null && !expr.eIsProxy()) {
			return this.hasSideEffectsDispatcher.invoke(expr, context);
		}
		return false;
	}
325669
protected static boolean isNestable(String expression) {
        return !(expression.contains(SearchExpressionConstants.ALL_KEYWORD)
                || expression.contains(SearchExpressionConstants.NONE_KEYWORD)
                || expression.contains(SearchExpressionConstants.PFS_PREFIX));
    }
118132
private boolean checkCondition(TestContext context) {
        if (conditionExpression != null) {
            return conditionExpression.evaluate(context);
        }

        // replace dynamic content with each iteration
        String conditionString = context.replaceDynamicContentInString(condition);
        if (ValidationMatcherUtils.isValidationMatcherExpression(conditionString)) {
            try {
                ValidationMatcherUtils.resolveValidationMatcher("iteratingCondition", "", conditionString, context);
                return true;
            } catch (AssertionError e) {
                return false;
            }
        }

        return BooleanExpressionParser.evaluate(conditionString);
    }
1309830
protected Boolean _hasSideEffects(XBinaryOperation expression, ISideEffectContext context) {
		if (isReassignmentOperator(expression)) {
			if (!isLocalExpression(expression.getLeftOperand(), context, false)) {
				return true;
			}
		} else {
			if (expression.isTypeLiteral() || expression.isPackageFragment()) {
				return false;
			}
			if (hasSideEffects(expression.getLeftOperand(), context)) {
				return true;
			}
		}
		if (hasSideEffects(expression.getRightOperand(), context)) {
			return true;
		}
		return false;
	}
1141091
protected boolean _hasSideEffects(XAbstractWhileExpression expression, ISideEffectContext context) {
		context.open();
		if (hasSideEffects(expression.getPredicate(), context)) {
			return true;
		}
		if (hasSideEffects(expression.getBody(), context.branch())) {
			return true;
		}
		context.close();
		return false;
	}