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
"evalExpr() expr="
						+ LogUtil.toString( expr ) + ", source=" + source
						+ ", lineNo=" + 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 );