rem: if (callData.scriptTagBase != null) { DWREngine._batch.scriptTagBase = callData.scriptTagBase; delete callData.scriptTagBase; } 
add: if (callData.scriptTagBase != null) DWREngine._batch.scriptTagBase = callData.scriptTagBase; 
context: DWREngine._execute = function(path, scriptName, methodName, vararg_params) {  var singleShot = false;  if (DWREngine._batch == null) {    DWREngine.beginBatch();    singleShot = true;  }  // To make them easy to manipulate we copy the arguments into an args array  var args = [];  for (var i = 0; i < arguments.length - 3; i++) {    args[i] = arguments[i + 3];  }  // All the paths MUST be to the same servlet  if (DWREngine._batch.path == null) {    DWREngine._batch.path = path;  }  else {    if (DWREngine._batch.path != path) {      DWREngine._handleError("Can't batch requests to multiple DWR Servlets.");      return;    }  }  // From the other params, work out which is the function (or object with  // call meta-data) and which is the call parameters  var params;  var callData;  var firstArg = args[0];  var lastArg = args[args.length - 1];  if (typeof firstArg == "function") {    callData = { callback:args.shift() };    params = args;  }  else if (typeof lastArg == "function") {    callData = { callback:args.pop() };    params = args;  }  else if (lastArg != null && typeof lastArg == "object" && lastArg.callback != null && typeof lastArg.callback == "function") {    callData = args.pop();    params = args;  }  else if (firstArg == null) {    // This could be a null callback function, but if the last arg is also    // null then we can't tell which is the function unless there are only    // 2 args, in which case we don't care!    if (lastArg == null && args.length > 2) {        DWREngine._handleError("Ambiguous nulls at start and end of parameter list. Which is the callback function?");    }    callData = { callback:args.shift() };    params = args;  }  else if (lastArg == null) {    callData = { callback:args.pop() };    params = args;  }  else {    DWREngine._handleError("Missing callback function or metadata object.");    return;  }  // Get a unique ID for this call  var random = Math.floor(Math.random() * 10001);  var id = (random + "_" + new Date().getTime()).toString();  var prefix = "c" + DWREngine._batch.map.callCount + "-";  DWREngine._batch.ids.push(id);  // batchMetaData stuff the we allow in callMetaData for convenience  if (callData.method != null) {    DWREngine._batch.method = callData.method;    delete callData.method;  }  if (callData.verb != null) {    DWREngine._batch.verb = callData.verb;    delete callData.verb;  }  if (callData.async != null) {    DWREngine._batch.async = callData.async;    delete callData.async;  }  if (callData.timeout != null) {    DWREngine._batch.timeout = callData.timeout;    delete callData.timeout;  }  // callMetaData stuff that we handle with the rest of the batchMetaData  if (callData.preHook != null) {    DWREngine._batch.preHooks.unshift(callData.preHook);    delete callData.preHook;  }  if (callData.postHook != null) {    DWREngine._batch.postHooks.push(callData.postHook);    delete callData.postHook;  }  // ScriptTag method parameter - the scriptTagBase  if (callData.scriptTagBase != null) {    DWREngine._batch.scriptTagBase = callData.scriptTagBase;    delete callData.scriptTagBase;  }  // Default the error and warning handlers  if (callData.errorHandler == null) callData.errorHandler = DWREngine._errorHandler;  if (callData.warningHandler == null) callData.warningHandler = DWREngine._warningHandler;  // Save the callMetaData  DWREngine._handlersMap[id] = callData;  // Copy extra callData into the map  var data, prop;  for (prop in callData) {    data = callData[prop];    if (typeof data != "function") {      DWREngine._batch.map[prop] = "" + data;    }  }  // Add in the page and session ids  DWREngine._batch.map.httpSessionId = DWREngine._httpSessionId;  DWREngine._batch.map.scriptSessionId = DWREngine._scriptSessionId;  DWREngine._batch.map.page = window.location.pathname;  DWREngine._batch.map[prefix + "scriptName"] = scriptName;  DWREngine._batch.map[prefix + "methodName"] = methodName;  DWREngine._batch.map[prefix + "id"] = id;  // Serialize the parameters into batch.map  for (i = 0; i < params.length; i++) {    DWREngine._serializeAll(DWREngine._batch, [], params[i], prefix + "param" + i);  }  // Now we have finished remembering the call, we incr the call count  DWREngine._batch.map.callCount++;  if (singleShot) {    DWREngine.endBatch();  }};
meta: 266	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/266/5698e064fd7cfccfcf96b459e1b1024bad78f808/engine.js/buggy/java/org/directwebremoting/engine.js