if (!(expr instanceof MethodCallExpression)) return expr;
MethodCallExpression methodExpr = (MethodCallExpression) expr;
Expression targetExpr = methodExpr.getObjectExpression();
if (!(targetExpr instanceof VariableExpression)) return expr;
VariableExpression var = (VariableExpression)targetExpr;
<BUG>if (!var.getName().equals("$spock_valueRecorder")) return expr;
if(!methodExpr.getMethodAsString().equals(ValueRecorder.RECORD)) return expr;
return ((ArgumentListExpression)methodExpr.getArguments()).getExpression(1);
}
private Statement rewriteCondition(Statement conditionStat, Expression conditionExpr, Expression message, boolean explicit) {
Statement result = new ExpressionStatement(rewriteCondition(conditionExpr, message, explicit));
result.setSourcePosition(conditionStat);</BUG>
return result;

if (!(expr instanceof MethodCallExpression)) return expr;
MethodCallExpression methodExpr = (MethodCallExpression) expr;
Expression targetExpr = methodExpr.getObjectExpression();
if (!(targetExpr instanceof VariableExpression)) return expr;
VariableExpression var = (VariableExpression)targetExpr;
if (!"$spock_valueRecorder".equals(var.getName())) return expr;
if(!ValueRecorder.RECORD.equals(methodExpr.getMethodAsString())) return expr;
return ((ArgumentListExpression)methodExpr.getArguments()).getExpression(1);
