Program: 78553
Project: 78553
Buggy source:
/** 
 * Evaluates a IJSExpression or IConditionalExpression
 * @param expr
 * @param cx
 * @param scope
 * @param source
 * @param lineNo
 * @return 
 * @throws DataException
 */
public static Object evalExpr(IBaseExpression expr,Context cx,Scriptable scope,String source,int lineNo) throws DataException {
  if (logger.isLoggable(Level.FINER))   logger.entering(ScriptEvalUtil.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(expr) + "String_Node_Str"+ source+ "String_Node_Str"+ lineNo);
  Object result;
  if (expr == null) {
    result=null;
  }
 else   if (expr instanceof IConditionalExpression) {
    ConditionalExpression ConditionalExpr=(ConditionalExpression)expr;
    Object expression=evalExpr(ConditionalExpr.getExpression(),cx,scope,source,lineNo);
    Object Op1=evalExpr(MiscUtil.constructValidScriptExpression(ConditionalExpr.getOperand1()),cx,scope,source,lineNo);
    Object Op2=evalExpr(MiscUtil.constructValidScriptExpression(ConditionalExpr.getOperand2()),cx,scope,source,lineNo);
    result=evalConditionalExpr2(expression,ConditionalExpr.getOperator(),Op1,Op2);
  }
 else {
    IScriptExpression jsExpr=(IScriptExpression)expr;
    if (jsExpr.getText() != null && jsExpr.getHandle() != null) {
      result=((CompiledExpression)jsExpr.getHandle()).evaluate(cx,scope);
    }
 else {
      result=evaluateJSAsExpr(cx,scope,jsExpr.getText(),source,lineNo);
    }
  }
  if (logger.isLoggable(Level.FINER))   logger.exiting(ScriptEvalUtil.class.getName(),"String_Node_Str",result);
  return result;
}

Fixed version (ground truth):
/** 
 * Evaluates a IJSExpression or IConditionalExpression
 * @param expr
 * @param cx
 * @param scope
 * @param source
 * @param lineNo
 * @return 
 * @throws DataException
 */
public static Object evalExpr(IBaseExpression expr,Context cx,Scriptable scope,String source,int lineNo) throws DataException {
  if (logger.isLoggable(Level.FINER))   logger.entering(ScriptEvalUtil.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(expr) + "String_Node_Str"+ source+ "String_Node_Str"+ lineNo);
  Object result;
  if (expr == null) {
    result=null;
  }
 else   if (expr instanceof IConditionalExpression) {
    Object handle=expr.getHandle();
    if (handle instanceof NEvaluator) {
      result=Boolean.valueOf(((NEvaluator)handle).evaluate(cx,scope));
    }
 else {
      ConditionalExpression ConditionalExpr=(ConditionalExpression)expr;
      Object expression=evalExpr(ConditionalExpr.getExpression(),cx,scope,source,lineNo);
      Object Op1=evalExpr(MiscUtil.constructValidScriptExpression(ConditionalExpr.getOperand1()),cx,scope,source,lineNo);
      Object Op2=evalExpr(MiscUtil.constructValidScriptExpression(ConditionalExpr.getOperand2()),cx,scope,source,lineNo);
      result=evalConditionalExpr2(expression,ConditionalExpr.getOperator(),Op1,Op2);
    }
  }
 else {
    IScriptExpression jsExpr=(IScriptExpression)expr;
    if (jsExpr.getText() != null && jsExpr.getHandle() != null) {
      result=((CompiledExpression)jsExpr.getHandle()).evaluate(cx,scope);
    }
 else {
      result=evaluateJSAsExpr(cx,scope,jsExpr.getText(),source,lineNo);
    }
  }
  if (logger.isLoggable(Level.FINER))   logger.exiting(ScriptEvalUtil.class.getName(),"String_Node_Str",result);
  return result;
}