rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
target.style.top = source.style.top; target.style.left = source.style.left; | target.style.position = 'absolute'; var offsets = this.cumulativeOffset(source); target.style.top = offsets[1] + 'px'; target.style.left = offsets[0] + 'px'; | clone: function(source, target) { source = $(source); target = $(target); target.style.top = source.style.top; target.style.left = source.style.left; target.style.width = source.offsetWidth + 'px'; target.style.height = source.offsetHeight + 'px'; } | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/cadcd9e7144394ecc9df01961191d20e5e219a37/prototype.js/clean/actionpack/lib/action_view/helpers/javascripts/prototype.js |
target.style.position = 'absolute'; var offsets = this.cumulativeOffset(source); target.style.top = offsets[1] + 'px'; target.style.left = offsets[0] + 'px'; target.style.width = source.offsetWidth + 'px'; target.style.height = source.offsetHeight + 'px'; } | var delta = [0, 0]; var parent = null; if (Element.getStyle(target,'position') == 'absolute') { parent = Position.offsetParent(target); delta = Position.page(parent); } if (parent == document.body) { delta[0] -= document.body.offsetLeft; delta[1] -= document.body.offsetTop; } if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; if(options.setWidth) target.style.width = source.offsetWidth + 'px'; if(options.setHeight) target.style.height = source.offsetHeight + 'px'; }, | clone: function(source, target) { source = $(source); target = $(target); target.style.position = 'absolute'; var offsets = this.cumulativeOffset(source); target.style.top = offsets[1] + 'px'; target.style.left = offsets[0] + 'px'; target.style.width = source.offsetWidth + 'px'; target.style.height = source.offsetHeight + 'px'; } | 742 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/742/3f913f897829fb026ef98df2d57f8da94ee5339d/prototype.js/buggy/public/javascripts/prototype.js |
target.style.top = source.style.top; target.style.left = source.style.left; | target.style.position = 'absolute'; var offsets = this.cumulativeOffset(source); target.style.top = offsets[1] + 'px'; target.style.left = offsets[0] + 'px'; | clone: function(source, target) { source = $(source); target = $(target); target.style.top = source.style.top; target.style.left = source.style.left; target.style.width = source.offsetWidth + 'px'; target.style.height = source.offsetHeight + 'px'; } | 107 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/107/cadcd9e7144394ecc9df01961191d20e5e219a37/prototype.js/clean/actionpack/lib/action_view/helpers/javascripts/prototype.js |
obj.grid = null; | obj.grid = new Array(); | clone: function (obj) { if (obj == null) { obj = new OpenLayers.Layer.Grid(this.name, this.url, this.params, this.options); } //get all additions from superclasses obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]); // copy/set any non-init, non-simple values here if (this.tileSize != null) { obj.tileSize = this.tileSize.clone(); } // we do not want to copy reference to grid. that should stay at null obj.grid = null; return obj; }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/407604cc35ebba87495e710479b7ca1c2184439b/Grid.js/buggy/lib/OpenLayers/Layer/Grid.js |
obj.grid = null; | obj.grid = new Array(); | clone: function (obj) { if (obj == null) { obj = new OpenLayers.Layer.Grid(this.name, this.url, this.params, this.options); } //get all additions from superclasses obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]); // copy/set any non-init, non-simple values here if (this.tileSize != null) { obj.tileSize = this.tileSize.clone(); } // we do not want to copy reference to grid. that should stay at null obj.grid = null; return obj; }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/407604cc35ebba87495e710479b7ca1c2184439b/Grid.js/buggy/lib/OpenLayers/Layer/Grid.js |
this.logWindow.close(); | try { this.logWindow.close(); } catch (e) { } | close: function(message) { if (this.logWindow != null) { this.logWindow.close(); this.logWindow = null; } }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/b89eae6caef41d28a2b952919757a0f66c120dae/selenium-logging.js/clean/code/javascript/core/scripts/selenium-logging.js |
if (w.location.href == "chrome: | if ((w.location.href == "chrome: (w.location.href == "chrome: | function closeDownloadManager() { var wm = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator); var en = wm.getEnumerator(""); var n = 0; var dlm = null; while (en.hasMoreElements()) { var w = en.getNext(); if (w.location.href == "chrome://mozapps/content/downloads/downloads.xul") { dlm = w; break; } } if (dlm != null) { dlm.close(); } } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/e2ff2c9cbb759f91bf5a308f212528d3a046209f/greasemonkey.js/buggy/src/content/greasemonkey.js |
window.location = "index.jsp"; | window.location = "index.htm"; | function closeTaskPane() { window.location = "index.jsp";} | 10307 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10307/21f330ece43c879c3002761640904071d657c39b/taskpane.js/buggy/web/module/resources/taskpane.js |
window.location = "index.jsp"; | window.location = "index.htm"; | function closeTaskPane() { window.location = "index.jsp";} | 10307 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10307/24d6f820a9cadda6b37a8644a73d1ff433dd1ee0/taskpane.js/buggy/web/module/resources/taskpane.js |
var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems',authorurl:'http: | var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems AB',authorurl:'http: | var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};}};tinyMCE.addPlugin("inlinepopups",TinyMCE_InlinePopupsPlugin);TinyMCE_Engine.prototype.orgOpenWindow=TinyMCE_Engine.prototype.openWindow;TinyMCE_Engine.prototype.openWindow=function(template,args){if(args['inline']!="yes"||tinyMCE.isOpera||tinyMCE.getParam("plugins").indexOf('inlinepopups')==-1){mcWindows.selectedWindow=null;args['mce_inside_iframe']=false;this.orgOpenWindow(template,args);return;}var url,resizable,scrollbars;args['mce_inside_iframe']=true;tinyMCE.windowArgs=args;if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";height+=18;for(var name in args){if(typeof(args[name])=='function')continue;url=tinyMCE.replaceVar(url,name,escape(args[name]));}var elm=document.getElementById(this.selectedInstance.editorId+'_parent');var pos=tinyMCE.getAbsPosition(elm);pos.absLeft+=Math.round((elm.firstChild.clientWidth/2)-(width/2));pos.absTop+=Math.round((elm.firstChild.clientHeight/2)-(height/2));mcWindows.open(url,mcWindows.idCounter++,"modal=yes,width="+width+",height="+height+",resizable="+resizable+",scrollbars="+scrollbars+",statusbar="+resizable+",left="+pos.absLeft+",top="+pos.absTop);};TinyMCE_Engine.prototype.orgCloseWindow=TinyMCE_Engine.prototype.closeWindow;TinyMCE_Engine.prototype.closeWindow=function(win){if(mcWindows.selectedWindow!=null)mcWindows.selectedWindow.close();else this.orgCloseWindow(win);};TinyMCE_Engine.prototype.setWindowTitle=function(win_ref,title){for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win_ref.name==win.id+"_iframe")window.frames[win.id+"_iframe"].document.getElementById(win.id+'_title').innerHTML=title;}};function TinyMCE_Windows(){this.settings=new Array();this.windows=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.action="none";this.selectedWindow=null;this.lastSelectedWindow=null;this.zindex=100;this.mouseDownScreenX=0;this.mouseDownScreenY=0;this.mouseDownLayerX=0;this.mouseDownLayerY=0;this.mouseDownWidth=0;this.mouseDownHeight=0;this.idCounter=0;};TinyMCE_Windows.prototype.init=function(settings){this.settings=settings;if(this.isMSIE)this.addEvent(document,"mousemove",mcWindows.eventDispatcher);else this.addEvent(window,"mousemove",mcWindows.eventDispatcher);this.addEvent(document,"mouseup",mcWindows.eventDispatcher);this.doc=document;};TinyMCE_Windows.prototype.getParam=function(name,default_value){var value=null;value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");return value;};TinyMCE_Windows.prototype.eventDispatcher=function(e){e=typeof(e)=="undefined"?window.event:e;if(mcWindows.selectedWindow==null)return;if(mcWindows.isGecko&&e.type=="mousedown"){var elm=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win.headElement==elm||win.resizeElement==elm){win.focus();break;}}}switch(e.type){case"mousemove":mcWindows.selectedWindow.onMouseMove(e);break;case"mouseup":mcWindows.selectedWindow.onMouseUp(e);break;case"mousedown":mcWindows.selectedWindow.onMouseDown(e);break;case"focus":mcWindows.selectedWindow.onFocus(e);break;}};TinyMCE_Windows.prototype.addEvent=function(obj,name,handler){if(this.isMSIE)obj.attachEvent("on"+name,handler);else obj.addEventListener(name,handler,true);};TinyMCE_Windows.prototype.cancelEvent=function(e){if(this.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};TinyMCE_Windows.prototype.parseFeatures=function(opts){opts=opts.toLowerCase();opts=opts.replace(/;/g,",");opts=opts.replace(/[^0-9a-z=,]/g,"");var optionChunks=opts.split(',');var options=new Array();options['left']="10";options['top']="10";options['width']="300";options['height']="300";options['resizable']="yes";options['minimizable']="yes";options['maximizable']="yes";options['close']="yes";options['movable']="yes";options['statusbar']="yes";options['scrollbars']="auto";options['modal']="no";if(opts=="")return options;for(var i=0;i<optionChunks.length;i++){var parts=optionChunks[i].split('=');if(parts.length==2)options[parts[0]]=parts[1];}options['left']=parseInt(options['left']);options['top']=parseInt(options['top']);options['width']=parseInt(options['width']);options['height']=parseInt(options['height']);return options;};TinyMCE_Windows.prototype.open=function(url,name,features){this.lastSelectedWindow=this.selectedWindow;var win=new TinyMCE_Window();var winDiv,html="",id;var imgPath=this.getParam("images_path");features=this.parseFeatures(features);id="mcWindow_"+name;win.deltaHeight=18;if(features['statusbar']=="yes"){win.deltaHeight+=13;if(this.isMSIE)win.deltaHeight+=1;}width=parseInt(features['width']);height=parseInt(features['height'])-win.deltaHeight;if(this.isMSIE)width-=2;win.id=id;win.url=url;win.name=name;win.features=features;this.windows[name]=win;iframeWidth=width;iframeHeight=height;html+='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';html+='<html>';html+='<head>';html+='<title>Wrapper iframe</title>';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+this.getParam("css_file")+'" rel="stylesheet" type="text/css" />';html+='</head>';html+='<body onload="parent.mcWindows.onLoad(\''+name+'\');">';html+='<div id="'+id+'_container" class="mceWindow">';html+='<div id="'+id+'_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';html+=' <div id="'+id+'_title" class="mceWindowTitle"';html+=' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';html+=' <div class="mceWindowHeadTools">';html+=' <a href="javascript:parent.mcWindows.windows[\''+name+'\'].close();" target="_self" onmousedown="return false;" class="mceWindowClose"><img border="0" src="'+imgPath+'/window_close.gif" /></a>';html+=' </div>';html+='</div><div id="'+id+'_body" class="mceWindowBody" style="width: '+width+'px; height: '+height+'px;">';html+='<iframe id="'+id+'_iframe" name="'+id+'_iframe" frameborder="0" width="'+iframeWidth+'" height="'+iframeHeight+'" src="'+url+'" class="mceWindowBodyIframe" scrolling="'+features['scrollbars']+'"></iframe></div>';if(features['statusbar']=="yes"){html+='<div id="'+id+'_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';if(features['resizable']=="yes"){if(this.isGecko)html+='<div id="'+id+'_resize" class="mceWindowResize"><div style="background-image: url(\''+imgPath+'/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';else html+='<div id="'+id+'_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();" border="0" src="'+imgPath+'/window_resize.gif" /></div>';}html+='</div>';}html+='</div>';html+='</body>';html+='</html>';this.createFloatingIFrame(id,features['left'],features['top'],features['width'],features['height'],html);};TinyMCE_Windows.prototype.setDocumentLock=function(state){if(state){var elm=document.getElementById('mcWindowEventBlocker');if(elm==null){elm=document.createElement("div");elm.id="mcWindowEventBlocker";elm.style.position="absolute";elm.style.left="0";elm.style.top="0";document.body.appendChild(elm);}elm.style.display="none";var imgPath=this.getParam("images_path");var width=document.body.clientWidth;var height=document.body.clientHeight;elm.style.width=width;elm.style.height=height;elm.innerHTML='<img src="'+imgPath+'/spacer.gif" width="'+width+'" height="'+height+'" />';elm.style.zIndex=mcWindows.zindex-1;elm.style.display="block";}else{var elm=document.getElementById('mcWindowEventBlocker');if(mcWindows.windows.length==0)elm.parentNode.removeChild(elm);else elm.style.zIndex=mcWindows.zindex-1;}};TinyMCE_Windows.prototype.onLoad=function(name){var win=mcWindows.windows[name];var id="mcWindow_"+name;var wrapperIframe=window.frames[id+"_iframe"].frames[0];var wrapperDoc=window.frames[id+"_iframe"].document;var doc=window.frames[id+"_iframe"].document;var winDiv=document.getElementById("mcWindow_"+name+"_div");var realIframe=window.frames[id+"_iframe"].frames[0];win.id="mcWindow_"+name;win.winElement=winDiv;win.bodyElement=doc.getElementById(id+'_body');win.iframeElement=doc.getElementById(id+'_iframe');win.headElement=doc.getElementById(id+'_head');win.titleElement=doc.getElementById(id+'_title');win.resizeElement=doc.getElementById(id+'_resize');win.containerElement=doc.getElementById(id+'_container');win.left=win.features['left'];win.top=win.features['top'];win.frame=window.frames[id+'_iframe'].frames[0];win.wrapperFrame=window.frames[id+'_iframe'];win.wrapperIFrameElement=document.getElementById(id+"_iframe");mcWindows.addEvent(win.headElement,"mousedown",mcWindows.eventDispatcher);if(win.resizeElement!=null)mcWindows.addEvent(win.resizeElement,"mousedown",mcWindows.eventDispatcher);if(mcWindows.isMSIE){mcWindows.addEvent(realIframe.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(realIframe,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"focus",mcWindows.eventDispatcher);}for(var i=0;i<window.frames.length;i++){if(!window.frames[i]._hasMouseHandlers){if(mcWindows.isMSIE){mcWindows.addEvent(window.frames[i].document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i].document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(window.frames[i],"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i],"mouseup",mcWindows.eventDispatcher);}window.frames[i]._hasMouseHandlers=true;}}if(mcWindows.isMSIE){mcWindows.addEvent(win.frame.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(win.frame,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"focus",mcWindows.eventDispatcher);}var func=this.getParam("on_open_window","");if(func!="")eval(func+"(win);");win.focus();if(win.features['modal']=="yes")mcWindows.setDocumentLock(true);};TinyMCE_Windows.prototype.createFloatingIFrame=function(id_prefix,left,top,width,height,html){var iframe=document.createElement("iframe");var div=document.createElement("div");width=parseInt(width);height=parseInt(height)+1;div.setAttribute("id",id_prefix+"_div");div.setAttribute("width",width);div.setAttribute("height",(height));div.style.position="absolute";div.style.left=left+"px";div.style.top=top+"px";div.style.width=width+"px";div.style.height=(height)+"px";div.style.backgroundColor="white";div.style.display="none";if(this.isGecko){iframeWidth=width+2;iframeHeight=height+2;}else{iframeWidth=width;iframeHeight=height+1;}iframe.setAttribute("id",id_prefix+"_iframe");iframe.setAttribute("name",id_prefix+"_iframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",iframeWidth);iframe.setAttribute("height",iframeHeight);iframe.setAttribute("scrolling","no");iframe.style.width=iframeWidth+"px";iframe.style.height=iframeHeight+"px";iframe.style.backgroundColor="white";div.appendChild(iframe);document.body.appendChild(div);div.innerHTML=div.innerHTML;if(this.isSafari){window.setTimeout(function(){doc=window.frames[id_prefix+'_iframe'].document;doc.open();doc.write(html);doc.close();},10);}else{doc=window.frames[id_prefix+'_iframe'].window.document;doc.open();doc.write(html);doc.close();}div.style.display="block";return div;};function TinyMCE_Window(){};TinyMCE_Window.prototype.focus=function(){if(this!=mcWindows.selectedWindow){this.winElement.style.zIndex=++mcWindows.zindex;mcWindows.lastSelectedWindow=mcWindows.selectedWindow;mcWindows.selectedWindow=this;}};TinyMCE_Window.prototype.minimize=function(){};TinyMCE_Window.prototype.maximize=function(){};TinyMCE_Window.prototype.startResize=function(){mcWindows.action="resize";};TinyMCE_Window.prototype.startMove=function(e){mcWindows.action="move";};TinyMCE_Window.prototype.close=function(){if(this.frame&&this.frame['tinyMCEPopup'])this.frame['tinyMCEPopup'].restoreSelection();if(mcWindows.lastSelectedWindow!=null)mcWindows.lastSelectedWindow.focus();var mcWindowsNew=new Array();for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win.name!=this.name)mcWindowsNew[n]=win;}mcWindows.windows=mcWindowsNew;var e=mcWindows.doc.getElementById(this.id+"_iframe");e.parentNode.removeChild(e);var e=mcWindows.doc.getElementById(this.id+"_div");e.parentNode.removeChild(e);mcWindows.setDocumentLock(false);};TinyMCE_Window.prototype.onMouseMove=function(e){var scrollX=0;var scrollY=0;var dx=e.screenX-mcWindows.mouseDownScreenX;var dy=e.screenY-mcWindows.mouseDownScreenY;switch(mcWindows.action){case"resize":width=mcWindows.mouseDownWidth+(e.screenX-mcWindows.mouseDownScreenX);height=mcWindows.mouseDownHeight+(e.screenY-mcWindows.mouseDownScreenY);width=width<100?100:width;height=height<100?100:height;this.wrapperIFrameElement.style.width=width+2;this.wrapperIFrameElement.style.height=height+2;this.wrapperIFrameElement.width=width+2;this.wrapperIFrameElement.height=height+2;this.winElement.style.width=width;this.winElement.style.height=height;height=height-this.deltaHeight;this.containerElement.style.width=width;this.iframeElement.style.width=width;this.iframeElement.style.height=height;this.bodyElement.style.width=width;this.bodyElement.style.height=height;this.headElement.style.width=width;mcWindows.cancelEvent(e);break;case"move":this.left=mcWindows.mouseDownLayerX+(e.screenX-mcWindows.mouseDownScreenX);this.top=mcWindows.mouseDownLayerY+(e.screenY-mcWindows.mouseDownScreenY);this.winElement.style.left=this.left+"px";this.winElement.style.top=this.top+"px";mcWindows.cancelEvent(e);break;}};function debug(msg){document.getElementById('debug').value+=msg+"\n";}TinyMCE_Window.prototype.onMouseUp=function(e){mcWindows.action="none";};TinyMCE_Window.prototype.onFocus=function(e){var winRef=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(winRef.name==win.id+"_iframe"){win.focus();return;}}};TinyMCE_Window.prototype.onMouseDown=function(e){var elm=mcWindows.isMSIE?this.wrapperFrame.event.srcElement:e.target;var scrollX=0;var scrollY=0;mcWindows.mouseDownScreenX=e.screenX;mcWindows.mouseDownScreenY=e.screenY;mcWindows.mouseDownLayerX=this.left;mcWindows.mouseDownLayerY=this.top;mcWindows.mouseDownWidth=parseInt(this.winElement.style.width);mcWindows.mouseDownHeight=parseInt(this.winElement.style.height);if(this.resizeElement!=null&&elm==this.resizeElement.firstChild)this.startResize(e);else this.startMove(e);mcWindows.cancelEvent(e);};var mcWindows=new TinyMCE_Windows();mcWindows.init({images_path:tinyMCE.baseURL+"/plugins/inlinepopups/images",css_file:tinyMCE.baseURL+"/plugins/inlinepopups/css/inlinepopup.css"}); | 10343 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/editor_plugin.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js |
if(system.node_list[i].status & NODE_WFC) nodes_wfc++; if(system.node_list[i].status & NODE_INUSE) nodes_inuse++; | switch(system.node_list[i].status) { case NODE_WFC: NODES_WFC++; break; case NODE_LOGON: case NODE_NEWUSER: case NODE_INUSE: case NODE_QUIET: NODES_INUSE++; break; } | function cntnodes(){ var i; nodes_inuse=0 nodes_wfc=0 for(i=0; i<system.nodes; i++) { if(system.node_list[i].status & NODE_WFC) nodes_wfc++; if(system.node_list[i].status & NODE_INUSE) nodes_inuse++; } writeln("Nodes in use="+nodes_inuse+" Waiting for Caller="+nodes_wfc);} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/bcfe743ac62bba23742c66275d0169882eca820a/cntnodes.js/clean/examples/cntnodes.js |
writeln("Nodes in use="+nodes_inuse+" Waiting for Caller="+nodes_wfc); | writeln("Nodes in use="+NODES_INUSE+" Waiting for Caller="+NODES_WFC); | function cntnodes(){ var i; nodes_inuse=0 nodes_wfc=0 for(i=0; i<system.nodes; i++) { if(system.node_list[i].status & NODE_WFC) nodes_wfc++; if(system.node_list[i].status & NODE_INUSE) nodes_inuse++; } writeln("Nodes in use="+nodes_inuse+" Waiting for Caller="+nodes_wfc);} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/bcfe743ac62bba23742c66275d0169882eca820a/cntnodes.js/clean/examples/cntnodes.js |
if (typeof textAreaInit != 'undefined') { | if (typeof textAreaAutoAttach != 'undefined') { | function collapseAutoAttach() { var fieldsets = document.getElementsByTagName('fieldset'); var legend, fieldset; for (var i = 0; fieldset = fieldsets[i]; i++) { if (!hasClass(fieldset, 'collapsible')) { continue; } legend = fieldset.getElementsByTagName('legend'); if (legend.length == 0) { continue; } legend = legend[0]; var a = document.createElement('a'); a.href = '#'; a.onclick = function() { toggleClass(this.parentNode.parentNode, 'collapsed'); if (!hasClass(this.parentNode.parentNode, 'collapsed')) { collapseScrollIntoView(this.parentNode.parentNode); if (typeof textAreaInit != 'undefined') { // Add the grippie to a textarea in a collapsed fieldset. textAreaAutoAttach(null, this.parentNode.parentNode); } } this.blur(); return false; }; a.innerHTML = legend.innerHTML; while (legend.hasChildNodes()) { removeNode(legend.childNodes[0]); } legend.appendChild(a); collapseEnsureErrorsVisible(fieldset); }} | 3650 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3650/a4fd2d666c55132dcb490fddbfd024a056197790/collapse.js/buggy/misc/collapse.js |
Element.collectTextNodes(node) : '')); | Element.collectTextNodesIgnoreClass(node, className) : '')); | Element.collectTextNodesIgnoreClass = function(element, className) { return $A($(element).childNodes).collect( function(node) { return (node.nodeType==3 ? node.nodeValue : ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? Element.collectTextNodes(node) : '')); }).flatten().join('');} | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/5c931b57ecb9f1123cb31b1d130fe00501e10555/effects.js/buggy/src/effects.js |
return text; | return text; | Element.collectTextNodesIgnoreClass = function(element, ignoreclass) { var children = $(element).childNodes; var text = ""; var classtest = new RegExp("^([^ ]+ )*" + ignoreclass+ "( [^ ]+)*$","i"); for (var i = 0; i < children.length; i++) { if(children[i].nodeType==3) { text+=children[i].nodeValue; } else { if((!children[i].className.match(classtest)) && children[i].hasChildNodes()) text += Element.collectTextNodesIgnoreClass(children[i], ignoreclass); } } return text; } | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/ca005b1b268e227744bf8ba57cdd9b5806180441/effects.js/buggy/src/effects.js |
var y = (event.clientY - getTargetY(event)) * 2; | var y = (event.clientY - getTargetY(event) + scroll) * 2; | function colsel_click(event, prefix, h, s, v, in_bar, in_cross){ var x = (event.clientX - getTargetX(event)) * 2; var y = (event.clientY - getTargetY(event)) * 2; // Kludge to get correct coordinates. Only needed in MSIE browsers for // unknown reasons. if (isIE4) { x -= 4; y -= 4; } if (x < 0) x = 0; if (x > 255) x = 255; if (y < 0) y = 0; if (y > 255) y = 255; if (in_cross) { if (in_cross == "x") { v = 255 - y; } else if (in_cross == "y") { h = x; } } else if (in_bar) { s = 255 - y; } else { h = x; v = 255 - y; } colsel_update(prefix, h, s, v, 1); return new Array(h, s, v);} | 2059 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2059/367a9dd67e1d0dcbf1d222cbb09833e9d28441f8/ColorSelector.js/clean/server/modules/tags/javascript_support/scripts/ColorSelector.js |
mark_x_img.style.left = 5 + Math.floor(h / 2); | mark_x_img.style.left = 5 + Math.floor(h / 2) + "px"; | function colsel_update(prefix, h, s, v, update_field, force_color){ var color_str = force_color ? force_color : ("#" + hsv_to_rgb_string(h, s, v)); var bar_img = getObject(prefix + "colorbar"); if (bar_img) { var bar_url = "/internal-roxen-colorbar-small:" + h + "," + v + ",-1"; bar_img.src = bar_url; } var mark_x_img = getObject(prefix + "mark_x"); if (mark_x_img) mark_x_img.style.left = 5 + Math.floor(h / 2); var mark_y_img = getObject(prefix + "mark_y"); if (mark_y_img) mark_y_img.style.top = 5 + Math.floor((255 - v) / 2); var mark_y_small_img = getObject(prefix + "mark_y_small"); if (mark_y_small_img) mark_y_small_img.style.top = 5 + Math.floor((255 - s) / 2); var preview_td = getObject(prefix + "preview"); if (preview_td) { preview_td.style.background = color_str; } if (update_field) { var color_field = getObject(prefix + "color_input"); if (color_field) { color_field.value = color_str; } }} | 2059 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2059/21de5d9f547bb03ec8f04188124728f3e4ef6248/ColorSelector.js/buggy/server/modules/tags/javascript_support/scripts/ColorSelector.js |
mark_y_img.style.top = 5 + Math.floor((255 - v) / 2); | mark_y_img.style.top = 5 + Math.floor((255 - v) / 2) + "px"; | function colsel_update(prefix, h, s, v, update_field, force_color){ var color_str = force_color ? force_color : ("#" + hsv_to_rgb_string(h, s, v)); var bar_img = getObject(prefix + "colorbar"); if (bar_img) { var bar_url = "/internal-roxen-colorbar-small:" + h + "," + v + ",-1"; bar_img.src = bar_url; } var mark_x_img = getObject(prefix + "mark_x"); if (mark_x_img) mark_x_img.style.left = 5 + Math.floor(h / 2); var mark_y_img = getObject(prefix + "mark_y"); if (mark_y_img) mark_y_img.style.top = 5 + Math.floor((255 - v) / 2); var mark_y_small_img = getObject(prefix + "mark_y_small"); if (mark_y_small_img) mark_y_small_img.style.top = 5 + Math.floor((255 - s) / 2); var preview_td = getObject(prefix + "preview"); if (preview_td) { preview_td.style.background = color_str; } if (update_field) { var color_field = getObject(prefix + "color_input"); if (color_field) { color_field.value = color_str; } }} | 2059 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2059/21de5d9f547bb03ec8f04188124728f3e4ef6248/ColorSelector.js/buggy/server/modules/tags/javascript_support/scripts/ColorSelector.js |
mark_y_small_img.style.top = 5 + Math.floor((255 - s) / 2); | mark_y_small_img.style.top = 5 + Math.floor((255 - s) / 2) + "px"; | function colsel_update(prefix, h, s, v, update_field, force_color){ var color_str = force_color ? force_color : ("#" + hsv_to_rgb_string(h, s, v)); var bar_img = getObject(prefix + "colorbar"); if (bar_img) { var bar_url = "/internal-roxen-colorbar-small:" + h + "," + v + ",-1"; bar_img.src = bar_url; } var mark_x_img = getObject(prefix + "mark_x"); if (mark_x_img) mark_x_img.style.left = 5 + Math.floor(h / 2); var mark_y_img = getObject(prefix + "mark_y"); if (mark_y_img) mark_y_img.style.top = 5 + Math.floor((255 - v) / 2); var mark_y_small_img = getObject(prefix + "mark_y_small"); if (mark_y_small_img) mark_y_small_img.style.top = 5 + Math.floor((255 - s) / 2); var preview_td = getObject(prefix + "preview"); if (preview_td) { preview_td.style.background = color_str; } if (update_field) { var color_field = getObject(prefix + "color_input"); if (color_field) { color_field.value = color_str; } }} | 2059 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2059/21de5d9f547bb03ec8f04188124728f3e4ef6248/ColorSelector.js/buggy/server/modules/tags/javascript_support/scripts/ColorSelector.js |
element.dragLastX = x; | function columnResizerDrag(event) { var element = document.getElementById("variableColumnResizer"); if (element.dragging == true) { var main = document.getElementById("rightPane"); var variableColumn = document.getElementById("variable"); var x = event.clientX + window.scrollX; var delta = element.dragLastX - x; var newWidth = constrainedWidthFromElement(variableColumn.clientWidth - delta, main); variableColumn.style.width = newWidth + "px"; element.style.left = newWidth + "px"; element.dragLastX = x; event.preventDefault(); }} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/87b1b60eb821e948fcb1f6f2c20521b54e9dba47/debugger.js/buggy/third_party/WebKit/WebKitTools/Drosera/debugger.js |
|
variableColumn.style.width = newWidth + "px"; | columnRule.style.width = newWidth + "px"; | function columnResizerDrag(event) { var element = document.getElementById("variableColumnResizer"); if (element.dragging == true) { var main = document.getElementById("rightPane"); var variableColumn = document.getElementById("variable"); var x = event.clientX + window.scrollX; var delta = element.dragLastX - x; var newWidth = constrainedWidthFromElement(variableColumn.clientWidth - delta, main); if ((variableColumn.clientWidth - delta) == newWidth) // the width wasn't constrained element.dragLastX = x; variableColumn.style.width = newWidth + "px"; element.style.left = newWidth + "px"; event.preventDefault(); }} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/af542254968d221333567cb32405e710016a9b93/debugger.js/buggy/third_party/WebKit/WebKitTools/Drosera/debugger.js |
function columnResizerDrag(event) { | function columnResizerDrag(event) { | function columnResizerDrag(event) { var element = document.getElementById("variableColumnResizer"); if (element.dragging == true) { var main = document.getElementById("rightPane"); var variableColumn = document.getElementById("variable"); var rules = document.defaultView.getMatchedCSSRules(variableColumn, ""); for (var i = 0; i < rules.length; i++) { if (rules[i].selectorText == ".variable") { var columnRule = rules[i]; break; } } var x = event.clientX + window.scrollX; var delta = element.dragLastX - x; var newWidth = constrainedWidthFromElement(variableColumn.clientWidth - delta, main); if ((variableColumn.clientWidth - delta) == newWidth) // the width wasn't constrained element.dragLastX = x; columnRule.style.width = newWidth + "px"; element.style.left = newWidth + "px"; event.preventDefault(); }} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/265b0e098271034b585404142515fee7102730f2/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
function columnResizerDragEnd(event) { | function columnResizerDragEnd(event) { | function columnResizerDragEnd(event) { isResizingColumn = false; dividerDragEnd(document.getElementById("variableColumnResizer"), columnResizerDrag, columnResizerDragEnd, event);} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/265b0e098271034b585404142515fee7102730f2/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
dividerDragStart(document.getElementById("variableColumnResizer"), columnResizerDrag, columnResizerDragEnd, event); | dividerDragStart(document.getElementById("variableColumnResizer"), columnResizerDrag, columnResizerDragEnd, event, "col-resize"); | function columnResizerDragStart(event) { isResizingColumn = true; dividerDragStart(document.getElementById("variableColumnResizer"), columnResizerDrag, columnResizerDragEnd, event);} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/87b1b60eb821e948fcb1f6f2c20521b54e9dba47/debugger.js/buggy/third_party/WebKit/WebKitTools/Drosera/debugger.js |
function columnResizerDragStart(event) { | function columnResizerDragStart(event) { | function columnResizerDragStart(event) { isResizingColumn = true; dividerDragStart(document.getElementById("variableColumnResizer"), columnResizerDrag, columnResizerDragEnd, event, "col-resize");} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/265b0e098271034b585404142515fee7102730f2/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
file_crc32=format("%lx",file.crc32); if(obj.crc32!=file_crc32) { | file_crc32=file.crc32; crc32=parseInt(obj.crc32,16); if(crc32!=file_crc32) { | function combine_parts(list,attachment_dir){ var li; for(li=0; li<list.length; li++) { if(list[li].parts!=list[li].total) continue; var obj=list[li]; var sub_code; printf("File complete: %s (%u parts)\r\n", obj.name, obj.parts); file = new File(system.temp_dir + "binary.tmp"); if(!file.open("w+b")) { printf("!ERROR %d opening/creating %s\r\n", file.error, file.name); continue; } file[obj.codec]=true; /* yenc or uue */ var pi; for(pi=1;pi<=obj.total;pi++) { printf("Processing part %u of %u\r\n",pi,obj.total); var prefix=format("part%u.",pi); sub_code=obj[prefix + "sub"]; msgbase=new MsgBase(sub_code); if(msgbase.open()==false) { printf("!ERROR %s opening msgbase: %s\r\n",msgbase.last_error,sub_code); delete msgbase; break; } ptr=obj[prefix + "msg"]; body = msgbase.get_msg_body( false /* retrieve by offset */ ,ptr /* message number */ ,false /* remove ctrl-a codes */ ,false /* rfc822 formatted text */ ,false /* include tails */ ); if(body == null) { printf("!FAILED to read message number %ld\r\n",ptr); break; } lines=body.split("\r\n"); first_line=obj[prefix + "first_line"]; last_line=obj[prefix + "last_line"]; for(var l=first_line;l<=last_line;l++) file.write(lines[l]); } if(pi<=obj.total) { file.remove(); printf("!Combine failure, removing part %u\r\n",pi); list[li][format("part%u.id",pi)]=undefined; continue; } /* Verify final CRC-32, if available */ if(obj.crc32!=undefined) { file_crc32=format("%lx",file.crc32); if(obj.crc32!=file_crc32) { file.remove(); printf(!"CRC-32 failure, actual: %s, expected: %s\r\n" ,file_crc32, obj.crc32); continue; } } complete_file(file ,obj.name.toString() ,msg_area.sub[sub_code].attachment_dir); list[li]=undefined; // Remove file entry from database }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4620f721bce5a4597029758a35363435acbf0d09/binarydecoder.js/clean/binarydecoder.js |
printf(!"CRC-32 failure, actual: %s, expected: %s\r\n" ,file_crc32, obj.crc32); | printf("!CRC-32 failure, actual: %08lx, expected: %08lx\r\n" ,file_crc32, crc32); | function combine_parts(list,attachment_dir){ var li; for(li=0; li<list.length; li++) { if(list[li].parts!=list[li].total) continue; var obj=list[li]; var sub_code; printf("File complete: %s (%u parts)\r\n", obj.name, obj.parts); file = new File(system.temp_dir + "binary.tmp"); if(!file.open("w+b")) { printf("!ERROR %d opening/creating %s\r\n", file.error, file.name); continue; } file[obj.codec]=true; /* yenc or uue */ var pi; for(pi=1;pi<=obj.total;pi++) { printf("Processing part %u of %u\r\n",pi,obj.total); var prefix=format("part%u.",pi); sub_code=obj[prefix + "sub"]; msgbase=new MsgBase(sub_code); if(msgbase.open()==false) { printf("!ERROR %s opening msgbase: %s\r\n",msgbase.last_error,sub_code); delete msgbase; break; } ptr=obj[prefix + "msg"]; body = msgbase.get_msg_body( false /* retrieve by offset */ ,ptr /* message number */ ,false /* remove ctrl-a codes */ ,false /* rfc822 formatted text */ ,false /* include tails */ ); if(body == null) { printf("!FAILED to read message number %ld\r\n",ptr); break; } lines=body.split("\r\n"); first_line=obj[prefix + "first_line"]; last_line=obj[prefix + "last_line"]; for(var l=first_line;l<=last_line;l++) file.write(lines[l]); } if(pi<=obj.total) { file.remove(); printf("!Combine failure, removing part %u\r\n",pi); list[li][format("part%u.id",pi)]=undefined; continue; } /* Verify final CRC-32, if available */ if(obj.crc32!=undefined) { file_crc32=format("%lx",file.crc32); if(obj.crc32!=file_crc32) { file.remove(); printf(!"CRC-32 failure, actual: %s, expected: %s\r\n" ,file_crc32, obj.crc32); continue; } } complete_file(file ,obj.name.toString() ,msg_area.sub[sub_code].attachment_dir); list[li]=undefined; // Remove file entry from database }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4620f721bce5a4597029758a35363435acbf0d09/binarydecoder.js/clean/binarydecoder.js |
list[li]=undefined; | list.splice(li--,1); parts_list_modified=true; | function combine_parts(list,attachment_dir){ var li; for(li=0; li<list.length; li++) { if(list[li].parts!=list[li].total) continue; var obj=list[li]; var sub_code; printf("File complete: %s (%u parts)\r\n", obj.name, obj.parts); file = new File(system.temp_dir + "binary.tmp"); if(!file.open("w+b")) { printf("!ERROR %d opening/creating %s\r\n", file.error, file.name); continue; } file[obj.codec]=true; /* yenc or uue */ var pi; for(pi=1;pi<=obj.total;pi++) { printf("Processing part %u of %u\r\n",pi,obj.total); var prefix=format("part%u.",pi); sub_code=obj[prefix + "sub"]; msgbase=new MsgBase(sub_code); if(msgbase.open()==false) { printf("!ERROR %s opening msgbase: %s\r\n",msgbase.last_error,sub_code); delete msgbase; break; } ptr=obj[prefix + "msg"]; body = msgbase.get_msg_body( false /* retrieve by offset */ ,ptr /* message number */ ,false /* remove ctrl-a codes */ ,false /* rfc822 formatted text */ ,false /* include tails */ ); if(body == null) { printf("!FAILED to read message number %ld\r\n",ptr); break; } lines=body.split("\r\n"); first_line=obj[prefix + "first_line"]; last_line=obj[prefix + "last_line"]; for(var l=first_line;l<=last_line;l++) file.write(lines[l]); } if(pi<=obj.total) { file.remove(); printf("!Combine failure, removing part %u\r\n",pi); list[li][format("part%u.id",pi)]=undefined; continue; } /* Verify final CRC-32, if available */ if(obj.crc32!=undefined) { file_crc32=format("%lx",file.crc32); if(obj.crc32!=file_crc32) { file.remove(); printf(!"CRC-32 failure, actual: %s, expected: %s\r\n" ,file_crc32, obj.crc32); continue; } } complete_file(file ,obj.name.toString() ,msg_area.sub[sub_code].attachment_dir); list[li]=undefined; // Remove file entry from database }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4620f721bce5a4597029758a35363435acbf0d09/binarydecoder.js/clean/binarydecoder.js |
file.remove(); | function combine_parts(list,attachment_dir){ var li; for(li=0; li<list.length; li++) { if(list[li].parts!=list[li].total) continue; var obj=list[li]; var sub_code; printf("File complete: %s (%u parts)\r\n", obj.name, obj.parts); file = new File(system.temp_dir + "binary.tmp"); if(!file.open("w+b")) { printf("!ERROR %d opening/creating %s\r\n", file.error, file.name); continue; } file[obj.codec]=true; /* yenc or uue */ var pi; for(pi=1;pi<=obj.total;pi++) { printf("Processing part %u of %u\r\n",pi,obj.total); var prefix=format("part%u.",pi); sub_code=obj[prefix + "sub"]; msgbase=new MsgBase(sub_code); if(msgbase.open()==false) { printf("!ERROR %s opening msgbase: %s\r\n",msgbase.last_error,sub_code); delete msgbase; break; } ptr=obj[prefix + "msg"]; body = msgbase.get_msg_body( false /* retrieve by offset */ ,ptr /* message number */ ,false /* remove ctrl-a codes */ ,false /* rfc822 formatted text */ ,false /* include tails */ ); if(body == null) { printf("!FAILED to read message number %ld\r\n",ptr); break; } lines=body.split("\r\n"); first_line=obj[prefix + "first_line"]; last_line=obj[prefix + "last_line"]; for(var l=first_line;l<=last_line;l++) file.write(lines[l]); delete msgbase; } if(pi<=obj.total) { file.remove(); printf("!Combine failure, removing part %u\r\n",pi); list[li][format("part%u.id",pi)]=undefined; continue; } if(obj.size!=undefined && obj.size!=file.length) { file.remove(); printf("!File length mismatch, actual: %lu, expected: %lu\r\n" ,file.length, obj.size); continue; } /* Verify final CRC-32, if available */ if(obj.crc32!=undefined) { file_crc32=file.crc32; crc32=parseInt(obj.crc32,16); if(crc32!=file_crc32) { file.remove(); printf("!CRC-32 failure, actual: %08lx, expected: %08lx\r\n" ,file_crc32, crc32); continue; } } complete_file(file ,obj.name.toString() ,msg_area.sub[sub_code].attachment_dir); // Remove file entry from database list.splice(li--,1); parts_list_modified=true; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/c6d9fb06744685ed5c71af510665db42cc7db5cd/binarydecoder.js/buggy/binarydecoder.js |
|
file.remove(); | function combine_parts(list,attachment_dir){ var li; for(li=0; li<list.length; li++) { if(list[li].parts!=list[li].total) continue; var obj=list[li]; var sub_code; printf("File complete: %s (%u parts)\r\n", obj.name, obj.parts); file = new File(system.temp_dir + "binary.tmp"); if(!file.open("w+b")) { printf("!ERROR %d opening/creating %s\r\n", file.error, file.name); continue; } file[obj.codec]=true; /* yenc or uue */ var pi; for(pi=1;pi<=obj.total;pi++) { printf("Processing part %u of %u\r\n",pi,obj.total); var prefix=format("part%u.",pi); sub_code=obj[prefix + "sub"]; msgbase=new MsgBase(sub_code); if(msgbase.open()==false) { printf("!ERROR %s opening msgbase: %s\r\n",msgbase.last_error,sub_code); delete msgbase; break; } ptr=obj[prefix + "msg"]; body = msgbase.get_msg_body( false /* retrieve by offset */ ,ptr /* message number */ ,false /* remove ctrl-a codes */ ,false /* rfc822 formatted text */ ,false /* include tails */ ); if(body == null) { printf("!FAILED to read message number %ld\r\n",ptr); break; } lines=body.split("\r\n"); first_line=obj[prefix + "first_line"]; last_line=obj[prefix + "last_line"]; for(var l=first_line;l<=last_line;l++) file.write(lines[l]); delete msgbase; } if(pi<=obj.total) { file.remove(); printf("!Combine failure, removing part %u\r\n",pi); list[li][format("part%u.id",pi)]=undefined; continue; } if(obj.size!=undefined && obj.size!=file.length) { file.remove(); printf("!File length mismatch, actual: %lu, expected: %lu\r\n" ,file.length, obj.size); continue; } /* Verify final CRC-32, if available */ if(obj.crc32!=undefined) { file_crc32=file.crc32; crc32=parseInt(obj.crc32,16); if(crc32!=file_crc32) { file.remove(); printf("!CRC-32 failure, actual: %08lx, expected: %08lx\r\n" ,file_crc32, crc32); continue; } } complete_file(file ,obj.name.toString() ,msg_area.sub[sub_code].attachment_dir); // Remove file entry from database list.splice(li--,1); parts_list_modified=true; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/c6d9fb06744685ed5c71af510665db42cc7db5cd/binarydecoder.js/buggy/binarydecoder.js |
|
file.remove(); | function combine_parts(list,attachment_dir){ var li; for(li=0; li<list.length; li++) { if(list[li].parts!=list[li].total) continue; var obj=list[li]; var sub_code; printf("File complete: %s (%u parts)\r\n", obj.name, obj.parts); file = new File(system.temp_dir + "binary.tmp"); if(!file.open("w+b")) { printf("!ERROR %d opening/creating %s\r\n", file.error, file.name); continue; } file[obj.codec]=true; /* yenc or uue */ var pi; for(pi=1;pi<=obj.total;pi++) { printf("Processing part %u of %u\r\n",pi,obj.total); var prefix=format("part%u.",pi); sub_code=obj[prefix + "sub"]; msgbase=new MsgBase(sub_code); if(msgbase.open()==false) { printf("!ERROR %s opening msgbase: %s\r\n",msgbase.last_error,sub_code); delete msgbase; break; } ptr=obj[prefix + "msg"]; body = msgbase.get_msg_body( false /* retrieve by offset */ ,ptr /* message number */ ,false /* remove ctrl-a codes */ ,false /* rfc822 formatted text */ ,false /* include tails */ ); if(body == null) { printf("!FAILED to read message number %ld\r\n",ptr); break; } lines=body.split("\r\n"); first_line=obj[prefix + "first_line"]; last_line=obj[prefix + "last_line"]; for(var l=first_line;l<=last_line;l++) file.write(lines[l]); delete msgbase; } if(pi<=obj.total) { file.remove(); printf("!Combine failure, removing part %u\r\n",pi); list[li][format("part%u.id",pi)]=undefined; continue; } if(obj.size!=undefined && obj.size!=file.length) { file.remove(); printf("!File length mismatch, actual: %lu, expected: %lu\r\n" ,file.length, obj.size); continue; } /* Verify final CRC-32, if available */ if(obj.crc32!=undefined) { file_crc32=file.crc32; crc32=parseInt(obj.crc32,16); if(crc32!=file_crc32) { file.remove(); printf("!CRC-32 failure, actual: %08lx, expected: %08lx\r\n" ,file_crc32, crc32); continue; } } complete_file(file ,obj.name.toString() ,msg_area.sub[sub_code].attachment_dir); // Remove file entry from database list.splice(li--,1); parts_list_modified=true; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/c6d9fb06744685ed5c71af510665db42cc7db5cd/binarydecoder.js/buggy/binarydecoder.js |
|
printf("File complete: %s (%lu parts)\r\n",list[li].name,list[li].parts); console.pause(); | printf("File complete: %s (%s parts)\r\n" ,list[li].name,list[li].parts.toString()); | function combine_parts(list){ for(li=0; li<list.length; li++) { if(list[li].parts!=list[li].total) continue; printf("File complete: %s (%lu parts)\r\n",list[li].name,list[li].parts); console.pause(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f1e0350271b861b26e082213940b383b444c8f31/binarydecoder.js/buggy/binarydecoder.js |
testCase.debugContext.failed = true; | currentTest.commandComplete = function(result) { if (result.failed) { testCase.debugContext.currentCommand().result = 'failed'; } else if (result.passed) { testCase.debugContext.currentCommand().result = 'passed'; } else { testCase.debugContext.currentCommand().result = 'done'; } editor.view.rowUpdated(testCase.debugContext.debugIndex); } | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/9371877d02d7f62a78dc3fea91bf0c7c05395f87/selenium-runner.js/buggy/src/content/selenium-runner.js |
|
this._checkExpectedFailure(result); | commandComplete : function(result) { if (result.failed) { this.metrics.numCommandFailures += 1; this._recordFailure(result.failureMessage); } else if (result.passed) { this.metrics.numCommandPasses += 1; this.currentRow.markPassed(); } else { this.currentRow.markDone(); } }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/afa54887f887b5863f6af88f1b5293c9af5683a3/selenium-testrunner.js/clean/code/javascript/core/scripts/selenium-testrunner.js |
|
testCase.debugContext.failed = true; | currentTest.commandError = function() { LOG.debug("commandError"); testCase.debugContext.currentCommand().result = 'failed'; editor.view.rowUpdated(testCase.debugContext.debugIndex); } | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/9371877d02d7f62a78dc3fea91bf0c7c05395f87/selenium-runner.js/buggy/src/content/selenium-runner.js |
|
var tempResult = {}; tempResult.passed = false; tempResult.failed = false; tempResult.failureMessage = errorMessage; this._checkExpectedFailure(tempResult); if (tempResult.passed) { this.currentRow.markDone(); return true; } | commandError : function(errorMessage) { this.metrics.numCommandErrors += 1; this._recordFailure(errorMessage); }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/afa54887f887b5863f6af88f1b5293c9af5683a3/selenium-testrunner.js/clean/code/javascript/core/scripts/selenium-testrunner.js |
|
errorMessage = tempResult.failureMessage; | commandError : function(errorMessage) { var tempResult = {}; tempResult.passed = false; tempResult.failed = false; tempResult.failureMessage = errorMessage; this._checkExpectedFailure(tempResult); if (tempResult.passed) { this.currentRow.markDone(); return true; } this.metrics.numCommandErrors += 1; this._recordFailure(errorMessage); }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/34f3afea81e85e36ad46c1cc1603be1f1ebb6368/selenium-testrunner.js/clean/code/javascript/core/scripts/selenium-testrunner.js |
|
tempResult.failed = false; | tempResult.failed = true; tempResult.error = true; | commandError : function(errorMessage) { var tempResult = {}; tempResult.passed = false; tempResult.failed = false; tempResult.failureMessage = errorMessage; this._checkExpectedFailure(tempResult); if (tempResult.passed) { this.currentRow.markDone(); return true; } errorMessage = tempResult.failureMessage; this.metrics.numCommandErrors += 1; this._recordFailure(errorMessage); }, | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/6a42ba3258a1a0e6f69ede0237a670d7c1be9b14/selenium-testrunner.js/clean/code/javascript/core/scripts/selenium-testrunner.js |
this.registerAction = function(name, action) { | this.registerAction = function(name, action, wait) { | function CommandFactory() { this.actions = {}; this.asserts = {}; var self = this; this.registerAction = function(name, action) { var handler = new CommandHandler("action", true, action); this.actions[name] = handler; } this.registerAssert = function(name, assertion, haltOnFailure) { haltOnFailure = (haltOnFailure == undefined) ? false : haltOnFailure; var handler = new CommandHandler("assert", haltOnFailure, assertion); this.asserts[name] = handler; } this.getCommandHandler = function(name) { return this.actions[name] || this.asserts[name] || null; } this.registerAll = function(commandObject) { this.registerAllActions(commandObject); this.registerAllAsserts(commandObject); } this.registerAllActions = function(commandObject) { for (var functionName in commandObject) { if (/^do([A-Z].+)$/.exec(functionName) != null) { var actionName = RegExp["$1"].toCamelCase(); var action = commandObject[functionName]; this.registerAction(actionName, action); } } } this.registerAllAsserts = function(commandObject) { for (var functionName in commandObject) { if (/^assert([A-Z].+)$/.exec(functionName) != null) { var assertName = functionName; var verifyName = "verify" + RegExp["$1"]; var assert = commandObject[functionName]; this.registerAssert(assertName, assert, true); this.registerAssert(verifyName, assert, false); } } }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/d29c3300057cc06e6959278a7a9672474b9dc998/selenium-api.js/clean/javascript/selenium-api.js |
this.registerAction(actionName, action); | this.registerAction(actionName, action, false); var waitActionName = actionName + "AndWait"; this.registerAction(waitActionName, action, true); | function CommandFactory() { this.actions = {}; this.asserts = {}; var self = this; this.registerAction = function(name, action) { var handler = new CommandHandler("action", true, action); this.actions[name] = handler; } this.registerAssert = function(name, assertion, haltOnFailure) { haltOnFailure = (haltOnFailure == undefined) ? false : haltOnFailure; var handler = new CommandHandler("assert", haltOnFailure, assertion); this.asserts[name] = handler; } this.getCommandHandler = function(name) { return this.actions[name] || this.asserts[name] || null; } this.registerAll = function(commandObject) { this.registerAllActions(commandObject); this.registerAllAsserts(commandObject); } this.registerAllActions = function(commandObject) { for (var functionName in commandObject) { if (/^do([A-Z].+)$/.exec(functionName) != null) { var actionName = RegExp["$1"].toCamelCase(); var action = commandObject[functionName]; this.registerAction(actionName, action); } } } this.registerAllAsserts = function(commandObject) { for (var functionName in commandObject) { if (/^assert([A-Z].+)$/.exec(functionName) != null) { var assertName = functionName; var verifyName = "verify" + RegExp["$1"]; var assert = commandObject[functionName]; this.registerAssert(assertName, assert, true); this.registerAssert(verifyName, assert, false); } } }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/d29c3300057cc06e6959278a7a9672474b9dc998/selenium-api.js/clean/javascript/selenium-api.js |
this.registerAction = function(name, action) { | this.registerAction = function(name, action, wait) { | function CommandFactory() { this.actions = {}; this.asserts = {}; var self = this; this.registerAction = function(name, action) { var handler = new CommandHandler("action", true, action); this.actions[name] = handler; } this.registerAssert = function(name, assertion, haltOnFailure) { haltOnFailure = (haltOnFailure == undefined) ? false : haltOnFailure; var handler = new CommandHandler("assert", haltOnFailure, assertion); this.asserts[name] = handler; } this.getCommandHandler = function(name) { return this.actions[name] || this.asserts[name] || null; } this.registerAll = function(commandObject) { this.registerAllActions(commandObject); this.registerAllAsserts(commandObject); } this.registerAllActions = function(commandObject) { for (var functionName in commandObject) { if (/^do([A-Z].+)$/.exec(functionName) != null) { var actionName = RegExp["$1"].toCamelCase(); var action = commandObject[functionName]; this.registerAction(actionName, action); } } } this.registerAllAsserts = function(commandObject) { for (var functionName in commandObject) { if (/^assert([A-Z].+)$/.exec(functionName) != null) { var assertName = functionName; var verifyName = "verify" + RegExp["$1"]; var assert = commandObject[functionName]; this.registerAssert(assertName, assert, true); this.registerAssert(verifyName, assert, false); } } }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/4ef9dce64cb8bc638dd0887dfc6ace54d10ce2e4/selenium-api.js/buggy/javascript/selenium-api.js |
this.registerAction(actionName, action); | this.registerAction(actionName, action, false); var waitActionName = actionName + "AndWait"; this.registerAction(waitActionName, action, true); | function CommandFactory() { this.actions = {}; this.asserts = {}; var self = this; this.registerAction = function(name, action) { var handler = new CommandHandler("action", true, action); this.actions[name] = handler; } this.registerAssert = function(name, assertion, haltOnFailure) { haltOnFailure = (haltOnFailure == undefined) ? false : haltOnFailure; var handler = new CommandHandler("assert", haltOnFailure, assertion); this.asserts[name] = handler; } this.getCommandHandler = function(name) { return this.actions[name] || this.asserts[name] || null; } this.registerAll = function(commandObject) { this.registerAllActions(commandObject); this.registerAllAsserts(commandObject); } this.registerAllActions = function(commandObject) { for (var functionName in commandObject) { if (/^do([A-Z].+)$/.exec(functionName) != null) { var actionName = RegExp["$1"].toCamelCase(); var action = commandObject[functionName]; this.registerAction(actionName, action); } } } this.registerAllAsserts = function(commandObject) { for (var functionName in commandObject) { if (/^assert([A-Z].+)$/.exec(functionName) != null) { var assertName = functionName; var verifyName = "verify" + RegExp["$1"]; var assert = commandObject[functionName]; this.registerAssert(assertName, assert, true); this.registerAssert(verifyName, assert, false); } } }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/4ef9dce64cb8bc638dd0887dfc6ace54d10ce2e4/selenium-api.js/buggy/javascript/selenium-api.js |
document.GM_registerMenuCommand = | e.view.GM_registerMenuCommand = | function CommandManager() { var nextDocId = 1; var docIdsInUse = []; var docMenuCommands = {}; this.loadDoc = function(e) { var docId; var document = e.originalTarget; if (!document.__gmId) { document.__gmId = nextDocId++; } docMenuCommands[document.__gmId] = window.document.createElement('menupopup'); //enclose the docId to register on. //simplifies API, and disallows registering commands on a doc other //than the one the script's on. docId = document.__gmId; document.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); }; } this.unloadDoc = function(e) { var doc = e.originalTarget; if (doc.__gmId) { delete docMenuCommands[doc.__gmId]; } } this.initToolsMenu = function(commandMenu) { var doc = getActiveDocument(); if (commandMenu.firstChild == docMenuCommands[doc.__gmId]) { return; } //show only the popup that's appropriate. if (commandMenu.firstChild) { commandMenu.removeChild(commandMenu.firstChild); } var commandPopup = docMenuCommands[doc.__gmId]; if (commandPopup) { commandMenu.appendChild(commandPopup); var menuItems = commandPopup.childNodes; for (var i = 0; i < menuItems.length; i++) { //couldn't just add listeners when the popup was created //because removing the popup removes all listeners as well. menuItems[i].addEventListener("command", menuItems[i].__gmCommandFunc, false); } commandMenu.setAttribute("disabled", commandPopup.childNodes.length == 0); } } //end initToolsMenus function registerMenuCommand(docId, commandName, commandFunc) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); menuItem.__gmCommandFunc = commandFunc; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); } function getActiveDocument() { var tabbrowser = ge("content"); return tabbrowser.selectedBrowser.contentDocument; }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/d86a63b95a342e64216ae0c9e5a4175acf8ca9a9/greasemonkey.js/clean/src/content/greasemonkey.js |
function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); | function(commandName, commandCallback, accel, access) { registerMenuCommand(docId, commandName, commandCallback, accel, access); | function CommandManager() { var nextDocId = 1; var docIdsInUse = []; var docMenuCommands = {}; this.loadDoc = function(e) { var docId; var document = e.originalTarget; if (!document.__gmId) { document.__gmId = nextDocId++; } docMenuCommands[document.__gmId] = window.document.createElement('menupopup'); //enclose the docId to register on. //simplifies API, and disallows registering commands on a doc other //than the one the script's on. docId = document.__gmId; e.explicitOriginalTarget.defaultView.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); }; } this.unloadDoc = function(e) { var doc = e.originalTarget; if (doc.__gmId) { delete docMenuCommands[doc.__gmId]; } } this.initToolsMenu = function(commandMenu) { var doc = getActiveDocument(); if (commandMenu.firstChild == docMenuCommands[doc.__gmId]) { return; } //show only the popup that's appropriate. if (commandMenu.firstChild) { commandMenu.removeChild(commandMenu.firstChild); } var commandPopup = docMenuCommands[doc.__gmId]; if (commandPopup) { commandMenu.appendChild(commandPopup); var menuItems = commandPopup.childNodes; for (var i = 0; i < menuItems.length; i++) { //couldn't just add listeners when the popup was created //because removing the popup removes all listeners as well. menuItems[i].addEventListener("command", menuItems[i].__gmCommandFunc, false); } commandMenu.setAttribute("disabled", commandPopup.childNodes.length == 0); } } //end initToolsMenus function registerMenuCommand(docId, commandName, commandFunc) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); } function getActiveDocument() { var tabbrowser = ge("content"); return tabbrowser.selectedBrowser.contentDocument; }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/904826b1a895d0db9b1b022eb38190c51df5f2d6/greasemonkey.js/clean/src/content/greasemonkey.js |
function registerMenuCommand(docId, commandName, commandFunc) { | function registerMenuCommand(docId, commandName, commandFunc, accel, access) { | function CommandManager() { var nextDocId = 1; var docIdsInUse = []; var docMenuCommands = {}; this.loadDoc = function(e) { var docId; var document = e.originalTarget; if (!document.__gmId) { document.__gmId = nextDocId++; } docMenuCommands[document.__gmId] = window.document.createElement('menupopup'); //enclose the docId to register on. //simplifies API, and disallows registering commands on a doc other //than the one the script's on. docId = document.__gmId; e.explicitOriginalTarget.defaultView.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); }; } this.unloadDoc = function(e) { var doc = e.originalTarget; if (doc.__gmId) { delete docMenuCommands[doc.__gmId]; } } this.initToolsMenu = function(commandMenu) { var doc = getActiveDocument(); if (commandMenu.firstChild == docMenuCommands[doc.__gmId]) { return; } //show only the popup that's appropriate. if (commandMenu.firstChild) { commandMenu.removeChild(commandMenu.firstChild); } var commandPopup = docMenuCommands[doc.__gmId]; if (commandPopup) { commandMenu.appendChild(commandPopup); var menuItems = commandPopup.childNodes; for (var i = 0; i < menuItems.length; i++) { //couldn't just add listeners when the popup was created //because removing the popup removes all listeners as well. menuItems[i].addEventListener("command", menuItems[i].__gmCommandFunc, false); } commandMenu.setAttribute("disabled", commandPopup.childNodes.length == 0); } } //end initToolsMenus function registerMenuCommand(docId, commandName, commandFunc) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); } function getActiveDocument() { var tabbrowser = ge("content"); return tabbrowser.selectedBrowser.contentDocument; }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/904826b1a895d0db9b1b022eb38190c51df5f2d6/greasemonkey.js/clean/src/content/greasemonkey.js |
if (accel && typeof(accel.key) == "string") { var accelText = ""; if (accel.accel) { accelText += "<accel> + "; accel.accel = true; } else { accel.accel = false; } if (accel.ctrl) { accelText += "<ctrl> + "; accel.ctrl = true; } else { accel.ctrl = false; } if (accel.meta) { accelText += "<meta> + "; accel.meta = true; } else { accel.meta = false; } if (accel.shift) { accelText += "<shift> + "; accel.shift = true; } else { accel.shift = false; } if (accel.alt) { accelText += "<alt> + "; accel.alt = true; } else { accel.alt = false; } accelText += accel.key; menuItem.setAttribute("acceltext", accelText); alert( menuItem.getAttribute("acceltext") ); getActiveDocument().addEventListener("keypress", function(e){ if (/*(e.accelKey == accel.accel) &&*/ (e.ctrlKey == accel.ctrl) && (e.metaKey == accel.meta) && (e.shiftKey == accel.shift) && (e.altKey == accel.alt) && (String.fromCharCode(e.which) == accel.key)) { commandFunc(); } }, false); } | function CommandManager() { var nextDocId = 1; var docIdsInUse = []; var docMenuCommands = {}; this.loadDoc = function(e) { var docId; var document = e.originalTarget; if (!document.__gmId) { document.__gmId = nextDocId++; } docMenuCommands[document.__gmId] = window.document.createElement('menupopup'); //enclose the docId to register on. //simplifies API, and disallows registering commands on a doc other //than the one the script's on. docId = document.__gmId; e.explicitOriginalTarget.defaultView.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); }; } this.unloadDoc = function(e) { var doc = e.originalTarget; if (doc.__gmId) { delete docMenuCommands[doc.__gmId]; } } this.initToolsMenu = function(commandMenu) { var doc = getActiveDocument(); if (commandMenu.firstChild == docMenuCommands[doc.__gmId]) { return; } //show only the popup that's appropriate. if (commandMenu.firstChild) { commandMenu.removeChild(commandMenu.firstChild); } var commandPopup = docMenuCommands[doc.__gmId]; if (commandPopup) { commandMenu.appendChild(commandPopup); var menuItems = commandPopup.childNodes; for (var i = 0; i < menuItems.length; i++) { //couldn't just add listeners when the popup was created //because removing the popup removes all listeners as well. menuItems[i].addEventListener("command", menuItems[i].__gmCommandFunc, false); } commandMenu.setAttribute("disabled", commandPopup.childNodes.length == 0); } } //end initToolsMenus function registerMenuCommand(docId, commandName, commandFunc) { var menuItem; var previousItems; menuItem = window.document.createElement('menuitem'); menuItem.setAttribute("label", commandName); menuItem.__gmCommandFunc = function(e) {commandFunc()}; //menuItem.addEventListener("command", commandFunc, false); previousItems = docMenuCommands[docId].childNodes; var i=0; var nextNode=null; while (i < previousItems.length) { if (commandName.toLowerCase() < previousItems[i].getAttribute('label').toLowerCase()) { nextNode = previousItems[i]; break; } i++; } docMenuCommands[docId].insertBefore(menuItem, nextNode); } function getActiveDocument() { var tabbrowser = ge("content"); return tabbrowser.selectedBrowser.contentDocument; }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/904826b1a895d0db9b1b022eb38190c51df5f2d6/greasemonkey.js/clean/src/content/greasemonkey.js |
|
focusOnElement(inputTableRows[currentCommandRow].cells[0]); | scrollIntoView(inputTableRows[currentCommandRow].cells[0]); | function commandStarted() { inputTableRows[currentCommandRow].bgColor = workingColor; focusOnElement(inputTableRows[currentCommandRow].cells[0]); printMetrics();} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/ac63c6e4dc31ebb5bbbebda5377079a5c465a95a/selenium-fitrunner.js/buggy/code/javascript/selenium-fitrunner.js |
focusOnElement(inputTableRows[currentCommandRow].cells[0]); | scrollIntoView(inputTableRows[currentCommandRow].cells[0]); | function commandStarted() { inputTableRows[currentCommandRow].bgColor = workingColor; focusOnElement(inputTableRows[currentCommandRow].cells[0]); printMetrics();} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/85a78bced5e2713f2426ecafe8d3d4898979331b/selenium-fitrunner.js/buggy/code/javascript/selenium-fitrunner.js |
$('commentform').elements[2].value = ''; $('commentform').elements[2].focus(); | $('commentform').elements[3].value = ''; $('commentform').elements[3].focus(); | function commentAdded(request) { new Effect.BlindDown($('commentList').lastChild); $('commentform').elements[2].value = ''; $('commentform').elements[2].focus();} | 742 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/742/a177a4b5687599ecd0d63f0e57f998a1eef06307/typo.js/buggy/public/javascripts/typo.js |
var left = Convert (ctrl_value, DataType); | var left = Convert (ctrl_value, DataType, validator); | function CompareValidatorEvaluateIsValid (validator){ var ControlToCompare = validator.getAttribute ("controltocompare"); var ValueToCompare = validator.getAttribute ("valuetocompare"); var Operator = validator.getAttribute ("operator").toLowerCase(); var ControlToValidate = validator.getAttribute ("controltovalidate"); var DataType = validator.getAttribute ("datatype"); var ctrl_value = ValidatorTrim (ValidatorGetValue (ControlToValidate)); var compare = (ControlToCompare != null && ControlToCompare != "") ? ValidatorTrim (ValidatorGetValue (ControlToCompare)) : ValueToCompare; var left = Convert (ctrl_value, DataType); if (left == null) { ValidatorFailed (validator); return false; } var right = Convert (compare, DataType); if (right == null) { ValidatorSucceeded (validator); return true; } var result = false; if (Operator == "equal") { result = (left == right); } else if (Operator == "notequal") { result = (left != right); } else if (Operator == "lessthan") { result = (left < right); } else if (Operator == "lessthanequal") { result = (left <= right); } else if (Operator == "greaterthan") { result = (left > right); } else if (Operator == "greaterthanequal") { result = (left >= right); } if (result == false) { ValidatorFailed (validator); return false; } else { ValidatorSucceeded (validator); return true; }} | 7338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7338/f9cd6d0dbb79bde7153e4901d04bc2ceb87dcb68/WebUIValidation_2.0.js/buggy/mcs/class/System.Web/resources/WebUIValidation_2.0.js |
var right = Convert (compare, DataType); | var right = compare != null ? Convert (compare, DataType, validator) : null; | function CompareValidatorEvaluateIsValid (validator){ var ControlToCompare = validator.getAttribute ("controltocompare"); var ValueToCompare = validator.getAttribute ("valuetocompare"); var Operator = validator.getAttribute ("operator").toLowerCase(); var ControlToValidate = validator.getAttribute ("controltovalidate"); var DataType = validator.getAttribute ("datatype"); var ctrl_value = ValidatorTrim (ValidatorGetValue (ControlToValidate)); var compare = (ControlToCompare != null && ControlToCompare != "") ? ValidatorTrim (ValidatorGetValue (ControlToCompare)) : ValueToCompare; var left = Convert (ctrl_value, DataType); if (left == null) { ValidatorFailed (validator); return false; } var right = Convert (compare, DataType); if (right == null) { ValidatorSucceeded (validator); return true; } var result = false; if (Operator == "equal") { result = (left == right); } else if (Operator == "notequal") { result = (left != right); } else if (Operator == "lessthan") { result = (left < right); } else if (Operator == "lessthanequal") { result = (left <= right); } else if (Operator == "greaterthan") { result = (left > right); } else if (Operator == "greaterthanequal") { result = (left >= right); } if (result == false) { ValidatorFailed (validator); return false; } else { ValidatorSucceeded (validator); return true; }} | 7338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7338/f9cd6d0dbb79bde7153e4901d04bc2ceb87dcb68/WebUIValidation_2.0.js/buggy/mcs/class/System.Web/resources/WebUIValidation_2.0.js |
$(fieldset.contentWrapper).css('height', 'auto'); Drupal.collapseScrollIntoView(fieldset); fieldset.animating = false; }, | $(this).css('height', 'auto'); Drupal.collapseScrollIntoView(this.parentNode); this.parentNode.animating = false; }, | complete: function() { $(fieldset.contentWrapper).css('height', 'auto'); Drupal.collapseScrollIntoView(fieldset); fieldset.animating = false; }, | 3650 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3650/57eecc45f6dee8d0df453937cdbd5765e4174d44/collapse.js/buggy/misc/collapse.js |
crc_list.push(format("%lx %s",crc32,fname)); | crc_list.push(format("%08lx %s",crc32,fname)); | function complete_file(file, fname, attachment_dir){ printf("Completing attachment: %s\r\n",fname); md5=file.md5_hex; crc32=file.crc32; file.close(); for(mi=0;mi<md5_list.length;mi++) if(md5_list[mi].substr(0,32)==md5) break; if(mi<md5_list.length) { printf("Duplicate MD5 digest found: %s\r\n",md5_list[mi]); return(false); } md5_list.push(format("%s %s",md5,fname)); for(ci=0;ci<crc_list.length;ci++) if(parseInt(crc_list[ci],16)==crc32) break; if(ci<crc_list.length) { printf("Duplicate CRC-32 found: %s\r\n",crc_list[ci]); return(false); } crc_list.push(format("%lx %s",crc32,fname)); new_fname=fname; file_num=0; while(file_exists(attachment_dir + new_fname) && file_num<1000) { // generate unique name, if necessary ext=fname.lastIndexOf('.'); if(ext<0) ext=""; else ext=fname.slice(ext); // Convert filename.ext to filename.<article>.ext new_fname=format("%.*s.%lu%s",fname.length-ext.length,fname,file_num++,ext); } fname=attachment_dir + new_fname; if(!file_rename(file.name,fname)) { printf("Error %d renaming %s to %s\r\n",errno,file.name,fname); return(false); } printf("Attachment saved as: %s\r\n",fname); completed_files++; return(true);} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4620f721bce5a4597029758a35363435acbf0d09/binarydecoder.js/clean/binarydecoder.js |
'path-info-check', 'zts', 'ipv6', 'memory-limit' | 'path-info-check', 'zts', 'ipv6', 'memory-limit', 'zend-multibyte' | function conf_process_args(){ var i, j; var configure_help_mode = false; var analyzed = false; var nice = "cscript /nologo configure.js "; var disable_all = false; args = WScript.Arguments; for (i = 0; i < args.length; i++) { arg = args(i); nice += ' "' + arg + '"'; if (arg == "--help") { configure_help_mode = true; break; } if (arg == "--disable-all") { disable_all = true; continue; } // If it is --foo=bar, split on the equals sign arg = arg.split("=", 2); argname = arg[0]; if (arg.length > 1) { argval = arg[1]; } else { argval = null; } // Find the arg found = false; for (j = 0; j < configure_args.length; j++) { if (argname == configure_args[j].imparg || argname == configure_args[j].arg) { found = true; arg = configure_args[j]; arg.seen = true; analyzed = analyze_arg(argval); shared = analyzed[0]; argval = analyzed[1]; if (argname == arg.imparg) { /* we matched the implicit, or default arg */ if (argval == null) { argval = arg.defval; } } else { /* we matched the non-default arg */ if (argval == null) { argval = arg.defval == "no" ? "yes" : "no"; } } arg.argval = argval; eval("PHP_" + arg.symval + " = argval;"); eval("PHP_" + arg.symval + "_SHARED = shared;"); break; } } if (!found) { STDERR.WriteLine("Unknown option " + argname + "; please try configure.js --help for a list of valid options"); WScript.Quit(2); } } if (configure_help_mode) { STDOUT.WriteLine(word_wrap_and_indent(0,"Options that enable extensions and SAPI will accept \'yes' or 'no' as a parameter. They also accept 'shared' \as a synonym for 'yes' and request a shared build of that \module. Not all modules can be built as shared modules; \configure will display [shared] after the module name if \can be built that way. \" )); STDOUT.WriteBlankLines(1); // Measure width to pretty-print the output max_width = 0; for (i = 0; i < configure_args.length; i++) { arg = configure_args[i]; if (arg.arg.length > max_width) max_width = arg.arg.length; } for (i = 0; i < configure_args.length; i++) { arg = configure_args[i]; n = max_width - arg.arg.length; pad = " "; for (j = 0; j < n; j++) { pad += " "; } STDOUT.WriteLine(" " + arg.arg + pad + word_wrap_and_indent(max_width + 5, arg.helptext)); } WScript.Quit(1); } var snapshot_build_exclusions = new Array( 'debug', 'crt-debug', 'lzf-better-compression', 'php-build', 'snapshot-template', 'pcre-regex', 'fastcgi', 'force-cgi-redirect', 'path-info-check', 'zts', 'ipv6', 'memory-limit' ); var force; // Now set any defaults we might have missed out earlier for (i = 0; i < configure_args.length; i++) { arg = configure_args[i]; if (arg.seen) continue; analyzed = analyze_arg(arg.defval); shared = analyzed[0]; argval = analyzed[1]; // Don't trust a default "yes" answer for a non-core module // in a snapshot build if (PHP_SNAPSHOT_BUILD != "no" && argval == "yes" && !shared) { force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { if (snapshot_build_exclusions[j] == arg.optname) { force = false; break; } } if (force) { /* now check if it is a core module */ force = false; for (j = 0; j < core_module_list.length; j++) { if (core_module_list[j] == arg.optname) { force = true; break; } } if (!force) { STDOUT.WriteLine("snapshot: forcing " + arg.arg + " shared"); shared = true; } } } if (PHP_SNAPSHOT_BUILD != "no" && argval == "no") { force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { if (snapshot_build_exclusions[j] == arg.optname) { force = false; break; } } if (force) { STDOUT.WriteLine("snapshot: forcing " + arg.optname + " on"); argval = "yes"; shared = true; } } if (disable_all) { force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { if (snapshot_build_exclusions[j] == arg.optname) { force = false; break; } } if (force) { argval = "no"; shared = false; } } eval("PHP_" + arg.symval + " = argval;"); eval("PHP_" + arg.symval + "_SHARED = shared;"); } MFO = FSO.CreateTextFile("Makefile.objects", true); STDOUT.WriteLine("Saving configure options to config.nice.bat"); var nicefile = FSO.CreateTextFile("config.nice.bat", true); nicefile.WriteLine(nice); nicefile.Close(); AC_DEFINE('CONFIGURE_COMMAND', nice);} | 631 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/631/a92ae61cb8324aae67994269ccad4961b3dd9d04/confutils.js/clean/win32/build/confutils.js |
if (nice.length + arg.length < 2045) { nice += ' "' + arg + '"'; } | nice += ' "' + arg + '"'; | function conf_process_args(){ var i, j; var configure_help_mode = false; var analyzed = false; var nice = "cscript /nologo configure.js "; var disable_all = false; args = WScript.Arguments; for (i = 0; i < args.length; i++) { arg = args(i); if (nice.length + arg.length < 2045) { // The max string length for CONFIGURE_COMMAND is 2048 in VC6 nice += ' "' + arg + '"'; } if (arg == "--help") { configure_help_mode = true; break; } if (arg == "--disable-all") { disable_all = true; continue; } // If it is --foo=bar, split on the equals sign arg = arg.split("=", 2); argname = arg[0]; if (arg.length > 1) { argval = arg[1]; } else { argval = null; } // Find the arg found = false; for (j = 0; j < configure_args.length; j++) { if (argname == configure_args[j].imparg || argname == configure_args[j].arg) { found = true; arg = configure_args[j]; arg.seen = true; analyzed = analyze_arg(argval); shared = analyzed[0]; argval = analyzed[1]; if (argname == arg.imparg) { /* we matched the implicit, or default arg */ if (argval == null) { argval = arg.defval; } } else { /* we matched the non-default arg */ if (argval == null) { argval = arg.defval == "no" ? "yes" : "no"; } } arg.argval = argval; eval("PHP_" + arg.symval + " = argval;"); eval("PHP_" + arg.symval + "_SHARED = shared;"); break; } } if (!found) { STDERR.WriteLine("Unknown option " + argname + "; please try configure.js --help for a list of valid options"); WScript.Quit(2); } } if (configure_help_mode) { STDOUT.WriteLine(word_wrap_and_indent(0,"Options that enable extensions and SAPI will accept \'yes' or 'no' as a parameter. They also accept 'shared' \as a synonym for 'yes' and request a shared build of that \module. Not all modules can be built as shared modules; \configure will display [shared] after the module name if \can be built that way. \" )); STDOUT.WriteBlankLines(1); // Measure width to pretty-print the output max_width = 0; for (i = 0; i < configure_args.length; i++) { arg = configure_args[i]; if (arg.arg.length > max_width) max_width = arg.arg.length; } for (i = 0; i < configure_args.length; i++) { arg = configure_args[i]; n = max_width - arg.arg.length; pad = " "; for (j = 0; j < n; j++) { pad += " "; } STDOUT.WriteLine(" " + arg.arg + pad + word_wrap_and_indent(max_width + 5, arg.helptext)); } WScript.Quit(1); } var snapshot_build_exclusions = new Array( 'debug', 'crt-debug', 'lzf-better-compression', 'php-build', 'snapshot-template', 'pcre-regex', 'fastcgi', 'force-cgi-redirect', 'path-info-check', 'zts', 'ipv6', 'memory-limit' ); var force; // Now set any defaults we might have missed out earlier for (i = 0; i < configure_args.length; i++) { arg = configure_args[i]; if (arg.seen) continue; analyzed = analyze_arg(arg.defval); shared = analyzed[0]; argval = analyzed[1]; // Don't trust a default "yes" answer for a non-core module // in a snapshot build if (PHP_SNAPSHOT_BUILD != "no" && argval == "yes" && !shared) { force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { if (snapshot_build_exclusions[j] == arg.optname) { force = false; break; } } if (force) { /* now check if it is a core module */ force = false; for (j = 0; j < core_module_list.length; j++) { if (core_module_list[j] == arg.optname) { force = true; break; } } if (!force) { STDOUT.WriteLine("snapshot: forcing " + arg.arg + " shared"); shared = true; } } } if (PHP_SNAPSHOT_BUILD != "no" && argval == "no") { force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { if (snapshot_build_exclusions[j] == arg.optname) { force = false; break; } } if (force) { STDOUT.WriteLine("snapshot: forcing " + arg.optname + " on"); argval = "yes"; shared = true; } } if (disable_all) { force = true; for (j = 0; j < snapshot_build_exclusions.length; j++) { if (snapshot_build_exclusions[j] == arg.optname) { force = false; break; } } if (force) { argval = "no"; shared = false; } } eval("PHP_" + arg.symval + " = argval;"); eval("PHP_" + arg.symval + "_SHARED = shared;"); } MFO = FSO.CreateTextFile("Makefile.objects", true); STDOUT.WriteLine("Saving configure options to config.nice.bat"); var nicefile = FSO.CreateTextFile("config.nice.bat", true); nicefile.WriteLine(nice); nicefile.Close(); AC_DEFINE('CONFIGURE_COMMAND', nice);} | 631 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/631/e7aeb7a4c8f8b8eedc990308a9cd6bdb17a55b38/confutils.js/clean/win32/build/confutils.js |
if (!base) { base = "gm_script"; } | function Config() { this.onload = null; this.scripts = null; this.find = function(namespace, name) { namespace = namespace.toLowerCase(); name = name.toLowerCase(); for (var i = 0, script = null; (script = this.scripts[i]); i++) { if (script.namespace.toLowerCase() == namespace && script.name.toLowerCase() == name) { return i; } } return -1; } this.initFilename = function(script) { var index = {}; var base = script.name.replace(/[^A-Z0-9_]/gi, "").toLowerCase(); // 24 is a totally arbitrary max length if (base.length > 24) { base = base.substring(0, 24); } for (var i = 0; i < this.scripts.length; i++) { index[this.scripts[i].filename] = this.scripts[i]; } if (!index[base + ".user.js"]) { script.filename = base + ".user.js"; return; } for (var count = 1; count < Number.MAX_VALUE; count++) { if (!index[base + count + ".user.js"]) { script.filename = base + count + ".user.js"; return; } } throw new Error("doooooooode. get some different user script or something."); } this.load = function() { var doc = document.implementation.createDocument("", "", null); doc.async = false; try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } var nodes = document.evaluate("/UserScriptConfig/Script", doc, null, 0, null); this.scripts = []; for (var node = null; (node = nodes.iterateNext()); ) { var script = new Script(); for (var i = 0, childNode = null; (childNode = node.childNodes[i]); i++) { if (childNode.nodeName == "Include") { script.includes.push(childNode.firstChild.nodeValue); } else if (childNode.nodeName == "Exclude") { script.excludes.push(childNode.firstChild.nodeValue); } } script.filename = node.getAttribute("filename"); script.name = node.getAttribute("name"); script.namespace = node.getAttribute("namespace"); script.description = node.getAttribute("description"); script.enabled = node.getAttribute("enabled") == true.toString(); this.scripts.push(script); } } this.save = function() { var doc = document.implementation.createDocument("", "UserScriptConfig", null); for (var i = 0, scriptObj = null; (scriptObj = this.scripts[i]); i++) { var scriptNode = doc.createElement("Script"); for (var j = 0; j < scriptObj.includes.length; j++) { var includeNode = doc.createElement("Include"); includeNode.appendChild(doc.createTextNode(scriptObj.includes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(includeNode); } for (var j = 0; j < scriptObj.excludes.length; j++) { var excludeNode = doc.createElement("Exclude"); excludeNode.appendChild(doc.createTextNode(scriptObj.excludes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(excludeNode); } scriptNode.appendChild(doc.createTextNode("\n\t")); scriptNode.setAttribute("filename", scriptObj.filename); scriptNode.setAttribute("name", scriptObj.name); scriptNode.setAttribute("namespace", scriptObj.namespace); scriptNode.setAttribute("description", scriptObj.description); scriptNode.setAttribute("enabled", scriptObj.enabled); doc.firstChild.appendChild(doc.createTextNode("\n\t")); doc.firstChild.appendChild(scriptNode); } doc.firstChild.appendChild(doc.createTextNode("\n")) var configStream = getWriteStream(getScriptFile("config.xml")); new XMLSerializer().serializeToStream(doc, configStream, "utf-8"); configStream.close(); }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/19f3148325aee62fc8ed969890b86473177554ae/config.js/clean/src/content/config.js |
|
doc.load(getScriptChrome("config.xml")); | try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } | function Config() { this.onload = null; this.scripts = null; this.find = function(namespace, name) { namespace = namespace.toLowerCase(); name = name.toLowerCase(); for (var i = 0, script = null; (script = this.scripts[i]); i++) { if (script.namespace.toLowerCase() == namespace && script.name.toLowerCase() == name) { return i; } } return -1; } this.load = function() { var doc = document.implementation.createDocument("", "", null); doc.async = false; doc.load(getScriptChrome("config.xml")); var nodes = document.evaluate("/UserScriptConfig/Script", doc, null, 0, null); this.scripts = []; for (var node = null; (node = nodes.iterateNext()); ) { var script = new Script(); for (var i = 0, childNode = null; (childNode = node.childNodes[i]); i++) { if (childNode.nodeName == "Include") { script.includes.push(childNode.firstChild.nodeValue); } else if (childNode.nodeName == "Exclude") { script.excludes.push(childNode.firstChild.nodeValue); } } script.id = node.getAttribute("id"); script.name = node.getAttribute("name"); script.namespace = node.getAttribute("namespace"); script.description = node.getAttribute("description"); script.enabled = node.getAttribute("enabled") == true.toString(); this.scripts.push(script); } } this.save = function() { var doc = document.implementation.createDocument("", "UserScriptConfig", null); for (var i = 0, scriptObj = null; (scriptObj = this.scripts[i]); i++) { var scriptNode = doc.createElement("Script"); for (var j = 0; j < scriptObj.includes.length; j++) { var includeNode = doc.createElement("Include"); includeNode.appendChild(doc.createTextNode(scriptObj.includes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(includeNode); } for (var j = 0; j < scriptObj.excludes.length; j++) { var excludeNode = doc.createElement("Exclude"); excludeNode.appendChild(doc.createTextNode(scriptObj.excludes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(excludeNode); } scriptNode.appendChild(doc.createTextNode("\n\t")); scriptNode.setAttribute("id", scriptObj.id); scriptNode.setAttribute("name", scriptObj.name); scriptNode.setAttribute("namespace", scriptObj.namespace); scriptNode.setAttribute("description", scriptObj.description); scriptNode.setAttribute("enabled", scriptObj.enabled); doc.firstChild.appendChild(doc.createTextNode("\n\t")); doc.firstChild.appendChild(scriptNode); } doc.firstChild.appendChild(doc.createTextNode("\n")) var configStream = getWriteStream("config.xml"); new XMLSerializer().serializeToStream(doc, configStream, "utf-8"); configStream.close(); }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/93cdf35046325b8aae790fb34f96e307db2c2f49/greasemonkey.js/clean/src/content/greasemonkey.js |
function Config() { | function Config(configFile) { | function Config() { this.onload = null; this.scripts = null; this.find = function(namespace, name) { namespace = namespace.toLowerCase(); name = name.toLowerCase(); for (var i = 0, script = null; (script = this.scripts[i]); i++) { if (script.namespace.toLowerCase() == namespace && script.name.toLowerCase() == name) { return i; } } return -1; } this.initFilename = function(script) { var index = {}; var base = script.name.replace(/[^A-Z0-9_]/gi, "").toLowerCase(); // If no Latin characters found - use default if (!base) { base = "gm_script"; } // 24 is a totally arbitrary max length if (base.length > 24) { base = base.substring(0, 24); } for (var i = 0; i < this.scripts.length; i++) { index[this.scripts[i].filename] = this.scripts[i]; } if (!index[base + ".user.js"]) { script.filename = base + ".user.js"; return; } for (var count = 1; count < Number.MAX_VALUE; count++) { if (!index[base + count + ".user.js"]) { script.filename = base + count + ".user.js"; return; } } throw new Error("doooooooode. get some different user script or something."); } this.load = function() { var doc = document.implementation.createDocument("", "", null); doc.async = false; try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } var nodes = document.evaluate("/UserScriptConfig/Script", doc, null, 0, null); this.scripts = []; for (var node = null; (node = nodes.iterateNext()); ) { var script = new Script(); for (var i = 0, childNode = null; (childNode = node.childNodes[i]); i++) { if (childNode.nodeName == "Include") { script.includes.push(childNode.firstChild.nodeValue); } else if (childNode.nodeName == "Exclude") { script.excludes.push(childNode.firstChild.nodeValue); } } script.filename = node.getAttribute("filename"); script.name = node.getAttribute("name"); script.namespace = node.getAttribute("namespace"); script.description = node.getAttribute("description"); script.enabled = node.getAttribute("enabled") == true.toString(); this.scripts.push(script); } } this.save = function() { var doc = document.implementation.createDocument("", "UserScriptConfig", null); for (var i = 0, scriptObj = null; (scriptObj = this.scripts[i]); i++) { var scriptNode = doc.createElement("Script"); for (var j = 0; j < scriptObj.includes.length; j++) { var includeNode = doc.createElement("Include"); includeNode.appendChild(doc.createTextNode(scriptObj.includes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(includeNode); } for (var j = 0; j < scriptObj.excludes.length; j++) { var excludeNode = doc.createElement("Exclude"); excludeNode.appendChild(doc.createTextNode(scriptObj.excludes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(excludeNode); } scriptNode.appendChild(doc.createTextNode("\n\t")); scriptNode.setAttribute("filename", scriptObj.filename); scriptNode.setAttribute("name", scriptObj.name); scriptNode.setAttribute("namespace", scriptObj.namespace); scriptNode.setAttribute("description", scriptObj.description); scriptNode.setAttribute("enabled", scriptObj.enabled); doc.firstChild.appendChild(doc.createTextNode("\n\t")); doc.firstChild.appendChild(scriptNode); } doc.firstChild.appendChild(doc.createTextNode("\n")) var configStream = getWriteStream(getScriptFile("config.xml")); new XMLSerializer().serializeToStream(doc, configStream, "utf-8"); configStream.close(); }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/fec534de049cc4effd22b41bf1cfa71367d36fa3/config.js/buggy/src/content/config.js |
try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } | doc.load(configURI.spec); | function Config() { this.onload = null; this.scripts = null; this.find = function(namespace, name) { namespace = namespace.toLowerCase(); name = name.toLowerCase(); for (var i = 0, script = null; (script = this.scripts[i]); i++) { if (script.namespace.toLowerCase() == namespace && script.name.toLowerCase() == name) { return i; } } return -1; } this.initFilename = function(script) { var index = {}; var base = script.name.replace(/[^A-Z0-9_]/gi, "").toLowerCase(); // If no Latin characters found - use default if (!base) { base = "gm_script"; } // 24 is a totally arbitrary max length if (base.length > 24) { base = base.substring(0, 24); } for (var i = 0; i < this.scripts.length; i++) { index[this.scripts[i].filename] = this.scripts[i]; } if (!index[base + ".user.js"]) { script.filename = base + ".user.js"; return; } for (var count = 1; count < Number.MAX_VALUE; count++) { if (!index[base + count + ".user.js"]) { script.filename = base + count + ".user.js"; return; } } throw new Error("doooooooode. get some different user script or something."); } this.load = function() { var doc = document.implementation.createDocument("", "", null); doc.async = false; try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } var nodes = document.evaluate("/UserScriptConfig/Script", doc, null, 0, null); this.scripts = []; for (var node = null; (node = nodes.iterateNext()); ) { var script = new Script(); for (var i = 0, childNode = null; (childNode = node.childNodes[i]); i++) { if (childNode.nodeName == "Include") { script.includes.push(childNode.firstChild.nodeValue); } else if (childNode.nodeName == "Exclude") { script.excludes.push(childNode.firstChild.nodeValue); } } script.filename = node.getAttribute("filename"); script.name = node.getAttribute("name"); script.namespace = node.getAttribute("namespace"); script.description = node.getAttribute("description"); script.enabled = node.getAttribute("enabled") == true.toString(); this.scripts.push(script); } } this.save = function() { var doc = document.implementation.createDocument("", "UserScriptConfig", null); for (var i = 0, scriptObj = null; (scriptObj = this.scripts[i]); i++) { var scriptNode = doc.createElement("Script"); for (var j = 0; j < scriptObj.includes.length; j++) { var includeNode = doc.createElement("Include"); includeNode.appendChild(doc.createTextNode(scriptObj.includes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(includeNode); } for (var j = 0; j < scriptObj.excludes.length; j++) { var excludeNode = doc.createElement("Exclude"); excludeNode.appendChild(doc.createTextNode(scriptObj.excludes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(excludeNode); } scriptNode.appendChild(doc.createTextNode("\n\t")); scriptNode.setAttribute("filename", scriptObj.filename); scriptNode.setAttribute("name", scriptObj.name); scriptNode.setAttribute("namespace", scriptObj.namespace); scriptNode.setAttribute("description", scriptObj.description); scriptNode.setAttribute("enabled", scriptObj.enabled); doc.firstChild.appendChild(doc.createTextNode("\n\t")); doc.firstChild.appendChild(scriptNode); } doc.firstChild.appendChild(doc.createTextNode("\n")) var configStream = getWriteStream(getScriptFile("config.xml")); new XMLSerializer().serializeToStream(doc, configStream, "utf-8"); configStream.close(); }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/fec534de049cc4effd22b41bf1cfa71367d36fa3/config.js/buggy/src/content/config.js |
var configStream = getWriteStream(getScriptFile("config.xml")); | var configStream = getWriteStream(this.configFile); | function Config() { this.onload = null; this.scripts = null; this.find = function(namespace, name) { namespace = namespace.toLowerCase(); name = name.toLowerCase(); for (var i = 0, script = null; (script = this.scripts[i]); i++) { if (script.namespace.toLowerCase() == namespace && script.name.toLowerCase() == name) { return i; } } return -1; } this.initFilename = function(script) { var index = {}; var base = script.name.replace(/[^A-Z0-9_]/gi, "").toLowerCase(); // If no Latin characters found - use default if (!base) { base = "gm_script"; } // 24 is a totally arbitrary max length if (base.length > 24) { base = base.substring(0, 24); } for (var i = 0; i < this.scripts.length; i++) { index[this.scripts[i].filename] = this.scripts[i]; } if (!index[base + ".user.js"]) { script.filename = base + ".user.js"; return; } for (var count = 1; count < Number.MAX_VALUE; count++) { if (!index[base + count + ".user.js"]) { script.filename = base + count + ".user.js"; return; } } throw new Error("doooooooode. get some different user script or something."); } this.load = function() { var doc = document.implementation.createDocument("", "", null); doc.async = false; try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } var nodes = document.evaluate("/UserScriptConfig/Script", doc, null, 0, null); this.scripts = []; for (var node = null; (node = nodes.iterateNext()); ) { var script = new Script(); for (var i = 0, childNode = null; (childNode = node.childNodes[i]); i++) { if (childNode.nodeName == "Include") { script.includes.push(childNode.firstChild.nodeValue); } else if (childNode.nodeName == "Exclude") { script.excludes.push(childNode.firstChild.nodeValue); } } script.filename = node.getAttribute("filename"); script.name = node.getAttribute("name"); script.namespace = node.getAttribute("namespace"); script.description = node.getAttribute("description"); script.enabled = node.getAttribute("enabled") == true.toString(); this.scripts.push(script); } } this.save = function() { var doc = document.implementation.createDocument("", "UserScriptConfig", null); for (var i = 0, scriptObj = null; (scriptObj = this.scripts[i]); i++) { var scriptNode = doc.createElement("Script"); for (var j = 0; j < scriptObj.includes.length; j++) { var includeNode = doc.createElement("Include"); includeNode.appendChild(doc.createTextNode(scriptObj.includes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(includeNode); } for (var j = 0; j < scriptObj.excludes.length; j++) { var excludeNode = doc.createElement("Exclude"); excludeNode.appendChild(doc.createTextNode(scriptObj.excludes[j])); scriptNode.appendChild(doc.createTextNode("\n\t\t")); scriptNode.appendChild(excludeNode); } scriptNode.appendChild(doc.createTextNode("\n\t")); scriptNode.setAttribute("filename", scriptObj.filename); scriptNode.setAttribute("name", scriptObj.name); scriptNode.setAttribute("namespace", scriptObj.namespace); scriptNode.setAttribute("description", scriptObj.description); scriptNode.setAttribute("enabled", scriptObj.enabled); doc.firstChild.appendChild(doc.createTextNode("\n\t")); doc.firstChild.appendChild(scriptNode); } doc.firstChild.appendChild(doc.createTextNode("\n")) var configStream = getWriteStream(getScriptFile("config.xml")); new XMLSerializer().serializeToStream(doc, configStream, "utf-8"); configStream.close(); }} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/fec534de049cc4effd22b41bf1cfa71367d36fa3/config.js/buggy/src/content/config.js |
document.location = "/cgi-bin/setConfigSwapFile?swap="+swapfileconfig.swap.value+"&swapfile="+swapfileconfig.swapfile.value; | var activate = "off"; if (swapfileconfig.swap.checked) activate = "on"; document.location = "/cgi-bin/setConfigSwapFile?swap="+activate+"&swapfile="+swapfileconfig.swapfile.value; setTimeout("reload()", 500); | function configSwapFile(){ document.location = "/cgi-bin/setConfigSwapFile?swap="+swapfileconfig.swap.value+"&swapfile="+swapfileconfig.swapfile.value;} | 6281 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6281/358887bd1cbc9a7960b3e84806defd242e103013/index.js/clean/tuxbox/enigma/data/htdocs/index.js |
if (defval == "yes") { | if (defval == "yes" || defval == "yes,shared") { | function ConfigureArg(type, optname, helptext, defval){ var opptype = type == "enable" ? "disable" : "without"; if (defval == "yes") { this.arg = "--" + opptype + "-" + optname; this.imparg = "--" + type + "-" + optname; } else { this.arg = "--" + type + "-" + optname; this.imparg = "--" + opptype + "-" + optname; } this.optname = optname; this.helptext = helptext; this.defval = defval; this.symval = optname.toUpperCase().replace(new RegExp("-", "g"), "_"); this.seen = false; this.argval = defval;} | 631 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/631/8307c0204cf94dfb9526d396f8fa58ecf410e327/confutils.js/buggy/win32/build/confutils.js |
this.relayBotToRC("browserbot.recordedConfirmations"); | self.relayBotToRC("browserbot.recordedConfirmations"); | windowToModify.confirm = function(message) { browserBot.recordedConfirmations.push(message); var result = browserBot.nextConfirmResult; browserBot.nextConfirmResult = true; this.relayBotToRC("browserbot.recordedConfirmations"); return result; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/597db026a27d087796d40449393d678692b54f42/selenium-browserbot.js/clean/code/javascript/core/scripts/selenium-browserbot.js |
relayBotToRC("browserbot.recordedConfirmations"); | windowToModify.confirm = function(message) { browserBot.recordedConfirmations.push(message); var result = browserBot.nextConfirmResult; browserBot.nextConfirmResult = true; relayBotToRC("browserbot.recordedConfirmations"); return result; }; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/a45590122265044fcacdd946fda9f4d780897b18/selenium-browserbot.js/buggy/code/javascript/core/scripts/selenium-browserbot.js |
|
var elm = tinyMCE.isMSIE ? event.srcElement : e.target; | var elm = tinyMCE.isIE ? event.srcElement : e.target; | confirmAdd : function(e, settings) { var elm = tinyMCE.isMSIE ? event.srcElement : e.target; var elementId = elm.name ? elm.name : elm.id; tinyMCE.settings = settings; if (tinyMCE.settings['convert_on_click'] || (!elm.getAttribute('mce_noask') && confirm(tinyMCELang['lang_edit_confirm']))) tinyMCE.addMCEControl(elm, elementId); elm.setAttribute('mce_noask', 'true'); }, | 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 |
ans = confirm(msg); if (ans) { | ans = confirm(msg); if (ans) { | function confirmDelete(obj) { var msg = "Are you sure you want to delete this " + obj + "?"; ans = confirm(msg); if (ans) { return true; } else { return false; }} | 2320 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2320/26bac02e83e8bb40df04e0c206b37537e12dd86f/global.js/buggy/web/scripts/global.js |
} else { | } else { | function confirmDelete(obj) { var msg = "Are you sure you want to delete this " + obj + "?"; ans = confirm(msg); if (ans) { return true; } else { return false; }} | 2320 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2320/26bac02e83e8bb40df04e0c206b37537e12dd86f/global.js/buggy/web/scripts/global.js |
connect_sock.send("SERVER " + servername + " 1 :" + serverdesc + "\r\n"); | connect_sock.send("SERVER " + servername + " 1 :" + serverdesc +"\r\n"); | function connect_to_server(this_cline,the_port) { var connect_sock; var new_id; if (!the_port && this_cline.port) the_port = this_cline.port; else if (!the_port) the_port = default_port; // try a safe default. connect_sock = new Socket(); connect_sock.bind(0,server.interface_ip_address); connect_sock.connect(this_cline.host,the_port,ob_sock_timeout); var sendts = true; /* Assume Bahamut */ for (nl in NLines) { var mynl = NLines[nl]; if ((mynl.flags&NLINE_IS_DREAMFORGE) && (mynl.servername == this_cline.servername)) { sendts = false; break; } } if (connect_sock.is_connected) { umode_notice(USERMODE_ROUTING,"Routing", "Connected! Sending info..."); var sendstr = "PASS " + this_cline.password; if (sendts) sendstr += " :TS"; connect_sock.send(sendstr + "\r\n"); connect_sock.send("CAPAB " + server_capab + "\r\n"); connect_sock.send("SERVER " + servername + " 1 :" + serverdesc + "\r\n"); new_id = "id" + next_client_id; next_client_id++; Unregistered[new_id]=new Unregistered_Client(new_id,connect_sock); Unregistered[new_id].sendps = false; // Don't do P/S pair again Unregistered[new_id].outgoing = true; /* Outgoing Connection */ } this_cline.lastconnect = time();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/03cf2ad9cc981ddecb083920f6876e8a26b9be78/ircd.js/buggy/ircd.js |
Unregistered[new_id].sentps = true; | Unregistered[new_id].sendps = false; | function connect_to_server(this_cline,the_port) { var connect_sock; var new_id; if (!the_port && this_cline.port) the_port = this_cline.port; else if (!the_port) the_port = default_port; // try a safe default. connect_sock = new Socket(); connect_sock.bind(0,server.interface_ip_address); connect_sock.connect(this_cline.host,the_port,ob_sock_timeout); if (connect_sock.is_connected) { umode_notice(USERMODE_ROUTING,"Routing", "Connected! Sending info..."); connect_sock.send("PASS " + this_cline.password + " :TS\r\n"); connect_sock.send("CAPAB " + server_capab + "\r\n"); connect_sock.send("SERVER " + servername + " 1 :" + serverdesc + "\r\n"); new_id = "id" + next_client_id; next_client_id++; Unregistered[new_id]=new Unregistered_Client(new_id,connect_sock); Unregistered[new_id].sentps = true; } this_cline.lastconnect = time();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a24aaeab22e426a0fcb1f18b8c71f6f5f65bba1/ircd.js/clean/ircd.js |
Unregistered[new_id].outgoing = true; /* Outgoing Connection */ | function connect_to_server(this_cline,the_port) { var connect_sock; var new_id; if (!the_port && this_cline.port) the_port = this_cline.port; else if (!the_port) the_port = default_port; // try a safe default. connect_sock = new Socket(); connect_sock.bind(0,server.interface_ip_address); connect_sock.connect(this_cline.host,the_port,ob_sock_timeout); if (connect_sock.is_connected) { umode_notice(USERMODE_ROUTING,"Routing", "Connected! Sending info..."); connect_sock.send("PASS " + this_cline.password + " :TS\r\n"); connect_sock.send("CAPAB " + server_capab + "\r\n"); connect_sock.send("SERVER " + servername + " 1 :" + serverdesc + "\r\n"); new_id = "id" + next_client_id; next_client_id++; Unregistered[new_id]=new Unregistered_Client(new_id,connect_sock); Unregistered[new_id].sendps = false; // Don't do P/S pair again } this_cline.lastconnect = time();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/c4161b4238ac188c25d8933c176e550453eec07c/ircd.js/clean/ircd.js |
|
server_wallops("Connected! Sending info.."); | oper_notice("Routing","Connected! Sending info..."); | function connect_to_server(this_cline,the_port) { if (!the_port && this_cline.port) the_port = this_cline.port; else if (!the_port) the_port = "6667"; // try a safe default. connect_sock = new Socket(); connect_sock.connect(this_cline.host,the_port,ob_sock_timeout); if (connect_sock.is_connected) { server_wallops("Connected! Sending info.."); connect_sock.send("PASS " + this_cline.password + " :TS\r\n"); connect_sock.send("CAPAB " + server_capab + "\r\n"); connect_sock.send("SERVER " + servername + " 1 :" + serverdesc + "\r\n"); new_id = get_next_clientid(); Clients[new_id]=new IRCClient(connect_sock,new_id,true,true); Clients[new_id].sentps = true; } this_cline.lastconnect = time();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
log("Connecting to server: " + this_cline.host); | var connect_sock; var new_id; | function connect_to_server(this_cline,the_port) { log("Connecting to server: " + this_cline.host); if (!the_port && this_cline.port) the_port = this_cline.port; else if (!the_port) the_port = default_port; // try a safe default. connect_sock = new Socket(); connect_sock.connect(this_cline.host,the_port,ob_sock_timeout); if (connect_sock.is_connected) { oper_notice("Routing","Connected! Sending info..."); connect_sock.send("PASS " + this_cline.password + " :TS\r\n"); connect_sock.send("CAPAB " + server_capab + "\r\n"); connect_sock.send("SERVER " + servername + " 1 :" + serverdesc + "\r\n"); new_id = get_next_clientid(); Clients[new_id]=new IRCClient(connect_sock,new_id,true,true); Clients[new_id].sentps = true; } this_cline.lastconnect = time();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/932a434bc900126d724150bfed8b94b9a8e530e1/ircd.js/buggy/ircd.js |
oper_notice("Routing","Connected! Sending info..."); | umode_notice(USERMODE_ROUTING,"Routing", "Connected! Sending info..."); | function connect_to_server(this_cline,the_port) { var connect_sock; var new_id; if (!the_port && this_cline.port) the_port = this_cline.port; else if (!the_port) the_port = default_port; // try a safe default. connect_sock = new Socket(); connect_sock.connect(this_cline.host,the_port,ob_sock_timeout); if (connect_sock.is_connected) { oper_notice("Routing","Connected! Sending info..."); connect_sock.send("PASS " + this_cline.password + " :TS\r\n"); connect_sock.send("CAPAB " + server_capab + "\r\n"); connect_sock.send("SERVER " + servername + " 1 :" + serverdesc + "\r\n"); new_id = get_next_clientid(); Clients[new_id]=new IRCClient(connect_sock,new_id,true,true); Clients[new_id].sentps = true; } this_cline.lastconnect = time();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
function constrainedHeightFromElement(height, element) { if (height < element.clientHeight * 0.25) height = element.clientHeight * 0.25; else if (height > element.clientHeight * 0.75) height = element.clientHeight * 0.75; return height;} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/87b1b60eb821e948fcb1f6f2c20521b54e9dba47/debugger.js/buggy/third_party/WebKit/WebKitTools/Drosera/debugger.js |
||
function constrainedHeightFromElement(height, element) { | function constrainedHeightFromElement(height, element) { | function constrainedHeightFromElement(height, element) { if (height < element.clientHeight * 0.25) height = element.clientHeight * 0.25; else if (height > element.clientHeight * 0.75) height = element.clientHeight * 0.75; return height;} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/265b0e098271034b585404142515fee7102730f2/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
function constrainedWidthFromElement(width, element) { if (width < element.clientWidth * 0.25) width = element.clientWidth * 0.25; else if (width > element.clientWidth * 0.75) width = element.clientWidth * 0.75; | function constrainedWidthFromElement(width, element, constrainLeft, constrainRight) { if (constrainLeft === undefined) constrainLeft = 0.25; if (constrainRight === undefined) constrainRight = 0.75; if (width < element.clientWidth * constrainLeft) width = element.clientWidth * constrainLeft; else if (width > element.clientWidth * constrainRight) width = element.clientWidth * constrainRight; | function constrainedWidthFromElement(width, element) { if (width < element.clientWidth * 0.25) width = element.clientWidth * 0.25; else if (width > element.clientWidth * 0.75) width = element.clientWidth * 0.75; return width;} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/4a711a57393ecf8acab910e9285ee831da207239/debugger.js/buggy/third_party/WebKit/WebKitTools/Drosera/debugger.js |
function constrainedWidthFromElement(width, element) { if (width < element.clientWidth * 0.25) width = element.clientWidth * 0.25; else if (width > element.clientWidth * 0.75) width = element.clientWidth * 0.75; return width;} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/87b1b60eb821e948fcb1f6f2c20521b54e9dba47/debugger.js/buggy/third_party/WebKit/WebKitTools/Drosera/debugger.js |
||
function constrainedWidthFromElement(width, element, constrainLeft, constrainRight) { | function constrainedWidthFromElement(width, element, constrainLeft, constrainRight) { | function constrainedWidthFromElement(width, element, constrainLeft, constrainRight) { if (constrainLeft === undefined) constrainLeft = 0.25; if (constrainRight === undefined) constrainRight = 0.75; if (width < element.clientWidth * constrainLeft) width = element.clientWidth * constrainLeft; else if (width > element.clientWidth * constrainRight) width = element.clientWidth * constrainRight; return width;} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/265b0e098271034b585404142515fee7102730f2/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
return (partial) ? (inTop || inBottom) && (inLeft || inRight ) | return (partial) ? (inTop || inBottom ) && (inLeft || inRight ) | containsBounds:function(bounds, partial, inclusive) { //set defaults if (partial == null) { partial = false; } if (inclusive == null) { inclusive = true; } var inLeft; var inTop; var inRight; var inBottom; if (inclusive) { inLeft = (bounds.left >= this.left) && (bounds.left <= this.right); inTop = (bounds.top >= this.bottom) && (bounds.top <= this.top); inRight= (bounds.right >= this.left) && (bounds.right <= this.right); inBottom = (bounds.bottom >= this.bottom) && (bounds.bottom <= this.top); } else { inLeft = (bounds.left > this.left) && (bounds.left < this.right); inTop = (bounds.top > this.bottom) && (bounds.top < this.top); inRight= (bounds.right > this.left) && (bounds.right < this.right); inBottom = (bounds.bottom > this.bottom) && (bounds.bottom < this.top); } return (partial) ? (inTop || inBottom) && (inLeft || inRight ) : (inTop && inLeft && inBottom && inRight); }, | 2032 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2032/66a5d90965bd2ae4d8aceb11607404e34416e902/BaseTypes.js/clean/lib/OpenLayers/BaseTypes.js |
return (partial) ? (inTop || inBottom) && (inLeft || inRight ) | return (partial) ? (inTop || inBottom ) && (inLeft || inRight ) | containsBounds:function(bounds, partial, inclusive) { //set defaults if (partial == null) { partial = false; } if (inclusive == null) { inclusive = true; } var inLeft; var inTop; var inRight; var inBottom; if (inclusive) { inLeft = (bounds.left >= this.left) && (bounds.left <= this.right); inTop = (bounds.top >= this.bottom) && (bounds.top <= this.top); inRight= (bounds.right >= this.left) && (bounds.right <= this.right); inBottom = (bounds.bottom >= this.bottom) && (bounds.bottom <= this.top); } else { inLeft = (bounds.left > this.left) && (bounds.left < this.right); inTop = (bounds.top > this.bottom) && (bounds.top < this.top); inRight= (bounds.right > this.left) && (bounds.right < this.right); inBottom = (bounds.bottom > this.bottom) && (bounds.bottom < this.top); } return (partial) ? (inTop || inBottom) && (inLeft || inRight ) : (inTop && inLeft && inBottom && inRight); }, | 2031 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2031/66a5d90965bd2ae4d8aceb11607404e34416e902/BaseTypes.js/buggy/lib/OpenLayers/BaseTypes.js |
GM_log("> GM_BrowserUI.contentLoad"); | GM_log("> GM_BrowserUI.contentLoad: " + e.target.defaultView.location.href); | GM_BrowserUI.contentLoad = function(e) { GM_log("> GM_BrowserUI.contentLoad"); if (!this.getEnabled()) { GM_log("* Greasemonkey disabled, exiting") return; } var win = e.target.defaultView; var doc = win.document; if(!doc.body) { GM_log("* no body on document, existing") return; } if (this.getHandler(win)) { GM_log("* document has already been greased, exiting") return; } this.currentHandler = new GM_DocHandler(win, window); this.currentHandler.menuCommander.attach(); this.handlers.push(this.currentHandler); GM_listen(win, "unload", GM_hitch(this, "contentUnload")); GM_log("< GM_BrowserUI.contentLoad");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
GM_log("* Greasemonkey disabled, exiting") | GM_log("* Greasemonkey disabled, skipping contentLoad"); | GM_BrowserUI.contentLoad = function(e) { GM_log("> GM_BrowserUI.contentLoad"); if (!this.getEnabled()) { GM_log("* Greasemonkey disabled, exiting") return; } var win = e.target.defaultView; var doc = win.document; if(!doc.body) { GM_log("* no body on document, existing") return; } if (this.getHandler(win)) { GM_log("* document has already been greased, exiting") return; } this.currentHandler = new GM_DocHandler(win, window); this.currentHandler.menuCommander.attach(); this.handlers.push(this.currentHandler); GM_listen(win, "unload", GM_hitch(this, "contentUnload")); GM_log("< GM_BrowserUI.contentLoad");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
if (this.getHandler(win)) { GM_log("* document has already been greased, exiting") return; | GM_log("win == win.top: " + (win == win.top)); if (win == win.top) { this.currentMenuCommander = new GM_MenuCommander(win); this.menuCommanders.push(this.currentMenuCommander); this.currentMenuCommander.attach(); | GM_BrowserUI.contentLoad = function(e) { GM_log("> GM_BrowserUI.contentLoad"); if (!this.getEnabled()) { GM_log("* Greasemonkey disabled, exiting") return; } var win = e.target.defaultView; var doc = win.document; if(!doc.body) { GM_log("* no body on document, existing") return; } if (this.getHandler(win)) { GM_log("* document has already been greased, exiting") return; } this.currentHandler = new GM_DocHandler(win, window); this.currentHandler.menuCommander.attach(); this.handlers.push(this.currentHandler); GM_listen(win, "unload", GM_hitch(this, "contentUnload")); GM_log("< GM_BrowserUI.contentLoad");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
this.currentHandler = new GM_DocHandler(win, window); this.currentHandler.menuCommander.attach(); this.handlers.push(this.currentHandler); | new GM_DocHandler(win, window, this.currentMenuCommander); | GM_BrowserUI.contentLoad = function(e) { GM_log("> GM_BrowserUI.contentLoad"); if (!this.getEnabled()) { GM_log("* Greasemonkey disabled, exiting") return; } var win = e.target.defaultView; var doc = win.document; if(!doc.body) { GM_log("* no body on document, existing") return; } if (this.getHandler(win)) { GM_log("* document has already been greased, exiting") return; } this.currentHandler = new GM_DocHandler(win, window); this.currentHandler.menuCommander.attach(); this.handlers.push(this.currentHandler); GM_listen(win, "unload", GM_hitch(this, "contentUnload")); GM_log("< GM_BrowserUI.contentLoad");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
GM_log("win == win.top: " + (win == win.top)); | var commander; | GM_BrowserUI.contentLoad = function(e) { GM_log("> GM_BrowserUI.contentLoad: " + e.target.defaultView.location.href); if (!this.getEnabled()) { GM_log("* Greasemonkey disabled, skipping contentLoad"); return; } var win = e.target.defaultView; var doc = win.document; if(!doc.body) { GM_log("* no body on document, existing") return; } GM_log("win == win.top: " + (win == win.top)); if (win == win.top) { this.currentMenuCommander = new GM_MenuCommander(win); this.menuCommanders.push(this.currentMenuCommander); this.currentMenuCommander.attach(); } new GM_DocHandler(win, window, this.currentMenuCommander); GM_listen(win, "unload", GM_hitch(this, "contentUnload")); GM_log("< GM_BrowserUI.contentLoad");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/604220dc0be17652f4a7aa4780d5ef2a708f4244/browser.js/clean/src/content/browser.js |
this.currentMenuCommander = new GM_MenuCommander(win); this.menuCommanders.push(this.currentMenuCommander); | commander = new GM_MenuCommander(win); this.menuCommanders.push(commander); } else { commander = this.getCommander(win.top); } if (win == this.tabBrowser.selectedBrowser.contentWindow) { this.currentMenuCommander = commander; | GM_BrowserUI.contentLoad = function(e) { GM_log("> GM_BrowserUI.contentLoad: " + e.target.defaultView.location.href); if (!this.getEnabled()) { GM_log("* Greasemonkey disabled, skipping contentLoad"); return; } var win = e.target.defaultView; var doc = win.document; if(!doc.body) { GM_log("* no body on document, existing") return; } GM_log("win == win.top: " + (win == win.top)); if (win == win.top) { this.currentMenuCommander = new GM_MenuCommander(win); this.menuCommanders.push(this.currentMenuCommander); this.currentMenuCommander.attach(); } new GM_DocHandler(win, window, this.currentMenuCommander); GM_listen(win, "unload", GM_hitch(this, "contentUnload")); GM_log("< GM_BrowserUI.contentLoad");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/604220dc0be17652f4a7aa4780d5ef2a708f4244/browser.js/clean/src/content/browser.js |
new GM_DocHandler(win, window, this.currentMenuCommander); | new GM_DocHandler(win, window, commander); | GM_BrowserUI.contentLoad = function(e) { GM_log("> GM_BrowserUI.contentLoad: " + e.target.defaultView.location.href); if (!this.getEnabled()) { GM_log("* Greasemonkey disabled, skipping contentLoad"); return; } var win = e.target.defaultView; var doc = win.document; if(!doc.body) { GM_log("* no body on document, existing") return; } GM_log("win == win.top: " + (win == win.top)); if (win == win.top) { this.currentMenuCommander = new GM_MenuCommander(win); this.menuCommanders.push(this.currentMenuCommander); this.currentMenuCommander.attach(); } new GM_DocHandler(win, window, this.currentMenuCommander); GM_listen(win, "unload", GM_hitch(this, "contentUnload")); GM_log("< GM_BrowserUI.contentLoad");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/604220dc0be17652f4a7aa4780d5ef2a708f4244/browser.js/clean/src/content/browser.js |
var handler = null; | var commander = null; | GM_BrowserUI.contentUnload = function(e) { GM_log("> GM_BrowserUI.contentUnload"); // remove the handler for this document var handler = null; //looping over handlers rather than using getHandler because we need //the index into handlers.splice. for (var i = 0; i < this.handlers.length; i++) { if (this.handlers[i].contentWindow == e.currentTarget) { handler = this.handlers[i]; handler.menuCommander.detach(); if (handler == this.currentHandler) { this.currentHandler = null; } this.handlers.splice(i, 1); GM_log("* Found and removed corresponding handler") break; } } GM_log("< GM_BrowserUI.contentUnload");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
for (var i = 0; i < this.handlers.length; i++) { if (this.handlers[i].contentWindow == e.currentTarget) { handler = this.handlers[i]; handler.menuCommander.detach(); | for (var i = 0; commander = this.menuCommanders[i]; i++) { if (commander.contentWindow == e.currentTarget) { GM_log("* Found corresponding commander. Is currentMenuCommander: " + (commander == this.currentMenuCommander)); if (commander == this.currentMenuCommander) { this.currentMenuCommander.detach(); this.currentMenuCommander = null; } | GM_BrowserUI.contentUnload = function(e) { GM_log("> GM_BrowserUI.contentUnload"); // remove the handler for this document var handler = null; //looping over handlers rather than using getHandler because we need //the index into handlers.splice. for (var i = 0; i < this.handlers.length; i++) { if (this.handlers[i].contentWindow == e.currentTarget) { handler = this.handlers[i]; handler.menuCommander.detach(); if (handler == this.currentHandler) { this.currentHandler = null; } this.handlers.splice(i, 1); GM_log("* Found and removed corresponding handler") break; } } GM_log("< GM_BrowserUI.contentUnload");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
if (handler == this.currentHandler) { this.currentHandler = null; } | this.menuCommanders.splice(i, 1); | GM_BrowserUI.contentUnload = function(e) { GM_log("> GM_BrowserUI.contentUnload"); // remove the handler for this document var handler = null; //looping over handlers rather than using getHandler because we need //the index into handlers.splice. for (var i = 0; i < this.handlers.length; i++) { if (this.handlers[i].contentWindow == e.currentTarget) { handler = this.handlers[i]; handler.menuCommander.detach(); if (handler == this.currentHandler) { this.currentHandler = null; } this.handlers.splice(i, 1); GM_log("* Found and removed corresponding handler") break; } } GM_log("< GM_BrowserUI.contentUnload");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
this.handlers.splice(i, 1); GM_log("* Found and removed corresponding handler") | GM_log("* Found and removed corresponding commander") | GM_BrowserUI.contentUnload = function(e) { GM_log("> GM_BrowserUI.contentUnload"); // remove the handler for this document var handler = null; //looping over handlers rather than using getHandler because we need //the index into handlers.splice. for (var i = 0; i < this.handlers.length; i++) { if (this.handlers[i].contentWindow == e.currentTarget) { handler = this.handlers[i]; handler.menuCommander.detach(); if (handler == this.currentHandler) { this.currentHandler = null; } this.handlers.splice(i, 1); GM_log("* Found and removed corresponding handler") break; } } GM_log("< GM_BrowserUI.contentUnload");} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0f64c0c560e01eade68e9d3dc8caefb5c308d176/browser.js/clean/src/content/browser.js |
var culprit = document.popupNode; | GM_BrowserUI.contextMenuShowing = function() { GM_log('> contextMenuShowing'); var culprit = document.popupNode; var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); contextItem.hidden = contextSep.hidden = !(culprit.tagName.toLowerCase() == "a" && culprit.href.match(/\.user\.js(\?|$)/i) != null); GM_log('< contextMenuShowing');} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/24a0ef59ca6e1fcb9ecf87cc7339f9c604378bc3/browser.js/buggy/src/content/browser.js |
|
!(culprit.tagName.toLowerCase() == "a" && culprit.href.match(/\.user\.js(\?|$)/i) != null); | !(culprit && culprit.href.match(/\.user\.js(\?|$)/i) != null); ); | GM_BrowserUI.contextMenuShowing = function() { GM_log('> contextMenuShowing'); var culprit = document.popupNode; var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); contextItem.hidden = contextSep.hidden = !(culprit.tagName.toLowerCase() == "a" && culprit.href.match(/\.user\.js(\?|$)/i) != null); GM_log('< contextMenuShowing');} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/24a0ef59ca6e1fcb9ecf87cc7339f9c604378bc3/browser.js/buggy/src/content/browser.js |
contextItem.hidden = contextSep.hidden = !(culprit && culprit.href.match(/\.user\.js(\?|$)/i) != null); ); | contextItem.hidden = contextSep.hidden = !(culprit && culprit.href.match(/\.user\.js(\?|$)/i) != null); | GM_BrowserUI.contextMenuShowing = function() { GM_log('> contextMenuShowing'); var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); var culprit = document.popupNode; while (culprit && culprit.tagName.toLowerCase() != "a") { culprit = culprit.parentNode; } contextItem.hidden = contextSep.hidden = !(culprit && culprit.href.match(/\.user\.js(\?|$)/i) != null); ); GM_log('< contextMenuShowing');} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/be72d8b30f4121650da2ebececcefd5081c88bbe/browser.js/buggy/src/content/browser.js |
while (culprit && culprit.tagName.toLowerCase() != "a") { | while (culprit && culprit.tagName && culprit.tagName.toLowerCase() != "a") { | GM_BrowserUI.contextMenuShowing = function() { GM_log('> contextMenuShowing'); var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); var culprit = document.popupNode; while (culprit && culprit.tagName.toLowerCase() != "a") { culprit = culprit.parentNode; } contextItem.hidden = contextSep.hidden = !(culprit && culprit.href.match(/\.user\.js(\?|$)/i) != null); GM_log('< contextMenuShowing');} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/89e156ed0e53a82c2bbb6c96f99885a6d80d34aa/browser.js/buggy/src/content/browser.js |
contextItem.hidden = contextSep.hidden = !(culprit && culprit.href.match(/\.user\.js(\?|$)/i) != null); | contextItem.hidden = contextSep.hidden = !(culprit && culprit.href && culprit.href.match(/\.user\.js(\?|$)/i) != null); | GM_BrowserUI.contextMenuShowing = function() { GM_log('> contextMenuShowing'); var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); var culprit = document.popupNode; while (culprit && culprit.tagName.toLowerCase() != "a") { culprit = culprit.parentNode; } contextItem.hidden = contextSep.hidden = !(culprit && culprit.href.match(/\.user\.js(\?|$)/i) != null); GM_log('< contextMenuShowing');} | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/89e156ed0e53a82c2bbb6c96f99885a6d80d34aa/browser.js/buggy/src/content/browser.js |
var culprit = document.popupNode; var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); | var culprit = document.popupNode; var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); | function contextMenuShowing() { var culprit = document.popupNode; var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); contextItem.hidden = contextSep.hidden = !(culprit.tagName.toLowerCase() == "a" && culprit.href.match(/\.user\.js(\?|$)/i) != null); } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/315119498beb3f038b2f331f4abecd4970a6a857/browser.js/clean/src/content/browser.js |
!(culprit.tagName.toLowerCase() == "a" && culprit.href.match(/\.user\.js(\?|$)/i) != null); } | !(culprit.tagName.toLowerCase() == "a" && culprit.href.match(/\.user\.js(\?|$)/i) != null); } | function contextMenuShowing() { var culprit = document.popupNode; var contextItem = ge("install-userscript"); var contextSep = ge("install-userscript-sep"); contextItem.hidden = contextSep.hidden = !(culprit.tagName.toLowerCase() == "a" && culprit.href.match(/\.user\.js(\?|$)/i) != null); } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/315119498beb3f038b2f331f4abecd4970a6a857/browser.js/clean/src/content/browser.js |
case "r": p.x += el.offsetWidth - w; break; case "l": break; | case "l": p.x += el.offsetWidth - w; break; case "r": break; | Calendar.continuation_for_the_fucking_khtml_browser = function() { var w = self.element.offsetWidth; var h = self.element.offsetHeight; self.element.style.display = "none"; var valign = opts.substr(0, 1); var halign = "l"; if (opts.length > 1) { halign = opts.substr(1, 1); } // vertical alignment switch (valign) { case "T": p.y -= h; break; case "B": p.y += el.offsetHeight; break; case "C": p.y += (el.offsetHeight - h) / 2; break; case "t": p.y += el.offsetHeight - h; break; case "b": break; // already there } // horizontal alignment switch (halign) { case "L": p.x -= w; break; case "R": p.x += el.offsetWidth; break; case "C": p.x += (el.offsetWidth - w) / 2; break; case "r": p.x += el.offsetWidth - w; break; case "l": break; // already there } p.width = w; p.height = h + 40; self.monthsCombo.style.display = "none"; fixPosition(p); self.showAt(p.x, p.y); }; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar.js/buggy/branches/BRANCH_0_8_6/cacti/include/jscalendar/calendar.js |
case "r": p.x += el.offsetWidth - w; break; case "l": break; | case "l": p.x += el.offsetWidth - w; break; case "r": break; | Calendar.continuation_for_the_fucking_khtml_browser = function() { var w = self.element.offsetWidth; var h = self.element.offsetHeight; self.element.style.display = "none"; var valign = opts.substr(0, 1); var halign = "l"; if (opts.length > 1) { halign = opts.substr(1, 1); } // vertical alignment switch (valign) { case "T": p.y -= h; break; case "B": p.y += el.offsetHeight; break; case "C": p.y += (el.offsetHeight - h) / 2; break; case "t": p.y += el.offsetHeight - h; break; case "b": break; // already there } // horizontal alignment switch (halign) { case "L": p.x -= w; break; case "R": p.x += el.offsetWidth; break; case "C": p.x += (el.offsetWidth - w) / 2; break; case "r": p.x += el.offsetWidth - w; break; case "l": break; // already there } p.width = w; p.height = h + 40; self.monthsCombo.style.display = "none"; fixPosition(p); self.showAt(p.x, p.y); }; | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/8aafb027d457b746fd546c4a097b431e06b00849/calendar.js/clean/trunk/cacti/include/js/jscalendar/calendar.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.