Bug 123840 Incorrect use of static fields in NEvaluator and FilterPassController
Data Engine classes org.eclipse.birt.data.engine.script.NEvaluator and FilterPassController (used for top-n and bottom-n filter process) use static class fields to store proessing data. This is not multi-thread safe. If there are concurrent requests running in the same JVM (even if they use different instances of DataEngine), data corruption will occur since multiple requests may get/set the static fields at the same time. These classes should keep all per-request data in instance fields. Each report query need to have its own instance.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/ScriptEvalUtil.java
return new Boolean( result );
	}
	/**
	 * Encapsulate operands to ExprTextAndValue, internal use only
	 * 
	 * @param obj
	 * @param operator
	 * @param op1
	 * @param op2
	 * @return A Boolean result
	 * @throws DataException
	 */
	public static Object evalConditionalExpr2( Object obj, int operator,
			Object op1, Object op2 ) throws DataException
	{
		return evalConditionalExpr( obj,
				operator,
				ExprTextAndValue.newInstance( "", op1 ),
				ExprTextAndValue.newInstance( "", op2 ) );
	}
	
	/**
	 * Most objects should already be formatted to the same type by method
	 * formatToComparable at this point if neither of them is null. This method
	 * will therefore be terminated pretty soon except for calling from method
	 * between with weird parameters like obj:String, op1:Double and op2:Date.
	 * 
	 * @param obj1
	 * @param obj2
	 * @return -1,0 and 1 standing for <,= and > respectively