rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; // Register all locate* functions this.locatorFunctions = new Array(); for (var f in this) { if (typeof(this[f]) == 'function' && f.match(/^locate/)) { this.locatorFunctions.push(this[f]); } } }}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/28e92872d79dde130d1e6dfb1c795eb73f87a0ce/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js |
|
PageBot = function(pageWindow, browserBot) { this.currentWindow = pageWindow; this.browserBot = browserBot; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title}; modifyWindowToRecordAlerts(pageWindow, browserBot); //SPIKE factor this better via TDD function clearPageCache() { browserbot.currentPage = null; } if (window.addEventListener) { this.currentWindow.addEventListener("unload",clearPageCache, true); } else if (window.attachEvent) { this.currentWindow.attachEvent("onunload",clearPageCache); } // End SPIKE function modifyWindowToRecordAlerts(window, browserBot) { window.alert = function(alert){browserBot.recordAlert(alert);}; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ea6c40ffb9e8c41f6fb2610fd3e7a3abb6baa453/selenium-browserbot.js/buggy/javascript/selenium-browserbot.js |
||
this.locatorFunctions = new Array(); for (var f in this) { if (typeof(this[f]) == 'function' && f.match(/^locate/)) { this.locatorFunctions.push(this[f]); | this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; // Register all locate* functions this.locatorFunctions = new Array(); for (var f in this) { if (typeof(this[f]) == 'function' && f.match(/^locate/)) { this.locatorFunctions.push(this[f]); } } }}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/282b7aeb99ad005ea5dbd64f74b3b3890e58c578/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js |
var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; // Register all locate* functions this.locatorFunctions = new Array(); for (var f in this) { if (typeof(this[f]) == 'function' && f.match(/^locate/)) { this.locatorFunctions.push(this[f]); } } }}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/282b7aeb99ad005ea5dbd64f74b3b3890e58c578/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js |
|
throw new Error("Unrecognised locator type: '" + locatorType + "'"); | throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new Error("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { return this.locateElementByIdentifier(locator, inDocument) || this.locateElementByDomTraversal(locator, inDocument) || this.locateElementByXPath(locator, inDocument); }; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/39b01a6737325d783eaf2dbc5a138c33adb4c379/selenium-browserbot.js/clean/code/javascript/selenium-browserbot.js |
this.location = pageWindow.location.pathname; | this.location = pageWindow.location; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new Error("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { return this.locateElementByIdentifier(locator, inDocument) || this.locateElementByDomTraversal(locator, inDocument) || this.locateElementByXPath(locator, inDocument); }; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/1dbb8067586cf11d4a63e6b9c1f91c24fa609b12/selenium-browserbot.js/clean/code/javascript/selenium-browserbot.js |
this.location = pageWindow.location.pathname | this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title}; | PageBot = function(pageWindow, browserBot) { this.currentWindow = pageWindow; this.browserBot = browserBot; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/d29c3300057cc06e6959278a7a9672474b9dc998/selenium-browserbot.js/buggy/javascript/selenium-browserbot.js |
this.currentDocument = pageWindow.document; | var PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() { var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; }; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument, inWindow) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument, inWindow); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument, inWindow) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument, inWindow); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument, inWindow); } return this.locateElementByIdentifier(locator, inDocument, inWindow); };}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/f68bbe7b139ef983240d5f2c30b4cfaf2febeeb0/selenium-browserbot.js/clean/code/javascript/core/scripts/selenium-browserbot.js |
|
var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; | var t = this.document().title; if (typeof(t) == "string") { t = t.trim(); } return t; | var PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() { var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; }; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument, inWindow) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument, inWindow); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument, inWindow) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument, inWindow); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument, inWindow); } return this.locateElementByIdentifier(locator, inDocument, inWindow); };}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/f68bbe7b139ef983240d5f2c30b4cfaf2febeeb0/selenium-browserbot.js/clean/code/javascript/core/scripts/selenium-browserbot.js |
} this.document = function() { return this.currentWindow.document; | var PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() { var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; }; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument, inWindow) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument, inWindow); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument, inWindow) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument, inWindow); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument, inWindow); } return this.locateElementByIdentifier(locator, inDocument, inWindow); };}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/f68bbe7b139ef983240d5f2c30b4cfaf2febeeb0/selenium-browserbot.js/clean/code/javascript/core/scripts/selenium-browserbot.js |
|
this.locatorFunctions = new Array(); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; } }}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/50ae736c31d3d064179fea9c3d6a6a584a9c9df1/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js |
|
this.locatorFunctions.push(locatorFunction); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; } }}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/50ae736c31d3d064179fea9c3d6a6a584a9c9df1/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js |
|
/** * Find a locator based on a prefix. */ this.getLocator = function(prefix) { return this.locators[prefix]; }; /** * The implicit locator, that is used when no prefix is supplied. */ this.implicitLocator = function(locator, inDocument) { return this.getLocator("identifier")(locator, inDocument) || this.getLocator("dom")(locator, inDocument) || this.getLocator("xpath")(locator, inDocument); }; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; } }}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/50ae736c31d3d064179fea9c3d6a6a584a9c9df1/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js |
|
throw new Error("Unrecognised locator type: '" + locatorType + "'"); | throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new Error("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { return this.locateElementByIdentifier(locator, inDocument) || this.locateElementByDomTraversal(locator, inDocument) || this.locateElementByXPath(locator, inDocument); }; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/8204ef0e684c368119f602100144e47b160a21e4/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js |
} | } | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument); } return this.locateElementByIdentifier(locator, inDocument); }; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/2e116bdabb8431234b230eaf1a46e3ca7c75fb67/selenium-browserbot.js/clean/code/javascript/core/scripts/selenium-browserbot.js |
PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument); } return this.locateElementByIdentifier(locator, inDocument); }; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/2e116bdabb8431234b230eaf1a46e3ca7c75fb67/selenium-browserbot.js/clean/code/javascript/core/scripts/selenium-browserbot.js |
||
var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http: | var val = gmPrompt(manageBundle.getString("promptForNewPage.msg"), manageBundle.getString("promptForNewPage.defVal"), manageBundle.getString("promptForNewPage.title"));; | function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/c2503cae955e9455c938fbea453c84e7f15dedcb/pagescontrol.js/clean/src/chrome/chromeFiles/content/pagescontrol.js |
var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); | var val = gmPrompt(manageBundle.getString("promptForEdit.msg"), self.listbox.selectedItem.label, manageBundle.getString("promptForEdit.title")); | function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/c2503cae955e9455c938fbea453c84e7f15dedcb/pagescontrol.js/clean/src/chrome/chromeFiles/content/pagescontrol.js |
var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http: | var val = gmPrompt(manageBundle.getString("promptForNewPage.msg"), manageBundle.getString("promptForNewPage.defVal"), manageBundle.getString("promptForNewPage.title"));; | function PagesControl(ctlPages) { var document = ctlPages.ownerDocument; var includesBox = new PagesBox(document.getElementById("grpIncluded")); var excludesBox = new PagesBox(document.getElementById("grpExcluded")); this.populate = function(script) { includesBox.populate(script.includes); excludesBox.populate(script.excludes); } this.clear = function() { includesBox.clear(); excludesBox.clear(); } function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/c2503cae955e9455c938fbea453c84e7f15dedcb/pagescontrol.js/clean/src/chrome/chromeFiles/content/pagescontrol.js |
var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); | var val = gmPrompt(manageBundle.getString("promptForEdit.msg"), self.listbox.selectedItem.label, manageBundle.getString("promptForEdit.title")); | function PagesControl(ctlPages) { var document = ctlPages.ownerDocument; var includesBox = new PagesBox(document.getElementById("grpIncluded")); var excludesBox = new PagesBox(document.getElementById("grpExcluded")); this.populate = function(script) { includesBox.populate(script.includes); excludesBox.populate(script.excludes); } this.clear = function() { includesBox.clear(); excludesBox.clear(); } function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/c2503cae955e9455c938fbea453c84e7f15dedcb/pagescontrol.js/clean/src/chrome/chromeFiles/content/pagescontrol.js |
var pageUnloadDetector = function() {pageUnloading = true;}; | var pageUnloadDetector = function() { pageUnloading = true; }; | var pageUnloadDetector = function() {pageUnloading = true;}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/0e14a53996e4d4f6077da9fa5f25415f4fff0108/selenium-browserbot.js/buggy/code/javascript/core/scripts/selenium-browserbot.js |
var pageUnloadDetector = function() { pageUnloading = true; }; | var pageUnloadDetector = function() {pageUnloading = true;}; | var pageUnloadDetector = function() { pageUnloading = true; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/6b0b260c628dcdbf842d816728bb3bdcc6219faa/selenium-browserbot.js/buggy/code/javascript/core/scripts/selenium-browserbot.js |
var lastIndex = commandOrCommentRegexp.lastIndex; | lastIndex = commandOrCommentRegexp.lastIndex; | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); var lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(commandOrCommentRegexp.lastIndex); //log.debug("header=" + this.header); //log.debug("footer=" + this.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/57e82436dfcb749a0e13ead9ebe1dd5a149954b6/html.js/buggy/src/content/formats/html.js |
testCase.footer = doc.substring(commandOrCommentRegexp.lastIndex); | testCase.footer = doc.substring(lastIndex); log.debug("header=" + testCase.header); log.debug("footer=" + testCase.footer); | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); var lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(commandOrCommentRegexp.lastIndex); //log.debug("header=" + this.header); //log.debug("footer=" + this.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/57e82436dfcb749a0e13ead9ebe1dd5a149954b6/html.js/buggy/src/content/formats/html.js |
eval(options.commandLoadScript); | eval(options.commandLoadScript, {command: command, result: result}); | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; var lastIndex; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(lastIndex); log.debug("header=" + testCase.header); log.debug("footer=" + testCase.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/19cfca439e737e1ded4ec3b9399a43854af889d2/html.js/buggy/src/content/formats/html.js |
eval(options.commentLoadScript); | eval(options.commentLoadScript, {comment: comment, result: result}); | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; var lastIndex; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(lastIndex); log.debug("header=" + testCase.header); log.debug("footer=" + testCase.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/19cfca439e737e1ded4ec3b9399a43854af889d2/html.js/buggy/src/content/formats/html.js |
log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); | function parse(testCase, source) { var commandLoadPattern = options.commandLoadPattern; var commandRegexp = new RegExp(commandLoadPattern, 'i'); var commentRegexp = new RegExp("^" + options.commentLoadPattern, 'i'); var doc = source; var result; var commands = []; var command; var first = true; var i; //var vars = this.options.commandLoadVars; while (true) { if ((result = commandRegexp.exec(doc)) != null) { if (first) { // treat text before the first match as header i = doc.indexOf(result[0]); testCase.header = doc.substr(0, i); doc = doc.substr(i); } //log.debug("result=" + result); command = new Command(); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); doc = doc.substr(result[0].length); if (first) { commandRegexp = new RegExp("^" + commandLoadPattern, 'i'); } first = false; } else if ((result = commentRegexp.exec(doc)) != null) { if (first) { // no command found, but found a comment break; } var comment = new Comment(); eval(options.commentLoadScript); commands.push(comment); doc = doc.substr(result[0].length); } else { break; } } if (commands.length > 0) { testCase.footer = doc; //log.debug("header=" + this.header); //log.debug("footer=" + this.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/697e11e20a178e7a4685ec85bc8ac8406754eafd/html.js/buggy/src/content/formats/html.js |
|
browser = document.getElementById( 'browser' ); | browser_iesuxx = document.getElementById( 'browser' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { answer = req.responseXML.documentElement; browser = document.getElementById( 'browser' ); pos = document.createElement( "div" ); elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+elt.getAttribute( 'path' )+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/c3537d9355bf307bfd63b4c1d319a0777cf80679/functions.js/buggy/share/http/functions.js |
while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); | while( browser_iesuxx.hasChildNodes() ) browser_iesuxx.removeChild( browser.firstChild ); browser_iesuxx.appendChild( pos ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { answer = req.responseXML.documentElement; browser = document.getElementById( 'browser' ); pos = document.createElement( "div" ); elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+elt.getAttribute( 'path' )+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/c3537d9355bf307bfd63b4c1d319a0777cf80679/functions.js/buggy/share/http/functions.js |
item.setAttribute( 'class', 'browser' ); | setclass( item, 'browser' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/610ac485f763ba73af5065423814cbd1fa9131b2/functions.js/buggy/share/http/js/functions.js |
item.setAttribute( 'class', 'browser' ); | setclass( item, 'browser' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/610ac485f763ba73af5065423814cbd1fa9131b2/functions.js/buggy/share/http/js/functions.js |
pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); | var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/978d39b3442d34db2be88322500274a0f50cccd5/functions.js/buggy/share/http/js/functions.js |
pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); | item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/978d39b3442d34db2be88322500274a0f50cccd5/functions.js/buggy/share/http/js/functions.js |
pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); | item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/978d39b3442d34db2be88322500274a0f50cccd5/functions.js/buggy/share/http/js/functions.js |
pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); | item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/978d39b3442d34db2be88322500274a0f50cccd5/functions.js/buggy/share/http/js/functions.js |
pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); | var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/978d39b3442d34db2be88322500274a0f50cccd5/functions.js/buggy/share/http/js/functions.js |
while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); | clear_children( browser ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/978d39b3442d34db2be88322500274a0f50cccd5/functions.js/buggy/share/http/js/functions.js |
browser_iesuxx.removeChild( browser.firstChild ); | browser_iesuxx.removeChild( browser_iesuxx.firstChild ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { answer = req.responseXML.documentElement; browser_iesuxx = document.getElementById( 'browser' ); pos = document.createElement( "div" ); elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+elt.getAttribute( 'path' )+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser_iesuxx.hasChildNodes() ) browser_iesuxx.removeChild( browser.firstChild ); browser_iesuxx.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/234ce23992e3a26a3b039c321ded83f46885de6d/functions.js/buggy/share/http/functions.js |
item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); | item.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(escapebackslashes(elt.getAttribute( 'path' )))+'\');'); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); setclass( item, 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); setclass( item, 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/892f3cf9ce0972ff9868e9dfe498bc3d24c55a4e/functions.js/buggy/share/http/js/functions.js |
item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); | item.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(escapebackslashes(elt.getAttribute( 'path' )))+'\');' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); setclass( item, 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); setclass( item, 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/892f3cf9ce0972ff9868e9dfe498bc3d24c55a4e/functions.js/buggy/share/http/js/functions.js |
item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); | item.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(escapebackslashes(elt.getAttribute( 'path' )))+'\');'); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); setclass( item, 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); setclass( item, 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/892f3cf9ce0972ff9868e9dfe498bc3d24c55a4e/functions.js/buggy/share/http/js/functions.js |
if(msgtxt[i].length==0) /* Header delimiter */ | if(msgtxt[i].length==0) | function parse_msg_header(msgtxt){ var hdr={}; for(i in msgtxt) { if(msgtxt[i].length==0) /* Header delimiter */ break; var match = msgtxt[i].match(/\s*(\S+)\s*:\s*(.*)/); hdr[match[0]]=match[1]; } return(hdr);} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3b7094fc88f7485cd54c8f6df11a05741a5d6d84/mailproc_util.js/buggy/load/mailproc_util.js |
var match = msgtxt[i].match(/\s*(\S+)\s*:\s*(.*)/); hdr[match[0]]=match[1]; | var match = msgtxt[i].match(/(\S+)\s*:\s*(.*)/); if(match) hdr[last_field=match[1]]=match[2]; else if(last_field) hdr[last_field]+=msgtxt[i]; | function parse_msg_header(msgtxt){ var hdr={}; for(i in msgtxt) { if(msgtxt[i].length==0) /* Header delimiter */ break; var match = msgtxt[i].match(/\s*(\S+)\s*:\s*(.*)/); hdr[match[0]]=match[1]; } return(hdr);} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3b7094fc88f7485cd54c8f6df11a05741a5d6d84/mailproc_util.js/buggy/load/mailproc_util.js |
if(line.charAt(0)==' ' || line.charAt(0)=='\t' && hdr.field_list) { | if((line.charAt(0)==' ' || line.charAt(0)=='\t') && hdr.field_list) { | function parse_news_header(hdr, line){ /* Parse header lines */ if(line.charAt(0)==' ' || line.charAt(0)=='\t' && hdr.field_list) { /* "folded" header field */ hdr.field_list.push( { type: RFC822HEADER, data: line } ); return; } if((sp=line.indexOf(':'))==-1) return; data=line.slice(sp+1); while(data.charAt(0)==' ') // trim prepended spaces data=data.slice(1); data=truncsp(data); // trim trailing spaces line=line.substr(0,sp); while(line.charAt(0)==' ') // trim prepended spaces line=line.slice(1); switch(line.toLowerCase()) { case "to": case "apparently-to": case "x-comment-to": hdr.to=data; break; case "newsgroups": hdr.newsgroups=data; break; case "path": hdr.path=data; break; case "from": hdr.from=data; break; case "organization": hdr.from_org=data; break; case "reply-to": hdr.replyto_net_type=NET_INTERNET; hdr.replyto=data; break; case "date": hdr.date=data; break; case "subject": hdr.subject=data; break; case "message-id": hdr.id=data; break; case "references": hdr.reply_id=data; break; case "x-gateway": hdr.gateway=data; break; /* FidoNet header fields */ case "x-ftn-pid": hdr.ftn_pid=data; break; case "x-ftn-tid": hdr.ftn_tid=data; break; case "x-ftn-area": hdr.ftn_area=data; break; case "x-ftn-flags": hdr.ftn_flags=data; break; case "x-ftn-msgid": hdr.ftn_msgid=data; break; case "x-ftn-reply": hdr.ftn_reply=data; break; default: if(hdr.field_list==undefined) hdr.field_list=new Array(); hdr.field_list.push( { type: RFC822HEADER, data: line + ": " + data } ); break; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f6382a99f7186e7d226930ba6e2626c162ac62c2/newsutil.js/clean/load/newsutil.js |
log(LOG_WARNING,"!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config."); | log(LOG_WARNING,"!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config."); | function parse_nline_flags(flags) { var nline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "q": nline_flags |= NLINE_CHECK_QWKPASSWD; break; case "w": nline_flags |= NLINE_IS_QWKMASTER; break; case "k": nline_flags |= NLINE_CHECK_WITH_QWKMASTER; break; case "d": nline_flags |= NLINE_IS_DREAMFORGE; break; default: log(LOG_WARNING,"!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config."); break; } } return nline_flags;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/03cf2ad9cc981ddecb083920f6876e8a26b9be78/ircd.js/buggy/ircd.js |
nline_flags |= NLINE_IS_DREAMHAVEN; | nline_flags |= NLINE_IS_DREAMFORGE; | function parse_nline_flags(flags) { var nline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "q": nline_flags |= NLINE_CHECK_QWKPASSWD; break; case "w": nline_flags |= NLINE_IS_QWKMASTER; break; case "k": nline_flags |= NLINE_CHECK_WITH_QWKMASTER; break; case "d": nline_flags |= NLINE_IS_DREAMHAVEN; break; default: log(LOG_WARNING,"!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config."); break; } } return nline_flags;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/c4161b4238ac188c25d8933c176e550453eec07c/ircd.js/clean/ircd.js |
break; case "c": nline_flags |= NLINE_CAN_CLINE; | function parse_nline_flags(flags) { var nline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "q": nline_flags |= NLINE_CHECK_QWKPASSWD; break; case "c": nline_flags |= NLINE_CAN_CLINE; break; default: log("!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config."); break; } } return nline_flags;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a697289b2285a18656115e68c62bcc033aa5b402/ircd.js/clean/ircd.js |
|
log(LOG_WARNING,"!WARNING Unknown O:Line flag '" + flags[thisflag] + "' in config."); | log(LOG_WARNING,"!WARNING Unknown O:Line flag '" + flags[thisflag] + "' in config."); | function parse_oline_flags(flags) { var oline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "r": oline_flags |= OLINE_CAN_REHASH; break; case "R": oline_flags |= OLINE_CAN_RESTART; break; case "D": oline_flags |= OLINE_CAN_DIE; break; case "g": oline_flags |= OLINE_CAN_GLOBOPS; break; case "w": oline_flags |= OLINE_CAN_WALLOPS; break; case "l": oline_flags |= OLINE_CAN_LOCOPS; break; case "c": oline_flags |= OLINE_CAN_LSQUITCON; break; case "C": oline_flags |= OLINE_CAN_GSQUITCON; break; case "k": oline_flags |= OLINE_CAN_LKILL; break; case "K": oline_flags |= OLINE_CAN_GKILL; break; case "b": oline_flags |= OLINE_CAN_KLINE; break; case "B": oline_flags |= OLINE_CAN_UNKLINE; break; case "n": oline_flags |= OLINE_CAN_LGNOTICE; break; case "N": oline_flags |= OLINE_CAN_GGNOTICE; break; case "u": oline_flags |= OLINE_CAN_UMODEC; case "A": case "a": case "f": case "F": break; // All reserved for future use. case "s": oline_flags |= OLINE_CAN_CHATOPS; break; case "S": oline_flags |= OLINE_CHECK_SYSPASSWD; break; case "x": case "X": oline_flags |= OLINE_CAN_DEBUG; break; case "O": oline_flags |= OLINE_IS_GOPER; oline_flags |= OLINE_CAN_GSQUITCON; oline_flags |= OLINE_CAN_GKILL; oline_flags |= OLINE_CAN_GGNOTICE; oline_flags |= OLINE_CAN_CHATOPS; case "o": oline_flags |= OLINE_CAN_REHASH; oline_flags |= OLINE_CAN_GLOBOPS; oline_flags |= OLINE_CAN_WALLOPS; oline_flags |= OLINE_CAN_LOCOPS; oline_flags |= OLINE_CAN_LSQUITCON; oline_flags |= OLINE_CAN_LKILL; oline_flags |= OLINE_CAN_KLINE; oline_flags |= OLINE_CAN_UNKLINE; oline_flags |= OLINE_CAN_LGNOTICE; oline_flags |= OLINE_CAN_UMODEC; break; default: log(LOG_WARNING,"!WARNING Unknown O:Line flag '" + flags[thisflag] + "' in config."); break; } } return oline_flags;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/03cf2ad9cc981ddecb083920f6876e8a26b9be78/ircd.js/buggy/ircd.js |
oline_flags |= OLINE_IS_GOPER; | function parse_oline_flags(flags) { var oline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "r": oline_flags |= OLINE_CAN_REHASH; break; case "R": oline_flags |= OLINE_CAN_RESTART; break; case "D": oline_flags |= OLINE_CAN_DIE; break; case "g": oline_flags |= OLINE_CAN_GLOBOPS; break; case "w": oline_flags |= OLINE_CAN_WALLOPS; break; case "l": oline_flags |= OLINE_CAN_LOCOPS; break; case "c": oline_flags |= OLINE_CAN_LSQUITCON; break; case "C": oline_flags |= OLINE_CAN_GSQUITCON; break; case "k": oline_flags |= OLINE_CAN_LKILL; break; case "K": oline_flags |= OLINE_CAN_GKILL; break; case "b": oline_flags |= OLINE_CAN_KLINE; break; case "B": oline_flags |= OLINE_CAN_UNKLINE; break; case "n": oline_flags |= OLINE_CAN_LGNOTICE; break; case "N": oline_flags |= OLINE_CAN_GGNOTICE; break; case "A": case "a": case "u": case "f": case "F": break; // All reserved for future use. case "s": oline_flags |= OLINE_CAN_CHATOPS; break; case "S": oline_flags |= OLINE_CHECK_SYSPASSWD; break; case "x": case "X": oline_flags |= OLINE_CAN_DEBUG; break; case "O": oline_flags |= OLINE_CAN_GSQUITCON; oline_flags |= OLINE_CAN_GKILL; oline_flags |= OLINE_CAN_GGNOTICE; oline_flags |= OLINE_CAN_CHATOPS; case "o": oline_flags |= OLINE_CAN_REHASH; oline_flags |= OLINE_CAN_GLOBOPS; oline_flags |= OLINE_CAN_WALLOPS; oline_flags |= OLINE_CAN_LOCOPS; oline_flags |= OLINE_CAN_LSQUITCON; oline_flags |= OLINE_CAN_LKILL; oline_flags |= OLINE_CAN_KLINE; oline_flags |= OLINE_CAN_UNKLINE; oline_flags |= OLINE_CAN_LGNOTICE; break; default: log("!WARNING Unknown O:Line flag '" + flags[thisflag] + "' in config."); break; } } return oline_flags;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
|
status = req.responseXML.documentElement; document.getElementById( 'time' ).textContent = format_time( status.getElementsByTagName( 'time' )[0].firstChild.data ); document.getElementById( 'length' ).textContent = format_time( status.getElementsByTagName( 'length' )[0].firstChild.data ); if( status.getElementsByTagName( 'volume' ).length != 0 ) document.getElementById( 'volume' ).textContent = Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+"%"; document.getElementById( 'state' ).textContent = status.getElementsByTagName( 'state' )[0].firstChild.data; if( status.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) | status_iesuxx = req.responseXML.documentElement; set_text( 'time', format_time( status_iesuxx.getElementsByTagName( 'time' )[0].firstChild.data ) ); set_text( 'length', format_time( status_iesuxx.getElementsByTagName( 'length' )[0].firstChild.data ) ); if( status_iesuxx.getElementsByTagName( 'volume' ).length != 0 ) set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' ); set_text( 'state', status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data ); if( status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) | function parse_status(){ if( req.readyState == 4 ) { if( req.status == 200 ) { status = req.responseXML.documentElement; document.getElementById( 'time' ).textContent = format_time( status.getElementsByTagName( 'time' )[0].firstChild.data ); document.getElementById( 'length' ).textContent = format_time( status.getElementsByTagName( 'length' )[0].firstChild.data ); if( status.getElementsByTagName( 'volume' ).length != 0 ) document.getElementById( 'volume' ).textContent = Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+"%"; document.getElementById( 'state' ).textContent = status.getElementsByTagName( 'state' )[0].firstChild.data; if( status.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/pause.png' ); } else { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/play.png' ); } } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/c3537d9355bf307bfd63b4c1d319a0777cf80679/functions.js/buggy/share/http/functions.js |
set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' ); | set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+'%' ); | function parse_status(){ if( req.readyState == 4 ) { if( req.status == 200 ) { status_iesuxx = req.responseXML.documentElement; new_time = status_iesuxx.getElementsByTagName( 'time' )[0].firstChild.data; if( old_time > new_time ) setTimeout('update_playlist()',50); old_time = new_time; set_text( 'time', format_time( new_time ) ); set_text( 'length', format_time( status_iesuxx.getElementsByTagName( 'length' )[0].firstChild.data ) ); if( status_iesuxx.getElementsByTagName( 'volume' ).length != 0 ) set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' ); set_text( 'state', status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data ); if( status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/pause.png' ); } else { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/play.png' ); } } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/5903fe3dd392a1b16b1db88c40cc61b89bd9343c/functions.js/clean/share/http/functions.js |
var title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; var description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; | /* Provide defaults for title and description */ var title = "No title"; try { title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; } catch (e) { alert(e); } var description = "No description"; try { description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; } catch (e) { alert(e); } | parseData: function(ajaxRequest) { var doc = ajaxRequest.responseXML; if (!doc || ajaxRequest.fileType!="XML") { doc = OpenLayers.parseXMLString(ajaxRequest.responseText); } this.name = doc.getElementsByTagName("title")[0].firstChild.nodeValue; var itemlist = doc.getElementsByTagName('item'); for (var i = 0; i < itemlist.length; i++) { var data = {}; var point = OpenLayers.Util.getNodes(itemlist[i], 'georss:point'); var lat = OpenLayers.Util.getNodes(itemlist[i], 'geo:lat'); var lon = OpenLayers.Util.getNodes(itemlist[i], 'geo:long'); if (point.length > 0) { var location = point[0].firstChild.nodeValue.split(" "); if (location.length !=2) { var location = point[0].firstChild.nodeValue.split(","); } } else if (lat.length > 0 && lon.length > 0) { var location = [parseFloat(lat[0].firstChild.nodeValue), parseFloat(lon[0].firstChild.nodeValue)]; } else { continue; } location = new OpenLayers.LonLat(parseFloat(location[1]), parseFloat(location[0])); var title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; var description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; try { var link = OpenLayers.Util.getNodes(itemlist[i], "link")[0].firstChild.nodeValue; } catch (e) { } data.icon = OpenLayers.Marker.defaultIcon(); data.popupSize = new OpenLayers.Size(250, 100); if ((title != null) && (description != null)) { contentHTML = "<br />"; contentHTML += "<div style='margin: -0.5em 0.5em 0.5em 0.5em'>" contentHTML += "<div style='height: 1.3em; overflow: hidden'>"; contentHTML += "<span style='font-size: 1.2em; font-weight: bold'>"; if (link) contentHTML += "<a href='"+link+"' target='_blank'>"; contentHTML += title; if (link) contentHTML += "</a>"; contentHTML += "</span>"; contentHTML += "</div>"; contentHTML += "<span style='font-size: 0.7em; align:center'>"; contentHTML += description; contentHTML += "</span>"; contentHTML += "</div>" data['popupContentHTML'] = contentHTML; //data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>'; } var feature = new OpenLayers.Feature(this, location, data); this.features.push(feature); var marker = feature.createMarker(); marker.events.register('click', feature, this.markerClick); this.addMarker(marker); } }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/d1ac37984e625924c574a1ac9645ac0baffc97e2/GeoRSS.js/clean/lib/OpenLayers/Layer/GeoRSS.js |
var title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; var description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; | /* Provide defaults for title and description */ var title = "No title"; try { title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; } catch (e) { alert(e); } var description = "No description"; try { description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; } catch (e) { alert(e); } | parseData: function(ajaxRequest) { var doc = ajaxRequest.responseXML; if (!doc || ajaxRequest.fileType!="XML") { doc = OpenLayers.parseXMLString(ajaxRequest.responseText); } this.name = doc.getElementsByTagName("title")[0].firstChild.nodeValue; var itemlist = doc.getElementsByTagName('item'); for (var i = 0; i < itemlist.length; i++) { var data = {}; var point = OpenLayers.Util.getNodes(itemlist[i], 'georss:point'); var lat = OpenLayers.Util.getNodes(itemlist[i], 'geo:lat'); var lon = OpenLayers.Util.getNodes(itemlist[i], 'geo:long'); if (point.length > 0) { var location = point[0].firstChild.nodeValue.split(" "); if (location.length !=2) { var location = point[0].firstChild.nodeValue.split(","); } } else if (lat.length > 0 && lon.length > 0) { var location = [parseFloat(lat[0].firstChild.nodeValue), parseFloat(lon[0].firstChild.nodeValue)]; } else { continue; } location = new OpenLayers.LonLat(parseFloat(location[1]), parseFloat(location[0])); var title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; var description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; try { var link = OpenLayers.Util.getNodes(itemlist[i], "link")[0].firstChild.nodeValue; } catch (e) { } data.icon = OpenLayers.Marker.defaultIcon(); data.popupSize = new OpenLayers.Size(250, 100); if ((title != null) && (description != null)) { contentHTML = "<br />"; contentHTML += "<div style='margin: -0.5em 0.5em 0.5em 0.5em'>" contentHTML += "<div style='height: 1.3em; overflow: hidden'>"; contentHTML += "<span style='font-size: 1.2em; font-weight: bold'>"; if (link) contentHTML += "<a href='"+link+"' target='_blank'>"; contentHTML += title; if (link) contentHTML += "</a>"; contentHTML += "</span>"; contentHTML += "</div>"; contentHTML += "<span style='font-size: 0.7em; align:center'>"; contentHTML += description; contentHTML += "</span>"; contentHTML += "</div>" data['popupContentHTML'] = contentHTML; //data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>'; } var feature = new OpenLayers.Feature(this, location, data); this.features.push(feature); var marker = feature.createMarker(); marker.events.register('click', feature, this.markerClick); this.addMarker(marker); } }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/d1ac37984e625924c574a1ac9645ac0baffc97e2/GeoRSS.js/clean/lib/OpenLayers/Layer/GeoRSS.js |
var url_parts = url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); | var url_parts = ((url.substring(0,4)).toLowerCase() == "file") ? url.match(/(file:[\/]{2,3}(\w|\.|-|_|\/)+)\/(.*)/) : url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); | function ParsedURL(url){ // Since we're getting the URL from the browser, we're safe to assume the URL is already well formatted // and so there is no need for more sophisticated regular expression here var url_parts = url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); // the domain here is considered the whole http://www.example.org:8000 string for display purposes this.domain = url_parts[1]; // the relative path is everything following the domain this.relativePath = "/" + url_parts[5];} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/d58e2ff09f5f9dfa667b1ee643dd8bf8f74295e0/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
this.relativePath = "/" + url_parts[5]; | this.relativePath = (url_parts[5] === undefined) ? "/" + url_parts[3] : "/" + url_parts[5]; | function ParsedURL(url){ // Since we're getting the URL from the browser, we're safe to assume the URL is already well formatted // and so there is no need for more sophisticated regular expression here var url_parts = url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); // the domain here is considered the whole http://www.example.org:8000 string for display purposes this.domain = url_parts[1]; // the relative path is everything following the domain this.relativePath = "/" + url_parts[5];} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/d58e2ff09f5f9dfa667b1ee643dd8bf8f74295e0/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
if (data.substring(0,1) != '{') { | if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) { | function parseJson(data) { if (data.substring(0,1) != '{') { return { status: 0, data: data.length ? data : 'Unspecified error' }; } return eval('(' + data + ');');} | 3650 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3650/7bacdb435369334dd78a6dae5498338fa90f96ac/drupal.js/buggy/misc/drupal.js |
debug("parseQuery: " + key + ' from ' + theQuery); | function parseQuery(key) { var theIdx = location.href.indexOf('?'); if (theIdx > -1) { var theQuery = location.href.substring(theIdx+1); //alert("parseQuery: " + key + ' from ' + theQuery); theIdx = theQuery.indexOf(key); if (theIdx > -1) { // parse past the key and the '=' var theValue = theQuery.substring(theIdx + key.length + 1); // stop at the terminating ';' or '&', if present theIdx = theValue.indexOf('&'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } theIdx = theValue.indexOf(';'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } //alert("parseQuery: " + key + ' = ' + theValue); return unescape(theValue); } // if theIdx } // if theQuery} // parseQuery | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
debug("parseQuery: " + key + ' = ' + theValue); | function parseQuery(key) { var theIdx = location.href.indexOf('?'); if (theIdx > -1) { var theQuery = location.href.substring(theIdx+1); //alert("parseQuery: " + key + ' from ' + theQuery); theIdx = theQuery.indexOf(key); if (theIdx > -1) { // parse past the key and the '=' var theValue = theQuery.substring(theIdx + key.length + 1); // stop at the terminating ';' or '&', if present theIdx = theValue.indexOf('&'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } theIdx = theValue.indexOf(';'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } //alert("parseQuery: " + key + ' = ' + theValue); return unescape(theValue); } // if theIdx } // if theQuery} // parseQuery | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/469474651c3f770b832f583fd47778d445b5bf5a/cq.js/buggy/cq.js |
|
r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), ''); | r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), 'i'); | parseRuleStr : function(s) { var ta, p, r, a, i, x, px, t, tn, y, av, or = tinyMCE.clearArray(new Array()), dv; if (s == null || s.length == 0) return or; ta = s.split(','); for (x=0; x<ta.length; x++) { s = ta[x]; if (s.length == 0) continue; // Split tag/attrs p = this.split(/\[|\]/, s); if (p == null || p.length < 1) t = s.toUpperCase(); else t = p[0].toUpperCase(); // Handle all tag names tn = this.split('/', t); for (y=0; y<tn.length; y++) { r = {}; r.tag = tn[y]; r.forceAttribs = null; r.defaultAttribs = null; r.validAttribValues = null; // Handle prefixes px = r.tag.charAt(0); r.forceOpen = px == '+'; r.removeEmpty = px == '-'; r.fill = px == '#'; r.tag = r.tag.replace(/\+|-|#/g, ''); r.oTagName = tn[0].replace(/\+|-|#/g, '').toLowerCase(); r.isWild = new RegExp('\\*|\\?|\\+', 'g').test(r.tag); r.validRe = new RegExp(this._wildcardToRe('^' + r.tag + '$')); // Setup valid attributes if (p.length > 1) { r.vAttribsRe = '^('; a = this.split(/\|/, p[1]); for (i=0; i<a.length; i++) { t = a[i]; av = new RegExp('(=|:|<)(.*?)$').exec(t); t = t.replace(new RegExp('(=|:|<).*?$'), ''); if (av && av.length > 0) { if (av[0].charAt(0) == ':') { if (!r.forceAttribs) r.forceAttribs = tinyMCE.clearArray(new Array()); r.forceAttribs[t.toLowerCase()] = av[0].substring(1); } else if (av[0].charAt(0) == '=') { if (!r.defaultAttribs) r.defaultAttribs = tinyMCE.clearArray(new Array()); dv = av[0].substring(1); r.defaultAttribs[t.toLowerCase()] = dv == "" ? "mce_empty" : dv; } else if (av[0].charAt(0) == '<') { if (!r.validAttribValues) r.validAttribValues = tinyMCE.clearArray(new Array()); r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), ''); } } r.vAttribsRe += '' + t.toLowerCase() + (i != a.length - 1 ? '|' : ''); a[i] = t.toLowerCase(); } r.vAttribsRe += ')$'; r.vAttribsRe = this._wildcardToRe(r.vAttribsRe); r.vAttribsReIsWild = new RegExp('\\*|\\?|\\+', 'g').test(r.vAttribsRe); r.vAttribsRe = new RegExp(r.vAttribsRe); r.vAttribs = a.reverse(); //tinyMCE.debug(r.tag, r.oTagName, r.vAttribsRe, r.vAttribsReWC); } else { r.vAttribsRe = ''; r.vAttribs = tinyMCE.clearArray(new Array()); r.vAttribsReIsWild = false; } or[r.tag] = r; } } return or; }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
if (r.reqAttribsRe) r.reqAttribsRe = new RegExp(r.reqAttribsRe + ')=\"', 'g'); | parseRuleStr : function(s) { var ta, p, r, a, i, x, px, t, tn, y, av, or = tinyMCE.clearArray(new Array()), dv; if (s == null || s.length == 0) return or; ta = s.split(','); for (x=0; x<ta.length; x++) { s = ta[x]; if (s.length == 0) continue; // Split tag/attrs p = this.split(/\[|\]/, s); if (p == null || p.length < 1) t = s.toUpperCase(); else t = p[0].toUpperCase(); // Handle all tag names tn = this.split('/', t); for (y=0; y<tn.length; y++) { r = {}; r.tag = tn[y]; r.forceAttribs = null; r.defaultAttribs = null; r.validAttribValues = null; // Handle prefixes px = r.tag.charAt(0); r.forceOpen = px == '+'; r.removeEmpty = px == '-'; r.fill = px == '#'; r.tag = r.tag.replace(/\+|-|#/g, ''); r.oTagName = tn[0].replace(/\+|-|#/g, '').toLowerCase(); r.isWild = new RegExp('\\*|\\?|\\+', 'g').test(r.tag); r.validRe = new RegExp(this._wildcardToRe('^' + r.tag + '$')); // Setup valid attributes if (p.length > 1) { r.vAttribsRe = '^('; a = this.split(/\|/, p[1]); for (i=0; i<a.length; i++) { t = a[i]; av = new RegExp('(=|:|<)(.*?)$').exec(t); t = t.replace(new RegExp('(=|:|<).*?$'), ''); if (av && av.length > 0) { if (av[0].charAt(0) == ':') { if (!r.forceAttribs) r.forceAttribs = tinyMCE.clearArray(new Array()); r.forceAttribs[t.toLowerCase()] = av[0].substring(1); } else if (av[0].charAt(0) == '=') { if (!r.defaultAttribs) r.defaultAttribs = tinyMCE.clearArray(new Array()); dv = av[0].substring(1); r.defaultAttribs[t.toLowerCase()] = dv == "" ? "mce_empty" : dv; } else if (av[0].charAt(0) == '<') { if (!r.validAttribValues) r.validAttribValues = tinyMCE.clearArray(new Array()); r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), ''); } } r.vAttribsRe += '' + t.toLowerCase() + (i != a.length - 1 ? '|' : ''); a[i] = t.toLowerCase(); } r.vAttribsRe += ')$'; r.vAttribsRe = this._wildcardToRe(r.vAttribsRe); r.vAttribsReIsWild = new RegExp('\\*|\\?|\\+', 'g').test(r.vAttribsRe); r.vAttribsRe = new RegExp(r.vAttribsRe); r.vAttribs = a.reverse(); //tinyMCE.debug(r.tag, r.oTagName, r.vAttribsRe, r.vAttribsReWC); } else { r.vAttribsRe = ''; r.vAttribs = tinyMCE.clearArray(new Array()); r.vAttribsReIsWild = false; } or[r.tag] = r; } } return or; }, | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/tiny_mce_src.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js |
|
if(style[property]) styleRules[property] = style[property]; | if(style[property]) styleRules[property] = style[property]; | String.prototype.parseStyle = function(){ var element = Element.extend(document.createElement('div')); element.innerHTML = '<div style="' + this + '"></div>'; var style = element.down().style, styleRules = $H(); Element.CSS_PROPERTIES.each(function(property){ if(style[property]) styleRules[property] = style[property]; }); var result = $H(); styleRules.each(function(pair){ var property = pair[0], value = pair[1], unit = null; if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } else if(Element.CSS_LENGTH.test(value)) var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); }.bind(this)); return result;}; | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/2ee7ad789e4782f0bfb6757c6989a3000962b116/effects.js/clean/src/effects.js |
var result = $H(); styleRules.each(function(pair){ var property = pair[0], value = pair[1], unit = null; if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } else if(Element.CSS_LENGTH.test(value)) var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); }.bind(this)); return result; | if(/MSIE/.test(navigator.userAgent) && !window.opera && this.indexOf('opacity') > -1) { styleRules.opacity = this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]; } return styleRules; | String.prototype.parseStyle = function(){ var element = Element.extend(document.createElement('div')); element.innerHTML = '<div style="' + this + '"></div>'; var style = element.down().style, styleRules = $H(); Element.CSS_PROPERTIES.each(function(property){ if(style[property]) styleRules[property] = style[property]; }); var result = $H(); styleRules.each(function(pair){ var property = pair[0], value = pair[1], unit = null; if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } else if(Element.CSS_LENGTH.test(value)) var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); }.bind(this)); return result;}; | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/2ee7ad789e4782f0bfb6757c6989a3000962b116/effects.js/clean/src/effects.js |
var CSS_COLOR = /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|rgb(\d,\d,\d))$/; | String.prototype.parseStyle = function(){ var element = Element.extend(document.createElement('div')); element.innerHTML = '<div style="' + this + '"></div>'; var style = element.down().style, styleRules = $H(); String.CSS_PROPERTIES.each(function(property){ if(style[property]) styleRules[property] = style[property]; }); var CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; var CSS_COLOR = /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|rgb(\d,\d,\d))$/; var result = $H(); styleRules.each(function(pair){ var property = pair[0], value = pair[1], unit = null; if(CSS_LENGTH.test(value)) var components = value.match(/([\+\-]?[0-9\.]+)(.*)/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; else if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); }.bind(this)); return result;}; | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/639c8645cd6cf62509bf6c5c009d4c1e46315068/effects.js/clean/src/effects.js |
|
value = flowHelper.getRequest(cocoon).getParameter(name); | function passRequestParameters(flowHelper, usecase) { var names = cocoon.request.getParameterNames(); while (names.hasMoreElements()) { var name = names.nextElement(); if (!name.equals("lenya.usecase") && !name.equals("lenya.continuation") && !name.equals("submit")) { var value = flowHelper.getRequest(cocoon).get(name); var string = new Packages.java.lang.String(); if (string.getClass().isInstance(value)) { usecase.setParameter(name, value); } else { usecase.setPart(name, value); } } }} | 791 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/77bf91c3296ee0a67101c8f46e62cc4132a693c5/usecases.js/buggy/src/webapp/lenya/usecases/usecases.js |
|
this.pattern = pattern; var strategyName = 'glob'; if (/^([a-zA-Z]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } strategyClassName = strategyName.ucfirst() + 'MatchStrategy'; if (! PatternMatcher[strategyClassName]) { throw new SeleniumError("cannot find PatternMatcher." + strategyClassName); } this.strategy = new PatternMatcher[strategyClassName](pattern); | this.selectStrategy(pattern); | PatternMatcher = function(pattern) { this.pattern = pattern; var strategyName = 'glob'; // by default if (/^([a-zA-Z]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } strategyClassName = strategyName.ucfirst() + 'MatchStrategy'; if (! PatternMatcher[strategyClassName]) { throw new SeleniumError("cannot find PatternMatcher." + strategyClassName); } this.strategy = new PatternMatcher[strategyClassName](pattern);}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/732ba676fd79b000d33b0b863900a6e4d545f2e0/selenium-api.js/buggy/code/javascript/selenium-api.js |
this.pattern = pattern; var strategyName = 'glob'; if (/^([a-zA-Z]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } strategyClassName = strategyName.ucfirst() + 'MatchStrategy'; if (! PatternMatcher[strategyClassName]) { throw new SeleniumError("cannot find PatternMatcher." + strategyClassName); } this.strategy = new PatternMatcher[strategyClassName](pattern); | this.selectStrategy(pattern); | PatternMatcher = function(pattern) { this.pattern = pattern; var strategyName = 'glob'; // by default if (/^([a-zA-Z]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } strategyClassName = strategyName.ucfirst() + 'MatchStrategy'; if (! PatternMatcher[strategyClassName]) { throw new SeleniumError("cannot find PatternMatcher." + strategyClassName); } this.strategy = new PatternMatcher[strategyClassName](pattern);}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/c23d8c75e575edee0609da00f3d91908b062e9b5/selenium-api.js/buggy/code/javascript/selenium-api.js |
PatternMatcher = function(pattern) { | var PatternMatcher = function(pattern) { | PatternMatcher = function(pattern) { this.selectStrategy(pattern);}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/10e591b5be05718f2e4d76628c0765675e463e1b/htmlutils.js/clean/code/javascript/core/scripts/htmlutils.js |
function pause() { | function pause() { | function pause() { DebuggerDocument.pause();} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/265b0e098271034b585404142515fee7102730f2/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
treePopup.style.display = null; searchCount.style.display = null; searchField.style.width = null; | treePopup.style.removeProperty("display"); searchCount.style.removeProperty("display"); searchField.style.removeProperty("width"); | function performSearch(query){ var treePopup = document.getElementById("treePopup"); var searchField = document.getElementById("search"); var searchCount = document.getElementById("searchCount"); if (query.length && !searchActive) { treePopup.style.display = "none"; searchCount.style.display = "block"; searchField.style.width = "150px"; searchActive = true; } else if (!query.length && searchActive) { treePopup.style.display = null; searchCount.style.display = null; searchField.style.width = null; searchActive = false; } Inspector.searchPerformed(query);} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/698fe24365317fd75bda13d558b5e551b352b9c6/inspector.js/clean/third_party/WebKit/WebKit/WebInspector/webInspector/inspector.js |
function pg_prefs_load(){ PGTranslate_prefs = new PGTranslate_prefs(); initListBox(); var defaultLanguage = PGTranslate_prefs.getIntPref(PGTranslate_prefs.PREF_LANGUAGE); document.getElementById("translate.prefs.language.selection").selectedIndex = defaultLanguage; document.getElementById("translate.prefs.contextMenu").checked = PGTranslate_prefs.getBoolPref(PGTranslate_prefs.PREF_CONTEXTMENU_ENABLED); document.getElementById("translate.prefs.displayTools").checked = PGTranslate_prefs.getBoolPref(PGTranslate_prefs.PREF_TOOLMENU_ENABLED); initOriginBox(defaultLanguage); document.getElementById("translate.prefs.language.origin.selection").selectedIndex = PGTranslate_prefs.getIntPref(PGTranslate_prefs.PREF_ORIGIN_LANGUAGE); } | 9817 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9817/314a4fb3fb217fe2ad81ee39cd825ad7af15e4b7/translate-options.js/clean/firefox/extensions/translate/trunk/chrome/content/translate-options.js |
||
function pg_prefs_load(){ PGTranslate_prefs = new PGTranslate_prefs(); initListBox(); var defaultLanguage = PGTranslate_prefs.getIntPref(PGTranslate_prefs.PREF_LANGUAGE); document.getElementById("translate.prefs.language.selection").selectedIndex = defaultLanguage; document.getElementById("translate.prefs.contextMenu").checked = PGTranslate_prefs.getBoolPref(PGTranslate_prefs.PREF_CONTEXTMENU_ENABLED); document.getElementById("translate.prefs.displayTools").checked = PGTranslate_prefs.getBoolPref(PGTranslate_prefs.PREF_TOOLMENU_ENABLED); initOriginBox(defaultLanguage); document.getElementById("translate.prefs.language.origin.selection").selectedIndex = PGTranslate_prefs.getIntPref(PGTranslate_prefs.PREF_ORIGIN_LANGUAGE); } | 9817 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9817/314a4fb3fb217fe2ad81ee39cd825ad7af15e4b7/translate-options.js/clean/firefox/extensions/translate/trunk/chrome/content/translate-options.js |
||
gPGTranslate.enableTranslate(aLocation.asciiSpec); | function PGTranslate() // lets initialise some of the variables that we are going to use{ /* this.pref_theLanguage; this.pref_displayContextMenu ; this.pref_displayToolMenu ; */ this.translateBundle; //holds variable found in translate.properties this.PGTranslate_prefs = new PGTranslate_prefs(); this.myListener = //listens for page refreshs, if the page refreshed is an image then translate is disabled { onStateChange:function(aProgress,aRequest,aFlag,aStatus){}, onLocationChange:function(aProgress,aRequest,aLocation) { gPGTranslate.enableTranslate(aLocation.asciiSpec); }, onProgressChange:function(a,b,c,d,e,f){}, onStatusChange:function(a,b,c,d){}, onSecurityChange:function(a,b,c){}, onLinkIconAvailable:function(a){} } this.initPref(this.PGTranslate_prefs.PREF_CONTEXTMENU_ENABLED , "bool", true); this.initPref(this.PGTranslate_prefs.PREF_TOOLMENU_ENABLED , "bool", true); this.initPref(this.PGTranslate_prefs.PREF_LANGUAGE , "int", 0);} | 9817 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9817/5ef45de1b7ad016102d93f8b0600eedee2a03b67/translate.js/buggy/tags/r_0_6_0/chrome/content/translate.js |
|
gPGTranslate.enableTranslate(aLocation.asciiSpec); | function PGTranslate() // lets initialise some of the variables that we are going to use{ /* this.pref_theLanguage; this.pref_displayContextMenu ; this.pref_displayToolMenu ; */ this.translateBundle; //holds variable found in translate.properties this.PGTranslate_prefs = new PGTranslate_prefs(); this.myListener = //listens for page refreshs, if the page refreshed is an image then translate is disabled { onStateChange:function(aProgress,aRequest,aFlag,aStatus){}, onLocationChange:function(aProgress,aRequest,aLocation) { gPGTranslate.enableTranslate(aLocation.asciiSpec); }, onProgressChange:function(a,b,c,d,e,f){}, onStatusChange:function(a,b,c,d){}, onSecurityChange:function(a,b,c){}, onLinkIconAvailable:function(a){} } this.initPref(this.PGTranslate_prefs.PREF_CONTEXTMENU_ENABLED , "bool", true); this.initPref(this.PGTranslate_prefs.PREF_TOOLMENU_ENABLED , "bool", true); this.initPref(this.PGTranslate_prefs.PREF_LANGUAGE , "int", 0);} | 9817 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9817/2b497b1a388cd41d5ddd950467c5bc7c02b72764/translate.js/buggy/trunk/chrome/content/translate.js |
|
loadXMLDoc( 'requests/status.xml?command=pl_pause', parse_status ); | loadXMLDoc( 'requests/status.xml?command=pl_pause&id='+pl_cur_id, parse_status ); | function pl_pause(){ loadXMLDoc( 'requests/status.xml?command=pl_pause', parse_status );} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/c0fe636d8e26a88ae46bd98fb15e1282d7593236/functions.js/buggy/share/http/js/functions.js |
pl_cur_id = id; | function pl_play( id ){ loadXMLDoc( 'requests/status.xml?command=pl_play&id='+id, parse_status ); setTimeout( 'update_playlist()', 1000 );} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/c0fe636d8e26a88ae46bd98fb15e1282d7593236/functions.js/buggy/share/http/js/functions.js |
|
function pl_sort() | function pl_sort( sort, order ) | function pl_sort(){ /* FIXME */ loadXMLDoc( 'requests/status.xml?command=pl_sort', parse_status ); setTimeout( 'update_playlist()', 1000 );} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/a7c18d8acc7b15a1937863953d2dfd06c0b6a7a1/functions.js/buggy/share/http/js/functions.js |
/* FIXME */ loadXMLDoc( 'requests/status.xml?command=pl_sort', parse_status ); | loadXMLDoc( 'requests/status.xml?command=pl_sort&id='+order+'&val='+sort, parse_status ); | function pl_sort(){ /* FIXME */ loadXMLDoc( 'requests/status.xml?command=pl_sort', parse_status ); setTimeout( 'update_playlist()', 1000 );} | 1058 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1058/a7c18d8acc7b15a1937863953d2dfd06c0b6a7a1/functions.js/buggy/share/http/js/functions.js |
d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) | d=parseFloat(dur); if(isNaN(f=parseInt(freq))) | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(Number(dur.charAt(0))) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; else pitch+=parseFloat(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(Number(dur.charAt(0))) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(truncstr(dur,'\\')); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4cffc9d18166ea9c7dbcd3ece2a4432e0b263129/playtone.js/buggy/playtone.js |
case 'Q': /* quit */ exit(0); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(Number(dur.charAt(0))) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; else pitch+=parseFloat(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(Number(dur.charAt(0))) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(truncstr(dur,'\\')); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4cffc9d18166ea9c7dbcd3ece2a4432e0b263129/playtone.js/buggy/playtone.js |
|
exit(1); | stop=true; break;; | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(Number(dur.charAt(0))) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; else pitch+=parseFloat(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(Number(dur.charAt(0))) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(truncstr(dur,'\\')); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4cffc9d18166ea9c7dbcd3ece2a4432e0b263129/playtone.js/buggy/playtone.js |
if((f=parseInt(freq))!=0) | if(isNaN(f=parseInt(freq.charAt(0)))) | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f995e6bc5bd279d7f627d7e89228bab8ad39110b/playtone.js/clean/playtone.js |
if(parseInt(dur)) | if(Number(dur.charAt(0))) | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f995e6bc5bd279d7f627d7e89228bab8ad39110b/playtone.js/clean/playtone.js |
if(parseInt(dur)) pitch=atof(dur)/32.0; | if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f995e6bc5bd279d7f627d7e89228bab8ad39110b/playtone.js/clean/playtone.js |
pitch+=atof(dur); | pitch+=parseFloat(dur); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f995e6bc5bd279d7f627d7e89228bab8ad39110b/playtone.js/clean/playtone.js |
if(parseInt(dur)) | if(Number(dur.charAt(0))) | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f995e6bc5bd279d7f627d7e89228bab8ad39110b/playtone.js/clean/playtone.js |
write(dur); | write(truncstr(dur,'\\')); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f995e6bc5bd279d7f627d7e89228bab8ad39110b/playtone.js/clean/playtone.js |
if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f995e6bc5bd279d7f627d7e89228bab8ad39110b/playtone.js/clean/playtone.js |
|
var appcontent = window.document.getElementById("appcontent"); | function playback() { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); var window = wm.getMostRecentWindow('navigator:browser'); var contentWindow = window.getBrowser().contentWindow; var appcontent = window.document.getElementById("appcontent"); this.seleniumStartPage = contentWindow.location.href; this.seleniumWindow = contentWindow; // disable recording document.getElementById("enableRecording").checked = false; toggleRecordingEnabled(false); contentWindow.location.href = 'chrome://selenium-ide/content/selenium/TestRunner.html?test=/content/PlayerTestSuite.html' + '&userExtensionsURL=' + this.options.userExtensionsURL + '&baseURL=' + document.getElementById("baseURL").value;} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/c950ca6f6d08aee4c1c8dccebdc1a9012fdcdcc5/recorder.js/buggy/src/content/recorder.js |
|
return event.pageX || (event.clientX + | return event.pageX || (event.clientX + | pointerX: function(event) { return event.pageX || (event.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)); }, | 742 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/742/3f913f897829fb026ef98df2d57f8da94ee5339d/prototype.js/buggy/public/javascripts/prototype.js |
return event.pageY || (event.clientY + | return event.pageY || (event.clientY + | pointerY: function(event) { return event.pageY || (event.clientY + (document.documentElement.scrollTop || document.body.scrollTop)); }, | 742 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/742/3f913f897829fb026ef98df2d57f8da94ee5339d/prototype.js/buggy/public/javascripts/prototype.js |
var nodes = document.getElementsByClassName(accentClass); for (var i = 0; i < nodes.length; i++) { debug.print(label + " node for accent-color = " + nodes[i].nodeName); nodes[i].style.backgroundColor = this.accentColor; | var frames = new Array(document, parent.frames[1].document ); var nodes; debug.print(label + "frames " + frames.length); for (var i = 0; i < frames.length; i++) { debug.print(label + "frame " + i + " = " + frames[i]); nodes = frames[i].getElementsByClassName(accentClass); for (var j = 0; j < nodes.length; j++) { debug.print(label + "node for accent-color = " + nodes[j].nodeName); nodes[j].style.backgroundColor = this.accentColor; } | function PolicyClass(titleId, title, accentClass, accentColor) { debug.print("PolicyClass: " + "titleId = " + titleId) this.titleNode = $(titleId); this.title = title; this.accentClass = accentClass; this.accentColor = accentColor; this.getTitle = function() { return this.title; } this.getAccentColor = function() { return this.accentColor; } // see http://www.quirksmode.org/dom/w3c_css.html // see http://www.quirksmode.org/dom/changess.html this.enforce = function() { var label = "PolicyClass.enforce: "; debug.print(label + "titleNode = " + this.titleNode) debug.print(label + "title = " + this.title) if (null != this.titleNode && null != this.title && "" != this.title) { // enforce title Element.update(this.titleNode, ''); this.titleNode.appendChild(document.createTextNode(this.title)); } if (null != this.accentColor && "" != this.accentColor) { // enforce accentColor, on accent class only var nodes = document.getElementsByClassName(accentClass); for (var i = 0; i < nodes.length; i++) { debug.print(label + " node for accent-color = " + nodes[i].nodeName); nodes[i].style.backgroundColor = this.accentColor; } } }} // PolicyClass | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d247a1b6dacb7417d1b16dd5d23f8786e47c143b/query.js/buggy/query.js |
parent.frames[1].document ); | parent.frames[1].document); | function PolicyClass(titleId, title, accentClass, accentColor) { debug.print("PolicyClass: " + "titleId = " + titleId) this.titleNode = $(titleId); this.title = title; this.accentClass = accentClass; this.accentColor = accentColor; this.getTitle = function() { return this.title; } this.getAccentColor = function() { return this.accentColor; } // see http://www.quirksmode.org/dom/w3c_css.html // see http://www.quirksmode.org/dom/changess.html this.enforce = function() { var label = "PolicyClass.enforce: "; debug.print(label + "titleNode = " + this.titleNode) debug.print(label + "title = " + this.title) if (null != this.titleNode && null != this.title && "" != this.title) { // enforce title Element.update(this.titleNode, ''); this.titleNode.appendChild(document.createTextNode(this.title)); } if (null != this.accentColor && "" != this.accentColor) { // enforce accentColor, on accent class only var frames = new Array(document, parent.frames[1].document ); var nodes; debug.print(label + "frames " + frames.length); for (var i = 0; i < frames.length; i++) { debug.print(label + "frame " + i + " = " + frames[i]); nodes = frames[i].getElementsByClassName(accentClass); for (var j = 0; j < nodes.length; j++) { debug.print(label + "node for accent-color = " + nodes[j].nodeName); nodes[j].style.backgroundColor = this.accentColor; } } } }} // PolicyClass | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/9c5f02369bb30e42ba4bb68262eabcbd532d7b22/query.js/clean/query.js |
var last = this[this.length - 1 ]; this.length = this.length - 1; | var last = null; if ( this.length > 0 ) { last = this[this.length - 1 ]; this.length = this.length - 1; } | Array.prototype.pop=function() { var last = this[this.length - 1 ]; this.length = this.length - 1; return last; } | 2011 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2011/85c17727acdb58ae9ae601d8f07dc47ffc099420/ezjslibie50support.js/clean/design/standard/javascript/lib/ezjslibie50support.js |
var last = this[this.length - 1 ]; this.length = this.length - 1; | var last = null; if ( this.length > 0 ) { last = this[this.length - 1 ]; this.length = this.length - 1; } | Array.prototype.pop=function() { var last = this[this.length - 1 ]; this.length = this.length - 1; return last; } | 8051 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8051/85c17727acdb58ae9ae601d8f07dc47ffc099420/ezjslibie50support.js/buggy/design/standard/javascript/lib/ezjslibie50support.js |
out += '<li><a href="#needsJS" onclick=\'window.search("' + q + '"); return false;\'>' + d + '</a>' | out += '<li><a href="#needsJS" onclick=\'POPsearch("' + q + '"); return false;\'>' + d + '</a>' | function POPsearch(s) { var d = document.getElementById('Submit1') d.value = 'Searching...'; d.disabled = true document.getElementById('q').disabled = true var r = GXmlHttp.create(); r.open("GET", "/lookup.php?output=xml&q=" + encodeURIComponent(s), true); r.onreadystatechange = function(){ if (r.readyState == 4) { var d = document.getElementById('Submit1') d.value = 'Search'; d.disabled = false document.getElementById('q').disabled = false x = r.responseXML c = x.getElementsByTagName('center')[0] s = x.getElementsByTagName('span')[0] if (c && s) { p = GPoint.fromLatLngXml(c) s = GSize.fromLatLngXml(s) z = map.spec.getLowestZoomLevel(p, s, map.viewSize) map.centerAndZoom(p, z) document.getElementById('search_results').style.display = 'none' return 1; } refinements = x.getElementsByTagName('refinement'); if (refinements.length) { var out = '<p>More than one match:</p><ul>' for (ref=0; ref<refinements.length; ref++) { q = GXml.value(refinements[ref].getElementsByTagName('query')[0]) d = GXml.value(refinements[ref].getElementsByTagName('description')[0]) out += '<li><a href="#needsJS" onclick=\'window.search("' + q + '"); return false;\'>' + d + '</a>' } out += '</ul>' d = document.getElementById('search_results') d.innerHTML = out d.style.display = 'block' return 1; } error = x.getElementsByTagName('error')[0] if (error) { d = document.getElementById('search_results') d.innerHTML = GXml.value(error) d.style.display = 'block' } } } r.send(null); return false;}; | 4679 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4679/a3e9f600215fc68dd77a3000e24dca82a27ea07f/pop.js/buggy/docs/js/pop.js |
var pos = Drupal.absolutePosition(this.input); | Drupal.jsAC.prototype.populatePopup = function () { // Show popup if (this.popup) { $(this.popup).remove(); } var pos = Drupal.absolutePosition(this.input); this.selected = false; this.popup = document.createElement('div'); this.popup.id = 'autocomplete'; this.popup.owner = this; $(this.popup).css({ top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', width: (this.input.offsetWidth - 4) +'px', display: 'none' }); $('body').append(this.popup); // Do search this.db.owner = this; this.db.search(this.input.value);} | 3650 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3650/905fd30abbc9195bad3c37d966f220f60dcb671c/autocomplete.js/clean/misc/autocomplete.js |
|
top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', | marginTop: this.input.offsetHeight +'px', | Drupal.jsAC.prototype.populatePopup = function () { // Show popup if (this.popup) { $(this.popup).remove(); } var pos = Drupal.absolutePosition(this.input); this.selected = false; this.popup = document.createElement('div'); this.popup.id = 'autocomplete'; this.popup.owner = this; $(this.popup).css({ top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', width: (this.input.offsetWidth - 4) +'px', display: 'none' }); $('body').append(this.popup); // Do search this.db.owner = this; this.db.search(this.input.value);} | 3650 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3650/905fd30abbc9195bad3c37d966f220f60dcb671c/autocomplete.js/clean/misc/autocomplete.js |
$('body').append(this.popup); | $(this.input).before(this.popup); | Drupal.jsAC.prototype.populatePopup = function () { // Show popup if (this.popup) { $(this.popup).remove(); } var pos = Drupal.absolutePosition(this.input); this.selected = false; this.popup = document.createElement('div'); this.popup.id = 'autocomplete'; this.popup.owner = this; $(this.popup).css({ top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', width: (this.input.offsetWidth - 4) +'px', display: 'none' }); $('body').append(this.popup); // Do search this.db.owner = this; this.db.search(this.input.value);} | 3650 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3650/905fd30abbc9195bad3c37d966f220f60dcb671c/autocomplete.js/clean/misc/autocomplete.js |
var value = prop.style.getPropertyValue(name); | function populateStyleListItem(li, prop, name){ var value = prop.style.getPropertyValue(name); var span = document.createElement("span"); span.className = "property"; span.textContent = name; li.appendChild(span); span = document.createElement("span"); span.className = "value"; var textValue = valueNickname[value] ? valueNickname[value] : value; var priority = prop.style.getPropertyPriority(name); if (priority.length) textValue += " !" + priority; span.textContent = textValue; li.appendChild(span); var colors = value.match(/(rgb\([0-9]+, [0-9]+, [0-9]+\))|(rgba\([0-9]+, [0-9]+, [0-9]+, [0-9]+\))/g); if (colors) { for (var k = 0; k < colors.length; k++) { var swatch = document.createElement("span"); swatch.className = "colorSwatch"; swatch.style.backgroundColor = colors[k]; li.appendChild(swatch); } }} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/c84182981d4249f4cb93a76049e37453ce4048fd/inspector.js/buggy/third_party/WebKit/WebKit/WebInspector/webInspector/inspector.js |
|
var value = prop.style.getPropertyValue(name); if (!value) return; | function populateStyleListItem(li, prop, name){ var value = prop.style.getPropertyValue(name); var span = document.createElement("span"); span.className = "property"; span.textContent = name; li.appendChild(span); span = document.createElement("span"); span.className = "value"; var textValue = valueNickname[value] ? valueNickname[value] : value; var priority = prop.style.getPropertyPriority(name); if (priority.length) textValue += " !" + priority; span.textContent = textValue; li.appendChild(span); var colors = value.match(/(rgb\([0-9]+, [0-9]+, [0-9]+\))|(rgba\([0-9]+, [0-9]+, [0-9]+, [0-9]+\))/g); if (colors) { for (var k = 0; k < colors.length; k++) { var swatch = document.createElement("span"); swatch.className = "colorSwatch"; swatch.style.backgroundColor = colors[k]; li.appendChild(swatch); } }} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/c84182981d4249f4cb93a76049e37453ce4048fd/inspector.js/buggy/third_party/WebKit/WebKit/WebInspector/webInspector/inspector.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.