Program: 78472
Project: 78472
Buggy source:
public Object getValue(IBaseExpression dataExpr) throws BirtException {
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(dataExpr));
  checkStarted();
  Object exprValue=null;
  Object handle=dataExpr.getHandle();
  if (handle instanceof CompiledExpression) {
    CompiledExpression expr=(CompiledExpression)handle;
    Object value=evaluateCompiledExpression(expr,odiResult,scope);
    try {
      exprValue=DataTypeUtil.convert(value,dataExpr.getDataType());
    }
 catch (    BirtException e) {
      throw new DataException(ResourceConstants.INCONVERTIBLE_DATATYPE,new Object[]{value,value.getClass(),DataType.getClass(dataExpr.getDataType())});
    }
  }
 else   if (handle instanceof ConditionalExpression) {
    ConditionalExpression ce=(ConditionalExpression)handle;
    Object resultExpr=getValue(ce.getExpression());
    Object resultOp1=ce.getOperand1() != null ? getValue(ce.getOperand1()) : null;
    Object resultOp2=ce.getOperand2() != null ? getValue(ce.getOperand2()) : null;
    String op1Text=ce.getOperand1() != null ? ce.getOperand1().getText() : null;
    String op2Text=ce.getOperand2() != null ? ce.getOperand2().getText() : null;
    exprValue=ScriptEvalUtil.evalConditionalExpr(resultExpr,ce.getOperator(),ScriptEvalUtil.newExprInfo(op1Text,resultOp1),ScriptEvalUtil.newExprInfo(op2Text,resultOp2));
  }
 else {
    DataException e=new DataException(ResourceConstants.INVALID_EXPR_HANDLE);
    logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str",e);
    throw e;
  }
  this.getRdSaveUtil().doSaveExpr(dataExpr,exprValue);
  return exprValue;
}

Fixed version (ground truth):
public Object getValue(IBaseExpression dataExpr) throws BirtException {
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(dataExpr));
  checkStarted();
  Object exprValue=null;
  Object handle=dataExpr.getHandle();
  if (handle instanceof CompiledExpression) {
    CompiledExpression expr=(CompiledExpression)handle;
    Object value=evaluateCompiledExpression(expr,odiResult,scope);
    try {
      exprValue=DataTypeUtil.convert(value,dataExpr.getDataType());
    }
 catch (    BirtException e) {
      throw new DataException(ResourceConstants.INCONVERTIBLE_DATATYPE,new Object[]{value,value.getClass(),DataType.getClass(dataExpr.getDataType())});
    }
  }
 else   if (handle instanceof ConditionalExpression) {
    ConditionalExpression ce=(ConditionalExpression)handle;
    Object resultExpr=getValue(ce.getExpression());
    Object resultOp1=ce.getOperand1() != null ? getValue(ce.getOperand1()) : null;
    Object resultOp2=ce.getOperand2() != null ? getValue(ce.getOperand2()) : null;
    String op1Text=ce.getOperand1() != null ? ce.getOperand1().getText() : null;
    String op2Text=ce.getOperand2() != null ? ce.getOperand2().getText() : null;
    exprValue=ScriptEvalUtil.evalConditionalExpr(resultExpr,ce.getOperator(),ScriptEvalUtil.newExprInfo(op1Text,resultOp1),ScriptEvalUtil.newExprInfo(op2Text,resultOp2));
  }
 else {
    DataException e=new DataException(ResourceConstants.INVALID_EXPR_HANDLE);
    logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str",e);
    throw e;
  }
  if (exprValue instanceof DataExceptionMocker) {
    throw ((DataExceptionMocker)exprValue).getCause();
  }
  this.getRdSaveUtil().doSaveExpr(dataExpr,exprValue);
  return exprValue;
}