otherDomainServer.setIndexHandler(defaultDirHandler); otherDomainServer.start(SERVER_PORT_OTHER_DOMAIN); 
function runServer(){  serverBasePath = Cc["@mozilla.org/file/local;1"]                     .createInstance(Ci.nsILocalFile);  var procDir = Cc["@mozilla.org/file/directory_service;1"]                  .getService(Ci.nsIProperties).get("CurProcD", Ci.nsIFile);  serverBasePath.initWithPath(procDir.parent.parent.path);  serverBasePath.append("_tests");  serverBasePath.append("testing");  serverBasePath.append("mochitest");  server = new nsHttpServer();  server.registerDirectory("/", serverBasePath);  if (environment["CLOSE_WHEN_DONE"])    server.registerPathHandler("/server/shutdown", serverShutdown);  server.setIndexHandler(defaultDirHandler);  server.start(SERVER_PORT);    // touch a file in the profile directory to indicate we're alive  var foStream = Cc["@mozilla.org/network/file-output-stream;1"]                   .createInstance(Ci.nsIFileOutputStream);  var serverAlive = Cc["@mozilla.org/file/local;1"]                      .createInstance(Ci.nsILocalFile);  serverAlive.initWithFile(serverBasePath);  serverAlive.append("mochitesttestingprofile");  // If we're running outside of the test harness, there might  // not be a test profile directory present  if (serverAlive.exists()) {    serverAlive.append("server_alive.txt");    foStream.init(serverAlive,                  0x02 | 0x08 | 0x20, 0664, 0); // write, create, truncate    data = "It's alive!";    foStream.write(data, data.length);    foStream.close();  }  makeTags();  //  // The following is threading magic to spin an event loop -- this has to  // happen manually in xpcshell for the server to actually work.  //  var thread = Cc["@mozilla.org/thread-manager;1"]                 .getService()                 .currentThread;  while (!server.isStopped())    thread.processNextEvent(true);  // Server stopped by /server/shutdown handler -- go through pending events  // and return.  // get rid of any pending requests  while (thread.hasPendingEvents())    thread.processNextEvent(true);}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/3c3e037df3df0c235fd5fc6ba2de2b2d219b3bd5/server.js/buggy/testing/mochitest/server.js