toEval = toEval.replace(dwr.engine._scriptTagProtection, ""); 
if (toEval != null) toEval = toEval.replace(dwr.engine._scriptTagProtection, ""); 
dwr.engine._stateChange = function(batch) {  var toEval;  if (batch.completed) {    dwr.engine._debug("Error: _stateChange() with batch.completed");    return;  }  var req = batch.req;  try {    if (req.readyState != 4) return;  }  catch (ex) {    dwr.engine._handleWarning(batch, ex);    // It's broken - clear up and forget this call    dwr.engine._clearUp(batch);    return;  }  try {    var reply = req.responseText;    reply = dwr.engine._replyRewriteHandler(reply);    var status = req.status; // causes Mozilla to except on page moves    if (reply == null || reply == "") {      dwr.engine._handleWarning(batch, { name:"dwr.engine.missingData", message:"No data received from server" });    }    else if (status != 200) {      dwr.engine._handleError(batch, { name:"dwr.engine.http." + status, message:req.statusText });    }    else {      var contentType = req.getResponseHeader("Content-Type");      if (!contentType.match(/^text\/plain/) && !contentType.match(/^text\/javascript/)) {        if (contentType.match(/^text\/html/) && typeof batch.textHtmlHandler == "function") {          batch.textHtmlHandler();        }        else {          dwr.engine._handleWarning(batch, { name:"dwr.engine.invalidMimeType", message:"Invalid content type: '" + contentType + "'" });        }      }      else {        // Comet replies might have already partially executed        if (batch.isPoll && batch.map.partialResponse == dwr.engine._partialResponseYes) {          dwr.engine._processCometResponse(reply, batch);        }        else {          if (reply.search("//#DWR") == -1) {            dwr.engine._handleWarning(batch, { name:"dwr.engine.invalidReply", message:"Invalid reply from server" });          }          else {            toEval = reply;          }        }      }    }  }  catch (ex) {    dwr.engine._handleWarning(batch, ex);  }  dwr.engine._callPostHooks(batch);  // Outside of the try/catch so errors propogate normally:  dwr.engine._receivedBatch = batch;  toEval = toEval.replace(dwr.engine._scriptTagProtection, "");  dwr.engine._eval(toEval);  dwr.engine._receivedBatch = null;  dwr.engine._clearUp(batch);};
266	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/266/7fe6b85f4fb2af30d27b4d75f9c1bcf6b9f3a28a/engine.js/buggy/java/org/directwebremoting/engine.js