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
private static Object[] formatToComparable( Object obj,
				ExprTextAndValue op1, ExprTextAndValue op2 ) throws DataException
		{
			Object[] obArray = new Object[3];
			obArray[0] = obj;
			obArray[1] = op1.value;
			obArray[2] = op2.value;
			String expr4Exception = "";
			
			
			if ( isSameType( obj, obArray[1] ) )
			{
				if ( obArray[2] == null	|| ( obArray[2] != null && isSameType( obj, obArray[2] ) ) )
				{
					return obArray;
				}
			}
			if ( obj instanceof Number )
			{
				try
				{
					obArray[0] = DataTypeUtil.toDouble( obj );
					expr4Exception = op1.exprText;
					obArray[1] = DataTypeUtil.toDouble( obArray[1] );
					if ( obArray[2] != null )
					{
						expr4Exception = op2.exprText;
						obArray[2] = DataTypeUtil.toDouble( obArray[2] );
					}
				}