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
{
		Object resultObject = obj;
		Object resultOp1 = op1.value;
		Object resultOp2 = op2.value;
		Object[] obArray = MiscUtil.isComparable( obj, operator, op1, op2 );
		if ( obArray != null )
		{
			resultObject = obArray[0];
			resultOp1 = obArray[1];
			resultOp2 = obArray[2];
		}
		
		if ( logger.isLoggable( Level.FINER ) )
			logger.entering( 
				ScriptEvalUtil.class.getName( ),
				"evalConditionalExpr",
				"evalConditionalExpr() resultObject="
				+ LogUtil.toString( resultObject )
				+ ", operator=" + operator
				+ ( resultOp1 == null? null: ( ", resultOp1=" + LogUtil.toString( resultOp1 ) ) )
				+ ( resultOp2 == null? null: ( ", resultOp2=" + LogUtil.toString( resultOp2 ) ) ) 
				);
		boolean result = false;
		switch ( operator )
		{
			case IConditionalExpression.OP_EQ :
			    result = compare( resultObject, resultOp1 ) == 0;
				break;
			case IConditionalExpression.OP_NE :
			    result = compare( resultObject, resultOp1 ) != 0;