rem: var configStream = getWriteStream(getScriptFile("config.xml")); 
add: var configStream = getWriteStream(this.configFile); 
context:   this.save = function() {    var doc = document.implementation.createDocument("", "UserScriptConfig", null);        for (var i = 0, scriptObj = null; (scriptObj = this.scripts[i]); i++) {      var scriptNode = doc.createElement("Script");      for (var j = 0; j < scriptObj.includes.length; j++) {        var includeNode = doc.createElement("Include");        includeNode.appendChild(doc.createTextNode(scriptObj.includes[j]));        scriptNode.appendChild(doc.createTextNode("\n\t\t"));        scriptNode.appendChild(includeNode);      }      for (var j = 0; j < scriptObj.excludes.length; j++) {        var excludeNode = doc.createElement("Exclude");        excludeNode.appendChild(doc.createTextNode(scriptObj.excludes[j]));        scriptNode.appendChild(doc.createTextNode("\n\t\t"));        scriptNode.appendChild(excludeNode);      }      scriptNode.appendChild(doc.createTextNode("\n\t"));      scriptNode.setAttribute("filename", scriptObj.filename);      scriptNode.setAttribute("name", scriptObj.name);      scriptNode.setAttribute("namespace", scriptObj.namespace);      scriptNode.setAttribute("description", scriptObj.description);      scriptNode.setAttribute("enabled", scriptObj.enabled);      doc.firstChild.appendChild(doc.createTextNode("\n\t"));      doc.firstChild.appendChild(scriptNode);    }    doc.firstChild.appendChild(doc.createTextNode("\n"))    var configStream = getWriteStream(getScriptFile("config.xml"));    new XMLSerializer().serializeToStream(doc, configStream, "utf-8");    configStream.close();  }
meta: 4585	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4585/fec534de049cc4effd22b41bf1cfa71367d36fa3/config.js/buggy/src/content/config.js