rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
} | }, | last: function() { return this[this.length - 1]; } | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/7d101d58400acaff232091485c8e140f0a37cbaf/prototype.js/buggy/actionpack/lib/action_view/helpers/javascripts/prototype.js |
} | }, | last: function() { return this[this.length - 1]; } | 4687 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4687/7d101d58400acaff232091485c8e140f0a37cbaf/prototype.js/clean/railties/html/javascripts/prototype.js |
} | }, | last: function() { return this[this.length - 1]; } | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/7d101d58400acaff232091485c8e140f0a37cbaf/prototype.js/buggy/railties/html/javascripts/prototype.js |
if(!isNav4) getObject(layer).innerHTML = file_loader.document.body.innerHTML; | if(!isNav4) { var o = getObject(layer); o.innerHTML = ""; o.innerHTML = file_loader.document.body.innerHTML; } | function layerLoadHandler(file_loader){ var layer = (isNav4? this.name: file_loader.layer_name); var properties = (isNav4? this.properties: file_loader.properties); if(!isNav4) getObject(layer).innerHTML = file_loader.document.body.innerHTML; boundPopup(layer); addPopup(layer, properties); captureMouseEvent(popupMove); show(layer);} | 2059 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2059/3989de27e6b5e0d61991025834e095f2a99065de/DynamicLoading.js/clean/server/modules/tags/javascript_support/scripts/DynamicLoading.js |
var layer = (isNav4? this: file_loader.layer_name); | var layer = (isNav4? this.name: file_loader.layer_name); | function layerLoadHandler(file_loader){ var layer = (isNav4? this: file_loader.layer_name); var properties = (isNav4? this.properties: file_loader.properties); if(!isNav4) getObject(layer).innerHTML = file_loader.document.body.innerHTML; boundPopup(layer); addPopup(layer, "none", properties); captureMouseEvent(popupMove); show(layer);} | 2059 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2059/b697206d44b1757f3b25be0b02d80ba1a94399b3/DynamicLoading.js/buggy/server/modules/tags/javascript_support/scripts/DynamicLoading.js |
addPopup(layer, "none", properties); | addPopup(layer, properties); | function layerLoadHandler(file_loader){ var layer = (isNav4? this.name: file_loader.layer_name); var properties = (isNav4? this.properties: file_loader.properties); if(!isNav4) getObject(layer).innerHTML = file_loader.document.body.innerHTML; boundPopup(layer); addPopup(layer, "none", properties); captureMouseEvent(popupMove); show(layer);} | 2059 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2059/819343ef62f99be26a306bdce24e343eddc52f87/DynamicLoading.js/buggy/server/modules/tags/javascript_support/scripts/DynamicLoading.js |
return this.charAt(0).toLowerCase() + this.substr(1); | return this.charAt(0).toLowerCase() + this.substr(1); | String.prototype.lcfirst = function() { return this.charAt(0).toLowerCase() + this.substr(1);}; | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/409c1704b4cf230ddff8734c8f4835b0c22da435/htmlutils.js/clean/code/javascript/core/scripts/htmlutils.js |
var self = this; return { toString: function(index) { return self.variableName + ".length"; } } | return this.variableName + ".length"; | EqualsArray.prototype.length = function() { var self = this; return { toString: function(index) { return self.variableName + ".length"; } }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/9c787c7e6c12c5505c234cea90865fbee0d58139/java-rc.js/clean/src/content/formats/java-rc.js |
this.hfg=8; this.hbg=1; | this.dfg=8; this.dbg=1; | function Lightbar(items){ this.fg=7; this.bg=1; this.xpos=1; this.ypos=1; this.direction=0; this.hfg=1; this.hbg=7; this.hfg=8; this.hbg=1; this.kfg=15; this.khfg=15; this.current=0; this.align=0; this.force_width=-1; this.getval=Lightbar_getval; this.draw=Lightbar_draw; this.clear=Lightbar_clearitems; this.add=Lightbar_additem; this.failsafe_getval=Lightbar_failsafe_getval; this.lpadding=null; this.rpadding=null; this.hblanks=2; this.hotkeys=''; if(items==undefined) this.items=new Array(); else this.items=items;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
this.draw=Lightbar_draw; | function Lightbar(items){ this.fg=7; this.bg=1; this.xpos=1; this.ypos=1; this.direction=0; this.hfg=1; this.hbg=7; this.kfg=15; this.khfg=15; this.current=0; this.align=0; this.force_width=-1; this.getval=Lightbar_getval; this.clear=Lightbar_clearitems; this.add=Lightbar_additem; this.failsafe_getval=Lightbar_failsafe_getval; if(items==undefined) this.items=new Array(); else this.items=items;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/dff78093b4c0670fb6429f08f00e750b3f057b49/lightbar.js/clean/load/lightbar.js |
|
if(!this.items[i].disabled) { | if(this.items[i].disabled) console.attributes=dattr; else { | function Lightbar_draw(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return; } if(!(user.settings & USER_COLOR)) { return; } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return; } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return; } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return; } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return; } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return; } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return; } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return; } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return; } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; console.gotoxy(curx, cury); if(lpadding != undefined && lpadding != null) { console.attributes=attr; console.write(lpadding); curx+= lpadding.length; } if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } if(rpadding != undefined && rpadding != null) { console.attributes=attr; console.write(rpadding); curx+= rpadding.length; } if(this.direction==0) { cury++; curx=this.xpos; } else { console.attributes=attr; curx+=width; for(j=0; j<this.hblanks; j++) { console.write(" "); curx++; } } if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
if(!this.items[i].disabled) { | if(this.items[i].disabled) console.attributes=dattr; else { | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; var last_cur; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } this.draw(); last_cur=this.current; /* Main loop */ while(1) { var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; if(lpadding != undefined && lpadding != null) curx+= lpadding.length; if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } } if(rpadding != undefined && rpadding != null) curx+= rpadding.length; if(this.direction==0) { cury++; curx=this.xpos; } else curx+=width+this.hblanks; if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); last_cur=this.current; /* Get input */ var key=console.getkey(K_UPPER); if(this.hotkeys.indexOf(key)!=-1) return(key); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if((!this.items[i].disabled) && (this.items[i].text.indexOf('|'+key)!=-1 || this.items[i].text.indexOf('|'+key.toLowerCase())!=-1)) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
} while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); | } while(this.items[this.current].disabled || this.items[this.current].retval==undefined); | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; var last_cur; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } this.draw(); last_cur=this.current; /* Main loop */ while(1) { var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; if(lpadding != undefined && lpadding != null) curx+= lpadding.length; if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } } if(rpadding != undefined && rpadding != null) curx+= rpadding.length; if(this.direction==0) { cury++; curx=this.xpos; } else curx+=width+this.hblanks; if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); last_cur=this.current; /* Get input */ var key=console.getkey(K_UPPER); if(this.hotkeys.indexOf(key)!=-1) return(key); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if((!this.items[i].disabled) && (this.items[i].text.indexOf('|'+key)!=-1 || this.items[i].text.indexOf('|'+key.toLowerCase())!=-1)) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
} while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); | } while(this.items[this.current].disabled || this.items[this.current].retval==undefined); | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; var last_cur; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } this.draw(); last_cur=this.current; /* Main loop */ while(1) { var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; if(lpadding != undefined && lpadding != null) curx+= lpadding.length; if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } } if(rpadding != undefined && rpadding != null) curx+= rpadding.length; if(this.direction==0) { cury++; curx=this.xpos; } else curx+=width+this.hblanks; if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); last_cur=this.current; /* Get input */ var key=console.getkey(K_UPPER); if(this.hotkeys.indexOf(key)!=-1) return(key); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if((!this.items[i].disabled) && (this.items[i].text.indexOf('|'+key)!=-1 || this.items[i].text.indexOf('|'+key.toLowerCase())!=-1)) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
} while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); | } while(this.items[this.current].disabled || this.items[this.current].retval==undefined); | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; var last_cur; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } this.draw(); last_cur=this.current; /* Main loop */ while(1) { var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; if(lpadding != undefined && lpadding != null) curx+= lpadding.length; if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } } if(rpadding != undefined && rpadding != null) curx+= rpadding.length; if(this.direction==0) { cury++; curx=this.xpos; } else curx+=width+this.hblanks; if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); last_cur=this.current; /* Get input */ var key=console.getkey(K_UPPER); if(this.hotkeys.indexOf(key)!=-1) return(key); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if((!this.items[i].disabled) && (this.items[i].text.indexOf('|'+key)!=-1 || this.items[i].text.indexOf('|'+key.toLowerCase())!=-1)) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
} while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); | } while(this.items[this.current].disabled || this.items[this.current].retval==undefined); | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; var last_cur; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } this.draw(); last_cur=this.current; /* Main loop */ while(1) { var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; if(lpadding != undefined && lpadding != null) curx+= lpadding.length; if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } } if(rpadding != undefined && rpadding != null) curx+= rpadding.length; if(this.direction==0) { cury++; curx=this.xpos; } else curx+=width+this.hblanks; if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); last_cur=this.current; /* Get input */ var key=console.getkey(K_UPPER); if(this.hotkeys.indexOf(key)!=-1) return(key); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if((!this.items[i].disabled) && (this.items[i].text.indexOf('|'+key)!=-1 || this.items[i].text.indexOf('|'+key.toLowerCase())!=-1)) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { | while(this.items[this.current].disabled || this.items[this.current].retval==undefined) { | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; var last_cur; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } this.draw(); last_cur=this.current; /* Main loop */ while(1) { var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; if(lpadding != undefined && lpadding != null) curx+= lpadding.length; if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } } if(rpadding != undefined && rpadding != null) curx+= rpadding.length; if(this.direction==0) { cury++; curx=this.xpos; } else curx+=width+this.hblanks; if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); last_cur=this.current; /* Get input */ var key=console.getkey(K_UPPER); if(this.hotkeys.indexOf(key)!=-1) return(key); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if((!this.items[i].disabled) && (this.items[i].text.indexOf('|'+key)!=-1 || this.items[i].text.indexOf('|'+key.toLowerCase())!=-1)) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { | while(this.items[this.current].disabled || this.items[this.current].retval==undefined) { | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var dattr=this.dbg<<4|this.dfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; var last_cur; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined || this.items[this.current].disabled) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } this.draw(); last_cur=this.current; /* Main loop */ while(1) { var i; var j; var k; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; // Some basic validation. if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i].width!=undefined) width=this.items[i].width; } var lpadding=this.lpadding; var rpadding=this.rpadding; if(this.items[i].lpadding!=undefined) lpadding=this.items[i].lpadding; if(this.items[i].rpadding!=undefined) rpadding=this.items[i].rpadding; if(lpadding != undefined && lpadding != null) curx+= lpadding.length; if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(!this.items[i].disabled) { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; } j++; } else { if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else { if(this.items[i].disabled) console.attributes=dattr; else console.attributes=attr; } while(k<width) { console.write(" "); k++; } } if(rpadding != undefined && rpadding != null) curx+= rpadding.length; if(this.direction==0) { cury++; curx=this.xpos; } else curx+=width+this.hblanks; if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); last_cur=this.current; /* Get input */ var key=console.getkey(K_UPPER); if(this.hotkeys.indexOf(key)!=-1) return(key); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current]!=disabled || this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if((!this.items[i].disabled) && (this.items[i].text.indexOf('|'+key)!=-1 || this.items[i].text.indexOf('|'+key.toLowerCase())!=-1)) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0dbb1092e971fb474c32ce1ba58e9d2126094717/lightbar.js/buggy/load/lightbar.js |
if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } /* Main loop */ while(1) { var i; var j; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } if(this.items[i].width!=undefined) width=this.items[i].width; } console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } j=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<width-cleaned.length;j++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<(width-cleaned.length)/2;j++) console.write(' '); } } for(; j<this.items[i].text.length; j++) { if(width > -1 && j > width) break; if(this.items[i].text.substr(j,1)=='|') { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; j++; } else { if(this.current==i) console.attributes=cattr; else console.attributes=attr; } console.write(this.items[i].text.substr(j,1)); } if(this.current==i) console.attributes=cattr; else console.attributes=attr; while(j<width) { console.write(" "); j++; } if(this.direction==0) cury++; else { console.attributes=attr; console.write(" "); curx+=width+1; } if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); /* Get input */ var key=console.getkey(K_UPPER); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if(this.items[i].text.indexOf('|'+key)!=-1) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/dff78093b4c0670fb6429f08f00e750b3f057b49/lightbar.js/clean/load/lightbar.js |
|
console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } j=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<width-cleaned.length;j++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<(width-cleaned.length)/2;j++) console.write(' '); } } for(; j<this.items[i].text.length; j++) { if(width > -1 && j > width) break; if(this.items[i].text.substr(j,1)=='|') { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; j++; } else { if(this.current==i) console.attributes=cattr; else console.attributes=attr; } console.write(this.items[i].text.substr(j,1)); } if(this.current==i) console.attributes=cattr; else console.attributes=attr; while(j<width) { console.write(" "); j++; | if(i==this.current || i==last_cur) { console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } k=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;k<width-cleaned.length;k++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;k<(width-cleaned.length)/2;k++) console.write(' '); } } for(j=0; j<this.items[i].text.length; j++) { if(width > -1 && k > width) break; if(this.items[i].text.substr(j,1)=='|') { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; j++; } else { if(this.current==i) console.attributes=cattr; else console.attributes=attr; } console.write(this.items[i].text.substr(j,1)); k++; } if(this.current==i) console.attributes=cattr; else console.attributes=attr; while(k<width) { console.write(" "); k++; } | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } /* Main loop */ while(1) { var i; var j; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } if(this.items[i].width!=undefined) width=this.items[i].width; } console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } j=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<width-cleaned.length;j++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<(width-cleaned.length)/2;j++) console.write(' '); } } for(; j<this.items[i].text.length; j++) { if(width > -1 && j > width) break; if(this.items[i].text.substr(j,1)=='|') { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; j++; } else { if(this.current==i) console.attributes=cattr; else console.attributes=attr; } console.write(this.items[i].text.substr(j,1)); } if(this.current==i) console.attributes=cattr; else console.attributes=attr; while(j<width) { console.write(" "); j++; } if(this.direction==0) cury++; else { console.attributes=attr; console.write(" "); curx+=width+1; } if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); /* Get input */ var key=console.getkey(K_UPPER); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if(this.items[i].text.indexOf('|'+key)!=-1) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/dff78093b4c0670fb6429f08f00e750b3f057b49/lightbar.js/clean/load/lightbar.js |
else { console.attributes=attr; console.write(" "); | else | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } /* Main loop */ while(1) { var i; var j; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } if(this.items[i].width!=undefined) width=this.items[i].width; } console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } j=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<width-cleaned.length;j++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<(width-cleaned.length)/2;j++) console.write(' '); } } for(; j<this.items[i].text.length; j++) { if(width > -1 && j > width) break; if(this.items[i].text.substr(j,1)=='|') { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; j++; } else { if(this.current==i) console.attributes=cattr; else console.attributes=attr; } console.write(this.items[i].text.substr(j,1)); } if(this.current==i) console.attributes=cattr; else console.attributes=attr; while(j<width) { console.write(" "); j++; } if(this.direction==0) cury++; else { console.attributes=attr; console.write(" "); curx+=width+1; } if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); /* Get input */ var key=console.getkey(K_UPPER); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if(this.items[i].text.indexOf('|'+key)!=-1) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/dff78093b4c0670fb6429f08f00e750b3f057b49/lightbar.js/clean/load/lightbar.js |
} | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } /* Main loop */ while(1) { var i; var j; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } if(this.items[i].width!=undefined) width=this.items[i].width; } console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } j=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<width-cleaned.length;j++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<(width-cleaned.length)/2;j++) console.write(' '); } } for(; j<this.items[i].text.length; j++) { if(width > -1 && j > width) break; if(this.items[i].text.substr(j,1)=='|') { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; j++; } else { if(this.current==i) console.attributes=cattr; else console.attributes=attr; } console.write(this.items[i].text.substr(j,1)); } if(this.current==i) console.attributes=cattr; else console.attributes=attr; while(j<width) { console.write(" "); j++; } if(this.direction==0) cury++; else { console.attributes=attr; console.write(" "); curx+=width+1; } if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); /* Get input */ var key=console.getkey(K_UPPER); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if(this.items[i].text.indexOf('|'+key)!=-1) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/dff78093b4c0670fb6429f08f00e750b3f057b49/lightbar.js/clean/load/lightbar.js |
|
last_cur=this.current; | function Lightbar_getval(current){ var attr=this.bg<<4|this.fg; var cattr=this.hbg<<4|this.hfg; var kattr=this.bg<<4|this.kfg; var kcattr=this.hbg<<4|this.khfg; var ret=undefined; if(current!=undefined) this.current=current; if(!(user.settings & USER_ANSI)) { return(this.failsafe_getval()); } if(!(user.settings & USER_COLOR)) { return(this.failsafe_getval()); } if(this.direction < 0 || this.direction > 1) { alert("Unknown lightbar direction!"); return(this.failsafe_getval()); } /* Check that a vertical lightbar fits on the screen */ if(this.direction==0 && (this.ypos+this.items.length-1 > console.screen_rows)) { alert("Screen too short for lightbar!"); return(this.failsafe_getval()); } /* Ensure current is valid */ if(this.current<0 || this.current >= this.items.length) { alert("current parameter is out of range!"); this.current=0; if(this.items.length<=0) return(null); } var orig_cur=this.current; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; if(this.current==orig_cur) { alert("No items with a return value!"); return(undefined); } } /* Check that a horizontal lightbar fits on the screen */ if(this.direction==1) { var end=this.xpos; var i; for(i=0; i<this.items.length; i++) { if(this.force_width>0) { end+=this.force_width+1; continue; } if(this.items[i].width==undefined) { if(this.items[i]==undefined) { alert("Sparse items array!"); return(null); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); end+=cleaned.length+1; } else { end+=this.items[i].width } } } /* Main loop */ while(1) { var i; var j; /* Draw items */ var curx=this.xpos; var cury=this.ypos; var cursx=this.xpos; var cursy=this.ypos; var item_count=0; for(i=0; i<this.items.length; i++) { var width; var cleaned=this.items[i].text; cleaned=cleaned.replace(/\|/g,''); if(this.force_width>0) width=this.force_width; else { width=cleaned.length; if(this.items[i]==undefined) { alert("Sparse items array!"); return(this.failsafe_getval()); } if(this.items[i].text==undefined) { alert("No text for item "+i+"!"); return(this.failsafe_getval()); } if(this.items[i].width!=undefined) width=this.items[i].width; } console.gotoxy(curx, cury); if(i==this.current) { cursx=curx; cursy=cury; } j=0; if(cleaned.length < width) { if(this.align==1) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<width-cleaned.length;j++) console.write(' '); } if(this.align==2) { if(this.current==i) console.attributes=cattr; else console.attributes=attr; for(;j<(width-cleaned.length)/2;j++) console.write(' '); } } for(; j<this.items[i].text.length; j++) { if(width > -1 && j > width) break; if(this.items[i].text.substr(j,1)=='|') { if(this.current==i) console.attributes=kcattr; else console.attributes=kattr; j++; } else { if(this.current==i) console.attributes=cattr; else console.attributes=attr; } console.write(this.items[i].text.substr(j,1)); } if(this.current==i) console.attributes=cattr; else console.attributes=attr; while(j<width) { console.write(" "); j++; } if(this.direction==0) cury++; else { console.attributes=attr; console.write(" "); curx+=width+1; } if(this.items[i].retval!=undefined) item_count++; } if(item_count==0) { alert("No items with a return value!"); return(undefined); } console.gotoxy(cursx,cursy); if(ret!=undefined) return(ret); /* Get input */ var key=console.getkey(K_UPPER); switch(key) { case KEY_UP: if(this.direction==0) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_DOWN: if(this.direction==0) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_LEFT: if(this.direction==1) { do { if(this.current==0) this.current=this.items.length; this.current--; } while(this.items[this.current].retval==undefined); } break; case KEY_RIGHT: if(this.direction==1) { do { this.current++; if(this.current==this.items.length) this.current=0; } while(this.items[this.current].retval==undefined); } break; case KEY_HOME: this.current=0; while(this.items[this.current].retval==undefined) { this.current++; if(this.current==this.items.length) this.current=0; } break; case KEY_END: this.current=this.items.length-1; while(this.items[this.current].retval==undefined) { if(this.current==0) this.current=this.items.length; this.current--; } break; case '\r': case '\n': if(this.items[this.current].retval==undefined) return(undefined); return(this.items[this.current].retval); break; default: for(i=0; i<this.items.length; i++) { if(this.items[i].text.indexOf('|'+key)!=-1) { if(this.items[i].retval==undefined) continue; this.current=i; /* Let it go through once more to highlight */ ret=this.items[this.current].retval; break; } } break; } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/dff78093b4c0670fb6429f08f00e750b3f057b49/lightbar.js/clean/load/lightbar.js |
|
function Line(attr) | function Line() | function Line(attr){ var i; if(attr==undefined) attr=7; /* The actual text of this line */ this.text=''; /* The attributes of this line */ this.attr=new Array(); for(i=0; i<80; i++) this.attr[i]=attr; this.hardcr=false; this.draw=Line_draw;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/01df868790e712324b0ea222651723cca8476031/fseditor.js/buggy/fseditor.js |
if(attr==undefined) attr=7; | function Line(attr){ var i; if(attr==undefined) attr=7; /* The actual text of this line */ this.text=''; /* The attributes of this line */ this.attr=new Array(); for(i=0; i<80; i++) this.attr[i]=attr; this.hardcr=false; this.draw=Line_draw;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/01df868790e712324b0ea222651723cca8476031/fseditor.js/buggy/fseditor.js |
|
this.attr=new Array(); for(i=0; i<80; i++) this.attr[i]=attr; | this.attr=''; /* If this line ends with a "hard" CR */ | function Line(attr){ var i; if(attr==undefined) attr=7; /* The actual text of this line */ this.text=''; /* The attributes of this line */ this.attr=new Array(); for(i=0; i<80; i++) this.attr[i]=attr; this.hardcr=false; this.draw=Line_draw;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/01df868790e712324b0ea222651723cca8476031/fseditor.js/buggy/fseditor.js |
this.draw=Line_draw; | /* This line was kludge-wrapped (ie: not on a word boundary) */ this.kludged=false; /* Start of actual text (after quote indicator) */ this.firstchar=0; | function Line(attr){ var i; if(attr==undefined) attr=7; /* The actual text of this line */ this.text=''; /* The attributes of this line */ this.attr=new Array(); for(i=0; i<80; i++) this.attr[i]=attr; this.hardcr=false; this.draw=Line_draw;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/01df868790e712324b0ea222651723cca8476031/fseditor.js/buggy/fseditor.js |
function linkFolderHTML(isTextLink) { | function linkFolderHTML(isTextLink) { | function linkFolderHTML(isTextLink) { var docW = ""; if (this.hreference) { if (USEFRAMES) docW = docW + "<a href='" + this.hreference + "' TARGET=\"basefrm\" " else docW = docW + "<a href='" + this.hreference + "' TARGET=_top " if (isTextLink) { docW += "id=\"itemTextLink"+this.id+"\" "; } if (browserVersion > 0) docW = docW + "onClick='javascript:clickOnFolder(\""+this.getID()+"\")'" docW = docW + ">" } else docW = docW + "<a>" if (this.hreference == '') docW = ''; return docW;} | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
if (this.hreference) { | if (this.hreference) { | function linkFolderHTML(isTextLink) { var docW = ""; if (this.hreference) { if (USEFRAMES) docW = docW + "<a href='" + this.hreference + "' TARGET=\"basefrm\" " else docW = docW + "<a href='" + this.hreference + "' TARGET=_top " if (isTextLink) { docW += "id=\"itemTextLink"+this.id+"\" "; } if (browserVersion > 0) docW = docW + "onClick='javascript:clickOnFolder(\""+this.getID()+"\")'" docW = docW + ">" } else docW = docW + "<a>" if (this.hreference == '') docW = ''; return docW;} | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
docW = docW + "<a href='" + this.hreference + "' TARGET=_top " | docW = docW + "<a href='" + this.hreference + "' TARGET=_self " | function linkFolderHTML(isTextLink) { var docW = ""; if (this.hreference) { if (USEFRAMES) docW = docW + "<a href='" + this.hreference + "' TARGET=\"basefrm\" " else docW = docW + "<a href='" + this.hreference + "' TARGET=_top " if (isTextLink) { docW += "id=\"itemTextLink"+this.id+"\" "; } if (browserVersion > 0) docW = docW + "onClick='javascript:clickOnFolder(\""+this.getID()+"\")'" docW = docW + ">" } else docW = docW + "<a>" if (this.hreference == '') docW = ''; return docW;} | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
if (browserVersion > 0) | if (browserVersion > 0) | function linkFolderHTML(isTextLink) { var docW = ""; if (this.hreference) { if (USEFRAMES) docW = docW + "<a href='" + this.hreference + "' TARGET=\"basefrm\" " else docW = docW + "<a href='" + this.hreference + "' TARGET=_top " if (isTextLink) { docW += "id=\"itemTextLink"+this.id+"\" "; } if (browserVersion > 0) docW = docW + "onClick='javascript:clickOnFolder(\""+this.getID()+"\")'" docW = docW + ">" } else docW = docW + "<a>" if (this.hreference == '') docW = ''; return docW;} | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
} else docW = docW + "<a>" | } else docW = docW + "<a>" | function linkFolderHTML(isTextLink) { var docW = ""; if (this.hreference) { if (USEFRAMES) docW = docW + "<a href='" + this.hreference + "' TARGET=\"basefrm\" " else docW = docW + "<a href='" + this.hreference + "' TARGET=_top " if (isTextLink) { docW += "id=\"itemTextLink"+this.id+"\" "; } if (browserVersion > 0) docW = docW + "onClick='javascript:clickOnFolder(\""+this.getID()+"\")'" docW = docW + ">" } else docW = docW + "<a>" if (this.hreference == '') docW = ''; return docW;} | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
function linkFolderHTML(isTextLink) { var docW = ""; if (this.hreference) { if (USEFRAMES) docW = docW + "<a href='" + this.hreference + "' TARGET=\"basefrm\" " else docW = docW + "<a href='" + this.hreference + "' TARGET=_top " if (isTextLink) { docW += "id=\"itemTextLink"+this.id+"\" "; } if (browserVersion > 0) docW = docW + "onClick='javascript:clickOnFolder(\""+this.getID()+"\")'" docW = docW + ">" } else docW = docW + "<a>" if (this.hreference == '') docW = ''; return docW;} | 5527 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5527/10ba7e2a5c2d92957e2e2af83e2170a8ccca3aea/ftiens4.js/clean/trunk/cacti/include/treeview/ftiens4.js |
||
imageDivs = document.getElementsByName("listimage"); for (i=0; i < imageDivs.length; i++) { currentHeight = imageDivs[i].offsetHeight; currentWidth = imageDivs[i].offsetWidth; if (currentHeight > maxListHeight) { ratio = maxListHeight / currentHeight; imageDivs[i].style.width = (currentWidth*ratio) + 'px'; imageDivs[i].style.height = (currentHeight*ratio) + 'px'; imageDivs[i].firstChild.style.height = '100%'; imageDivs[i].firstChild.style.width = '100%'; } } | imageDivs = document.getElementsByName("listimage"); for (i=0; i < imageDivs.length; i++) { currentHeight = imageDivs[i].offsetHeight; currentWidth = imageDivs[i].offsetWidth; if (currentHeight > maxListHeight) { ratio = maxListHeight / currentHeight; imageDivs[i].style.width = (currentWidth*ratio) + 'px'; imageDivs[i].style.height = (currentHeight*ratio) + 'px'; imageDivs[i].firstChild.style.height = '100%'; imageDivs[i].firstChild.style.width = '100%'; } } | function list() { imageDivs = document.getElementsByName("listimage"); for (i=0; i < imageDivs.length; i++) { currentHeight = imageDivs[i].offsetHeight; currentWidth = imageDivs[i].offsetWidth; if (currentHeight > maxListHeight) { ratio = maxListHeight / currentHeight; imageDivs[i].style.width = (currentWidth*ratio) + 'px'; imageDivs[i].style.height = (currentHeight*ratio) + 'px'; imageDivs[i].firstChild.style.height = '100%'; imageDivs[i].firstChild.style.width = '100%'; } }} | 7185 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7185/80c9c938b752c166333756d458413e4d0fbbea10/jstemplate.js/clean/preset/Image Gallery/jstemplate.js |
function list() { imageDivs = document.getElementsByName("listimage"); for (i=0; i < imageDivs.length; i++) { currentHeight = imageDivs[i].offsetHeight; currentWidth = imageDivs[i].offsetWidth; if (currentHeight > maxListHeight) { ratio = maxListHeight / currentHeight; imageDivs[i].style.width = (currentWidth*ratio) + 'px'; imageDivs[i].style.height = (currentHeight*ratio) + 'px'; imageDivs[i].firstChild.style.height = '100%'; imageDivs[i].firstChild.style.width = '100%'; } }} | 7185 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7185/afc26f918ffb539431144a26db614ba7b96acf97/jstemplate.js/clean/preset/imagegallery/jstemplate.js |
||
var systems=0; | var udp_req=0; | function list_users(show){ imsg_user = new Array(); var systems=0; var replies=0; users = 0; start = new Date(); print("\1m\1hListing Systems and Users (Ctrl-C to Abort)..."); /* UDP systems */ sock = new Socket(SOCK_DGRAM); //sock.debug=true; sock.bind(); for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].ip==undefined) continue; if(!sock.sendto("\r\n",sys[i].ip,79)) // Get list of active users //printf("FAILED! (%d) Sending to %s\r\n",sock.last_error,sys[i].addr); continue; systems++; } begin = new Date(); while(replies<systems && new Date().valueOf()-begin.valueOf() < UDP_RESPONSE_TIMEOUT) { if(!sock.poll(1)) continue; message=sock.recvfrom(20000); if(message==null) continue; i=get_sysnum(message.ip_address); if(i==-1) continue; replies++; sys[i].udp=true; sys[i].reply=new Date().valueOf()-start.valueOf(); response=message.data.split("\r\n"); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } parse_response(response, show); } sock.close(); /* TCP systems */ for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].udp) continue; replies++; if(sys[i].failed) continue; begin = new Date(); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } sock = new Socket(); is_connected = false; if(sys[i].ip != undefined) { is_connected = sock.connect(sys[i].ip,79); if(!is_connected) sys[i].ip = undefined; // IP no good, remove from cache } if(!is_connected && !sock.connect(sys[i].addr,79)) { log(format("!Finger connection to %s FAILED with error %d" ,sys[i].addr,sock.last_error)); alert("system not available"); sys[i].failed = true; continue; } sys[i].reply=new Date().valueOf()-begin.valueOf(); // cache the IP address for faster resolution if(sys[i].ip != sock.remote_ip_address) sys[i].ip = sock.remote_ip_address; sock.send("\r\n"); // Get list of active users var response=new Array(); while(bbs.online && sock.is_connected) { str=sock.readline(); if(str==null) break; str = truncsp(str); if(str=="") continue; response.push(str); } sock.close(); parse_response(response,show); } t = new Date().valueOf()-start.valueOf(); printf("\1m\1h%lu systems and %lu users listed in %d seconds.\r\n" ,replies, users, t/1000); save_sys_list();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/64cbd455444c84ba77fd30fa47bfbad61993a233/sbbsimsg.js/clean/sbbsimsg.js |
systems++; | udp_req++; | function list_users(show){ imsg_user = new Array(); var systems=0; var replies=0; users = 0; start = new Date(); print("\1m\1hListing Systems and Users (Ctrl-C to Abort)..."); /* UDP systems */ sock = new Socket(SOCK_DGRAM); //sock.debug=true; sock.bind(); for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].ip==undefined) continue; if(!sock.sendto("\r\n",sys[i].ip,79)) // Get list of active users //printf("FAILED! (%d) Sending to %s\r\n",sock.last_error,sys[i].addr); continue; systems++; } begin = new Date(); while(replies<systems && new Date().valueOf()-begin.valueOf() < UDP_RESPONSE_TIMEOUT) { if(!sock.poll(1)) continue; message=sock.recvfrom(20000); if(message==null) continue; i=get_sysnum(message.ip_address); if(i==-1) continue; replies++; sys[i].udp=true; sys[i].reply=new Date().valueOf()-start.valueOf(); response=message.data.split("\r\n"); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } parse_response(response, show); } sock.close(); /* TCP systems */ for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].udp) continue; replies++; if(sys[i].failed) continue; begin = new Date(); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } sock = new Socket(); is_connected = false; if(sys[i].ip != undefined) { is_connected = sock.connect(sys[i].ip,79); if(!is_connected) sys[i].ip = undefined; // IP no good, remove from cache } if(!is_connected && !sock.connect(sys[i].addr,79)) { log(format("!Finger connection to %s FAILED with error %d" ,sys[i].addr,sock.last_error)); alert("system not available"); sys[i].failed = true; continue; } sys[i].reply=new Date().valueOf()-begin.valueOf(); // cache the IP address for faster resolution if(sys[i].ip != sock.remote_ip_address) sys[i].ip = sock.remote_ip_address; sock.send("\r\n"); // Get list of active users var response=new Array(); while(bbs.online && sock.is_connected) { str=sock.readline(); if(str==null) break; str = truncsp(str); if(str=="") continue; response.push(str); } sock.close(); parse_response(response,show); } t = new Date().valueOf()-start.valueOf(); printf("\1m\1h%lu systems and %lu users listed in %d seconds.\r\n" ,replies, users, t/1000); save_sys_list();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/64cbd455444c84ba77fd30fa47bfbad61993a233/sbbsimsg.js/clean/sbbsimsg.js |
while(replies<systems && new Date().valueOf()-begin.valueOf() < UDP_RESPONSE_TIMEOUT) | while(replies<udp_req && new Date().valueOf()-begin.valueOf() < UDP_RESPONSE_TIMEOUT) | function list_users(show){ imsg_user = new Array(); var systems=0; var replies=0; users = 0; start = new Date(); print("\1m\1hListing Systems and Users (Ctrl-C to Abort)..."); /* UDP systems */ sock = new Socket(SOCK_DGRAM); //sock.debug=true; sock.bind(); for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].ip==undefined) continue; if(!sock.sendto("\r\n",sys[i].ip,79)) // Get list of active users //printf("FAILED! (%d) Sending to %s\r\n",sock.last_error,sys[i].addr); continue; systems++; } begin = new Date(); while(replies<systems && new Date().valueOf()-begin.valueOf() < UDP_RESPONSE_TIMEOUT) { if(!sock.poll(1)) continue; message=sock.recvfrom(20000); if(message==null) continue; i=get_sysnum(message.ip_address); if(i==-1) continue; replies++; sys[i].udp=true; sys[i].reply=new Date().valueOf()-start.valueOf(); response=message.data.split("\r\n"); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } parse_response(response, show); } sock.close(); /* TCP systems */ for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].udp) continue; replies++; if(sys[i].failed) continue; begin = new Date(); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } sock = new Socket(); is_connected = false; if(sys[i].ip != undefined) { is_connected = sock.connect(sys[i].ip,79); if(!is_connected) sys[i].ip = undefined; // IP no good, remove from cache } if(!is_connected && !sock.connect(sys[i].addr,79)) { log(format("!Finger connection to %s FAILED with error %d" ,sys[i].addr,sock.last_error)); alert("system not available"); sys[i].failed = true; continue; } sys[i].reply=new Date().valueOf()-begin.valueOf(); // cache the IP address for faster resolution if(sys[i].ip != sock.remote_ip_address) sys[i].ip = sock.remote_ip_address; sock.send("\r\n"); // Get list of active users var response=new Array(); while(bbs.online && sock.is_connected) { str=sock.readline(); if(str==null) break; str = truncsp(str); if(str=="") continue; response.push(str); } sock.close(); parse_response(response,show); } t = new Date().valueOf()-start.valueOf(); printf("\1m\1h%lu systems and %lu users listed in %d seconds.\r\n" ,replies, users, t/1000); save_sys_list();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/64cbd455444c84ba77fd30fa47bfbad61993a233/sbbsimsg.js/clean/sbbsimsg.js |
sock.debug=true; | function list_users(show){ imsg_user = new Array(); var systems=0; var replies=0; users = 0; start = new Date(); print("\1m\1hListing Systems and Users (Ctrl-C to Abort)..."); /* UDP systems */ sock = new Socket(SOCK_DGRAM); sock.debug=true; sock.bind(); for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].ip==undefined) continue; if(!sock.sendto("\r\n",sys[i].ip,79)) // Get list of active users //printf("FAILED! (%d) Sending to %s\r\n",sock.last_error,sys[i].addr); continue; systems++; } begin = new Date(); while(replies<systems && new Date().valueOf()-begin.valueOf() < UDP_RESPONSE_TIMEOUT) { if(!sock.poll(1)) continue; message=sock.recvfrom(20000); if(message==null) continue; i=get_sysnum(message.ip_address); if(i==-1) continue; replies++; sys[i].udp=true; sys[i].reply=new Date().valueOf()-start.valueOf(); response=message.data.split("\r\n"); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } parse_response(response, show); } sock.close(); /* TCP systems */ for(i=0;sys[i]!=undefined && !(bbs.sys_status&SS_ABORT);i++) { if(sys[i].udp) continue; replies++; if(sys[i].failed) continue; begin = new Date(); if(show) { console.line_counter=0; // defeat pause printf("\1n\1h%-25.25s\1n ",sys[i].addr); } sock = new Socket(); is_connected = false; if(sys[i].ip != undefined) { is_connected = sock.connect(sys[i].ip,79); if(!is_connected) sys[i].ip = undefined; // IP no good, remove from cache } if(!is_connected && !sock.connect(sys[i].addr,79)) { log(format("!Finger connection to %s FAILED with error %d" ,sys[i].addr,sock.last_error)); alert("system not available"); sys[i].failed = true; continue; } sys[i].reply=new Date().valueOf()-begin.valueOf(); // cache the IP address for faster resolution if(sys[i].ip != sock.remote_ip_address) sys[i].ip = sock.remote_ip_address; sock.send("\r\n"); // Get list of active users var response=new Array(); while(bbs.online && sock.is_connected) { str=sock.readline(); if(str==null) break; str = truncsp(str); if(str=="") continue; response.push(str); } sock.close(); parse_response(response,show); } t = new Date().valueOf()-start.valueOf(); printf("\1m\1h%lu systems and %lu users listed in %d seconds.\r\n" ,replies, users, t/1000); save_sys_list();} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/1eb7d5b932299748cf2bd0bc74f26709c31897ae/sbbsimsg.js/clean/sbbsimsg.js |
|
live_kill_streams(); | function live_switchto(_mode){ live_kill_streams(); var _actual_spts = dbox_spts_status(); if(_mode == "tv" && !_actual_spts) dbox_spts_set(true); else if(_mode == "radio" && _actual_spts) dbox_spts_set(false); //var _actual_mode = dbox_getmode(); //if(_actual_mode != _mode) dbox_setmode(_mode);} | 6281 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6281/eea733e81927c33134fececbbb9927aec835975c/Y_Baselib.js/buggy/tuxbox/neutrino/daemons/nhttpd/nhttpd-y/Y_Baselib.js |
|
var _actual_mode = dbox_getmode(); if(_actual_mode != _mode) | function live_switchto(_mode){ live_kill_streams(); var _actual_spts = dbox_spts_status(); if(_mode == "tv" && !_actual_spts) dbox_spts_set(true); else if(_mode == "radio" && _actual_spts) dbox_spts_set(false); //var _actual_mode = dbox_getmode(); //if(_actual_mode != _mode) dbox_setmode(_mode);} | 6281 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6281/eea733e81927c33134fececbbb9927aec835975c/Y_Baselib.js/buggy/tuxbox/neutrino/daemons/nhttpd/nhttpd-y/Y_Baselib.js |
|
if(typeof Prototype=='undefined') | if((typeof Prototype=='undefined') || parseFloat(Prototype.Version.split(".")[0] + "." + Prototype.Version.split(".")[1]) < 1.4) | load: function() { // fixme: check for prototype version number if(typeof Prototype=='undefined') throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0"); var scriptTags = document.getElementsByTagName("script"); for(var i=0;i<scriptTags.length;i++) { if(scriptTags[i].src && scriptTags[i].src.match(/scriptaculous\.js$/)) { var path = scriptTags[i].src.replace(/scriptaculous\.js$/,''); this.require(path + 'util.js'); this.require(path + 'effects.js'); this.require(path + 'dragdrop.js'); this.require(path + 'controls.js'); } } } | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/fa15ef3f30aa0fb2e99429f330a7bd78ce7fb145/scriptaculous.js/buggy/src/scriptaculous.js |
doc.load(getScriptChrome("config.xml")); | try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } | 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); } } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/93cdf35046325b8aae790fb34f96e307db2c2f49/greasemonkey.js/clean/src/content/greasemonkey.js |
load:function(callback) { | function load(callback) { | load:function(callback) { this.doc = BXE_loader.load(this.filename,this.method,callback) }, | 791 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/ffb59be12713348724e09814524fa70b5200d06e/xmldoc.js/buggy/src/webapp/lenya/resources/misc/bitflux/bxe/js/xmldoc.js |
}, | } | load:function(callback) { this.doc = BXE_loader.load(this.filename,this.method,callback) }, | 791 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/ffb59be12713348724e09814524fa70b5200d06e/xmldoc.js/buggy/src/webapp/lenya/resources/misc/bitflux/bxe/js/xmldoc.js |
load: function(/* url, [callback] */) { if (arguments.length > 1) { this.loadCallback = arguments[1]; } this._setLocation(arguments[0]); } | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/bdf50299ec90235355e5c177afdd0f378929ba91/selenium-testrunner.js/buggy/code/javascript/core/scripts/selenium-testrunner.js |
||
try { doc.load(getScriptChrome("config.xml")); } catch (exc) { doc.load(getScriptChrome("default-config.xml")); } | doc.load(configURI.spec); | 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); } } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/fec534de049cc4effd22b41bf1cfa71367d36fa3/config.js/buggy/src/content/config.js |
var re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&.*?<\/object>)/; | var re = /(?:videoUrl(?:\\u003d|=))(.*?)\&/; | function load_google_video(cached, vs) { if (!cached.uri.match(/^http:\/\/video.google.com\/videoplay/)) return true; var re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&.*?<\/object>)/; var match = cached.content.match(re); var url = unescape(match[2]); var meta = '<meta http-equiv="refresh" content="1; url=' + url + '" />'; cached.content = cached.content.replace(/<head>/, "<head>" + meta); return true;} | 2130 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2130/ca312b7d90ae96fe36c0d71e34fde89e552554ef/google_video.js/buggy/contrib/smjs/google_video.js |
var url = unescape(match[2]); | var url = unescape(match[1]); | function load_google_video(cached, vs) { if (!cached.uri.match(/^http:\/\/video.google.com\/videoplay/)) return true; var re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&.*?<\/object>)/; var match = cached.content.match(re); var url = unescape(match[2]); var meta = '<meta http-equiv="refresh" content="1; url=' + url + '" />'; cached.content = cached.content.replace(/<head>/, "<head>" + meta); return true;} | 2130 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2130/ca312b7d90ae96fe36c0d71e34fde89e552554ef/google_video.js/buggy/contrib/smjs/google_video.js |
var re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&.*?<\/object>)/; | var re = /(?:videoUrl(?:\\u003d|=))(.*?)\&/; | function load_google_video(cached, vs) { if (!cached.uri.match(/^http:\/\/video.google.com\/videoplay/)) return true; var re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&.*?<\/object>)/; var match = cached.content.match(re); var url = unescape(match[2]); var meta = '<meta http-equiv="refresh" content="1; url=' + url + '" />'; cached.content = cached.content.replace(/<head>/, "<head>" + meta); return true;} | 2461 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2461/ca312b7d90ae96fe36c0d71e34fde89e552554ef/google_video.js/clean/contrib/smjs/google_video.js |
var url = unescape(match[2]); | var url = unescape(match[1]); | function load_google_video(cached, vs) { if (!cached.uri.match(/^http:\/\/video.google.com\/videoplay/)) return true; var re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&.*?<\/object>)/; var match = cached.content.match(re); var url = unescape(match[2]); var meta = '<meta http-equiv="refresh" content="1; url=' + url + '" />'; cached.content = cached.content.replace(/<head>/, "<head>" + meta); return true;} | 2461 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2461/ca312b7d90ae96fe36c0d71e34fde89e552554ef/google_video.js/clean/contrib/smjs/google_video.js |
yaml = yaml.replace(new RegExp('^','mg'),' '); | yaml = yaml.replace(new RegExp('^(.)','mg'),' $1'); | document.load_val_hash = function (form, val_hash) { // check the form we are using if (! form) return alert('Missing form or form name'); if (typeof(form) == 'string') { if (! document[form]) return alert('No form by name '+form); form = document[form]; } // if we already have validation - use it if (form.val_hash) return form.val_hash; // load in the validation and save it for future use if (typeof(val_hash) != 'object') { // get the hash from a javascript function if (typeof(val_hash) == 'function') { val_hash = val_hash(formname); } else if (typeof(val_hash) == 'undefined') { var el; // get hash from a global js variable if (typeof(document.validation) != 'undefined') { val_hash = document.validation; // get hash from a element by if of validation } else if (el = document.getElementById('validation')) { val_hash = el.innerHTML; val_hash = val_hash.replace(new RegExp('<', 'ig'),'<'); val_hash = val_hash.replace(new RegExp('>', 'ig'),'>'); val_hash = val_hash.replace(new RegExp('&','ig'),'&'); // read hash from <input name=foo validation=""> } else { var order = new Array(); var str = ''; var yaml = form.getAttribute('validation'); if (yaml) { if (m = yaml.match('^( +)')) yaml = yaml.replace(new RegExp('^'+m[1], 'g'), ''); //unindent yaml = yaml.replace(new RegExp('\\s*$',''),'\n'); // add trailing str += yaml; } var m; for (var i = 0; i < form.elements.length; i ++) { var name = form.elements[i].name; var yaml = form.elements[i].getAttribute('validation'); if (! name || ! yaml) continue; yaml = yaml.replace(new RegExp('\\s*$',''),'\n'); // add trailing yaml = yaml.replace(new RegExp('^','mg'),' '); // indent all yaml = yaml.replace(new RegExp('^( *[^\\s&*\\[\\{])',''),'\n$1'); // add newline str += name +':' + yaml; order[order.length] = name; } if (str) val_hash = str + "group order: [" + order.join(', ') + "]\n"; } } if (typeof(val_hash) == 'string') { if (! document.yaml_load) return; document.hide_yaml_errors = (! document.show_yaml_errors); if (location.search && location.search.indexOf('show_yaml_errors') != -1) document.hide_yaml_errors = 0; val_hash = document.yaml_load(val_hash); if (document.yaml_error_occured) return; } } // attach to the form form.val_hash = val_hash; return form.val_hash;} | 5443 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5443/43e2c1b48fffb2b6fa653b7f23845f98265f67b0/validate.js/clean/lib/CGI/Ex/validate.js |
document.hide_yaml_errors = (! document.show_yaml_errors); if (location.search && location.search.indexOf('show_yaml_errors') != -1) document.hide_yaml_errors = 0; | document.load_val_hash = function (form, val_hash) { // check the form we are using if (! form) return alert('Missing form or form name'); if (typeof(form) == 'string') { if (! document[form]) return alert('No form by name '+form); form = document[form]; } // if we already have validation - use it if (form.val_hash) return form.val_hash; // load in the validation and save it for future use if (typeof(val_hash) != 'object') { // get the hash from a javascript function if (typeof(val_hash) == 'function') { val_hash = val_hash(formname); } else if (typeof(val_hash) == 'undefined') { var el; // get hash from a global js variable if (typeof(document.validation) != 'undefined') { val_hash = document.validation; // get hash from a element by if of validation } else if (el = document.getElementById('validation')) { val_hash = el.innerHTML; val_hash = val_hash.replace(new RegExp('<', 'ig'),'<'); val_hash = val_hash.replace(new RegExp('>', 'ig'),'>'); val_hash = val_hash.replace(new RegExp('&','ig'),'&'); // read hash from <input name=foo validation=""> } else { var found = 0; var _val_hash = new Array(); var group_order = new Array(); var anchors = new Array(); // hold anchors between yaml calls var ref; var str = form.getAttribute('validation'); if (str && (ref = document.yaml_load(str, anchors)) && ref[0]) { _val_hash = ref[0]; if (_val_hash.length) { alert("Inline validation may only have one group."); return; } found = 1; } var anc; for (var i = 0; i < form.elements.length; i ++) { var name = form.elements[i].name; var str = form.elements[i].getAttribute('validation'); if (! name || ! str) continue; str = str.replace('\\s*',''); if (anc = str.match('^\\ *&(\\w+)\\ *')) { str = str.substring(anc[0].length); anc = anc[1]; } if (str.indexOf('\n') == -1) str = str.replace(new RegExp('(\\w+:\\ +(\'[^\']*\'|"[^"]*"|[^,:]+)),\\s+','g'),'$1\n'); var ref = document.yaml_load(str,anchors); if (! ref || ! ref[0]) continue; var hash = ref[0]; if (! hash['field']) hash['field'] = name; if (anc) anchors[anc] = hash; _val_hash[name] = hash; group_order[group_order.length] = name; found = 1; } if (found) { val_hash = _val_hash; if (! val_hash['group order']) val_hash['group order'] = group_order; } } } if (typeof(val_hash) == 'string') { if (! document.yaml_load) return; //document.hide_yaml_errors = (! document.show_yaml_errors); //if (location.search && location.search.indexOf('show_yaml_errors') != -1) // document.hide_yaml_errors = 0; val_hash = document.yaml_load(val_hash); if (document.yaml_error_occured) return; } } // attach to the form form.val_hash = val_hash; return form.val_hash;} | 5443 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5443/c04a203deff1b87cb491cd242adc30fa78fef554/validate.js/buggy/lib/CGI/Ex/validate.js |
|
if (attributeValue && attribute.specified) | /** SELENIUM:PATCH for loadAttributes() - see SEL-176 */ if (attributeValue && (attribute.specified || attribute.nodeName == 'value')) /** END SELENIUM:PATCH */ | function loadAttributes(dom, domParentNode, node) { for (var i = 0; i < node.attributes.length; i ++ ) { var attribute = node.attributes[i]; var attributeValue = attribute.nodeValue; if (attributeValue && attribute.specified) { var domAttribute = dom.createAttribute(attribute.nodeName); domAttribute.value = attributeValue; domParentNode.setAttributeNode(domAttribute); } } } | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/1fd6f85ea60fb5122e863b720f10029f445fc63c/html-xpath-patched.js/buggy/code/javascript/html-xpath/html-xpath-patched.js |
if (attributeValue && attribute.specified) | /** SELENIUM:PATCH for loadAttributes() - see SEL-176 */ if (attributeValue && (attribute.specified || attribute.nodeName == 'value')) /** END SELENIUM:PATCH */ | function loadAttributes(dom, domParentNode, node) { for (var i = 0; i < node.attributes.length; i ++ ) { var attribute = node.attributes[i]; var attributeValue = attribute.nodeValue; if (attributeValue && attribute.specified) { var domAttribute = dom.createAttribute(attribute.nodeName); domAttribute.value = attributeValue; domParentNode.setAttributeNode(domAttribute); } } } | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/0e5a94dd69f1f4d393236fe9aaa04b10fc67be8f/html-xpath-patched.js/clean/code/javascript/html-xpath/html-xpath-patched.js |
ignore_css = false; | loadCSS : function(url) { var ar = url.replace(/\s+/, '').split(','); var lflen = 0, csslen = 0; var skip = false; var x = 0, i = 0, nl, le; for (x = 0,csslen = ar.length; x<csslen; x++) { ignore_css = false; if (ar[x] != null && ar[x] != 'null' && ar[x].length > 0) { /* Make sure it doesn't exist. */ for (i=0, lflen=this.loadedFiles.length; i<lflen; i++) { if (this.loadedFiles[i] == ar[x]) { skip = true; break; } } if (!skip) { if (tinyMCE.settings.strict_loading_mode) { nl = document.getElementsByTagName("head"); le = document.createElement('link'); le.setAttribute('href', ar[x]); le.setAttribute('rel', 'stylesheet'); le.setAttribute('type', 'text/css'); nl[0].appendChild(le); } else document.write('<link href="' + ar[x] + '" rel="stylesheet" type="text/css" />'); this.loadedFiles[this.loadedFiles.length] = ar[x]; } } } }, | 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 |
|
var flowUri = view.getCustomFlow(); if (flowUri != null && flowUri != "") { log("debug", "customFlow uri: [" + flowUri + "]"); cocoon.load(flowUri); | var flowUri; if (view != null) { flowUri = view.getCustomFlow(); if (flowUri != null && flowUri != "") { log("debug", "customFlow uri: [" + flowUri + "]"); cocoon.load(flowUri); } } else { log("debug", "Usecase does not define a view."); | function loadCustomFlow(view) { var flowUri = view.getCustomFlow(); if (flowUri != null && flowUri != "") { // for some reason, flowUri is not correctly cast into a Boolean, so "if (flowUri)" does not work log("debug", "customFlow uri: [" + flowUri + "]"); //loopFlow = new Function(prepareCustomFlow(flowUri)); cocoon.load(flowUri); }} | 791 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/5950da15528f14729d0b785fe484f5d74d7b7804/usecases.js/buggy/src/webapp/lenya/usecases/usecases.js |
for (name in this.options) { if (/^formats\./.test(name)) { delete this.options[name] } } if (this.format) { showFormatDialog(); } | function loadDefaultOptions() { if (confirm("Do you really want to load default settings?")) { loadFromOptions(OPTIONS); }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/8c6bee0659653d06eef565a6c6695a89c3ae02d0/optionsDialog.js/clean/src/content/optionsDialog.js |
|
registerMenuCommand(docId, commandName, commandCallback, accel, access); | registerMenuCommand(docId, commandName, commandCallback, accel, access, e.explicitOriginalTarget.defaultView); | 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, accel, access) { registerMenuCommand(docId, commandName, commandCallback, accel, access); }; } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/0ffe0d13bc268a9071251a057c30ab9ba398fe0b/greasemonkey.js/buggy/src/content/greasemonkey.js |
document.GM_registerMenuCommand = | e.view.GM_registerMenuCommand = | 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); }; } | 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); | 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); }; } | 2115 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2115/904826b1a895d0db9b1b022eb38190c51df5f2d6/greasemonkey.js/clean/src/content/greasemonkey.js |
function loadDomViewer(){ if(window.opener != null){ newRoot = window.opener.newRoot; if (newRoot==null) newRoot = window.opener.document; document.writeln(displayDOM(newRoot)); document.close(); }else{ newRoot = parent.document.all['myiframe'].contentWindow.document; newRoot.writeln(displayDOM(newRoot)); newRoot.close(); } | function loadDomViewer() { var rootDocument = window.rootDocument; if (!rootDocument && window.opener) { rootDocument = window.opener.rootDocument || window.opener.document; } if (rootDocument) { document.body.innerHTML = displayDOM(rootDocument); } else { document.body.innerHTML = "<b>Must specify rootDocument for window. This can be done by setting the rootDocument variable on this window, or on the opener window for a popup window.</b>"; } | function loadDomViewer(){ if(window.opener != null){ //Open in a new window. // Start with specified root object. // It should be defined as a "newRoot" variable // in the tested page. Could be any element in // the DOM structure of the page that opened it. // Default to document if no object is specified. newRoot = window.opener.newRoot; if (newRoot==null) newRoot = window.opener.document; document.writeln(displayDOM(newRoot)); document.close(); }else{ newRoot = parent.document.all['myiframe'].contentWindow.document; newRoot.writeln(displayDOM(newRoot)); newRoot.close(); }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/3baeb0d7ff7e142f629ebf21bc7ddc8e0fc4fe55/selenium-domviewer.js/clean/code/javascript/selenium-domviewer.js |
function loadDomViewer(){ if(window.opener != null){ newRoot = window.opener.newRoot; if (newRoot==null) newRoot = window.opener.document; document.writeln(displayDOM(newRoot)); document.close(); }else{ newRoot = parent.document.all['myiframe'].contentWindow.document; newRoot.writeln(displayDOM(newRoot)); newRoot.close(); } | function loadDomViewer() { var rootDocument = window.rootDocument; if (!rootDocument && window.opener) { rootDocument = window.opener.rootDocument || window.opener.document; } if (rootDocument) { document.body.innerHTML = displayDOM(rootDocument); } else { document.body.innerHTML = "<b>Must specify rootDocument for window. This can be done by setting the rootDocument variable on this window, or on the opener window for a popup window.</b>"; } | function loadDomViewer(){ if(window.opener != null){ //Open in a new window. // Start with specified root object. // It should be defined as a "newRoot" variable // in the tested page. Could be any element in // the DOM structure of the page that opened it. // Default to document if no object is specified. newRoot = window.opener.newRoot; if (newRoot==null) newRoot = window.opener.document; document.writeln(displayDOM(newRoot)); document.close(); }else{ newRoot = parent.document.all['myiframe'].contentWindow.document; newRoot.writeln(displayDOM(newRoot)); newRoot.close(); }} | 4983 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4983/f185ede8f427d2460f785ef1ec5a888ae661ce84/selenium-domviewer.js/buggy/code/javascript/selenium-domviewer.js |
this.scrollbar.style.display = null; | this.scrollbar.style.removeProperty("display"); | function loaded(){ treeScrollbar = setUpScrollbar("treeScrollbar"); nodeContentsScrollArea = new AppleScrollArea(document.getElementById("nodeContentsScrollview"), setUpScrollbar("nodeContentsScrollbar")); elementAttributesScrollArea = new AppleScrollArea(document.getElementById("elementAttributesScrollview"), setUpScrollbar("elementAttributesScrollbar")); styleRulesScrollArea = new AppleScrollArea(document.getElementById("styleRulesScrollview"), setUpScrollbar("styleRulesScrollbar")); stylePropertiesScrollArea = new AppleScrollArea(document.getElementById("stylePropertiesScrollview"), setUpScrollbar("stylePropertiesScrollbar")); jsPropertiesScrollArea = new AppleScrollArea(document.getElementById("jsPropertiesScrollview"), setUpScrollbar("jsPropertiesScrollbar")); treeScrollbar._getViewToContentRatio = function() { var contentHeight = Inspector.treeViewScrollHeight(); var height = document.getElementById("treeScrollArea").offsetHeight; if (contentHeight > height) return height / contentHeight; return 1.0; } treeScrollbar._computeTrackOffset = function() { return Inspector.treeViewOffsetTop(); } treeScrollbar._getContentLength = function() { return Inspector.treeViewScrollHeight(); } treeScrollbar._getViewLength = function() { return document.getElementById("treeScrollArea").offsetHeight; } treeScrollbar._canScroll = function() { return true; } treeScrollbar.scrollTo = function(pos) { Inspector.treeViewScrollTo(pos); this.verticalHasScrolled(); } treeScrollbar.verticalHasScrolled = function() { var new_thumb_pos = this._thumbPositionForContentPosition(Inspector.treeViewOffsetTop()); this._thumbStart = new_thumb_pos; this._thumb.style.top = new_thumb_pos + "px"; } // much better AppleScrollArea reveal AppleScrollArea.prototype.reveal = function(node) { var offsetY = 0; var obj = node; do { offsetY += obj.offsetTop; obj = obj.offsetParent; } while (obj && obj != this.content); var offsetX = 0; obj = node; do { offsetX += obj.offsetLeft; obj = obj.offsetParent; } while (obj && obj != this.content); var top = this.content.scrollTop; var height = this.viewHeight; if ((top + height) < (offsetY + node.clientHeight)) this.verticalScrollTo(offsetY - height + node.clientHeight); else if (top > offsetY) this.verticalScrollTo(offsetY); var left = this.content.scrollLeft; var width = this.viewWidth; if ((left + width) < (offsetX + node.clientWidth)) this.horizontalScrollTo(offsetX - width + node.clientWidth); else if (left > offsetX) this.horizontalScrollTo(offsetX); } // Change the standard show/hide to include the entire scrollbar. // This lets the content reflow to use the additional space when the scrollbar is hidden. AppleScrollbar.prototype.hide = function() { this._track.style.display = "none"; this.scrollbar.style.display = "none"; this.hidden = true; } AppleScrollbar.prototype.show = function() { this._track.style.display = "block"; this.scrollbar.style.display = null; if (this.hidden) { this.hidden = false; this.refresh(); } } window.addEventListener("resize", refreshScrollbars, false); toggleNoSelection(false); switchPane("node");} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/698fe24365317fd75bda13d558b5e551b352b9c6/inspector.js/clean/third_party/WebKit/WebKit/WebInspector/webInspector/inspector.js |
window.addEventListener("keypress", keyPressed, false); | function loaded() { window.addEventListener("keypress", keyPressed, false); document.getElementById("divider").addEventListener("mousedown", sourceDividerDragStart, false); document.getElementById("infoDivider").addEventListener("mousedown", infoDividerDragStart, false);} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/87c43d6ec3aad96a273f2997292509edc27c7e34/debugger.js/buggy/third_party/WebKit/WebKitTools/Drosera/debugger.js |
|
elementAttributesScrollbar = new AppleVerticalScrollbar(document.getElementById("elementAttributesScrollbar")); elementAttributesScrollArea = new AppleScrollArea(document.getElementById("elementAttributesScrollview"), elementAttributesScrollbar); elementAttributesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); elementAttributesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); elementAttributesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); elementAttributesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); elementAttributesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); elementAttributesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); | function loaded(){ treeScrollbar = new AppleVerticalScrollbar(document.getElementById("treeScrollbar")); treeScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); treeScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); treeScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); treeScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); treeScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); treeScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); nodeContentsScrollbar = new AppleVerticalScrollbar(document.getElementById("nodeContentsScrollbar")); nodeContentsScrollArea = new AppleScrollArea(document.getElementById("nodeContentsScrollview"), nodeContentsScrollbar); nodeContentsScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); nodeContentsScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); nodeContentsScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); nodeContentsScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); nodeContentsScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); nodeContentsScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); styleRulesScrollbar = new AppleVerticalScrollbar(document.getElementById("styleRulesScrollbar")); styleRulesScrollArea = new AppleScrollArea(document.getElementById("styleRulesScrollview"), styleRulesScrollbar); styleRulesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); styleRulesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); styleRulesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); styleRulesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); styleRulesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); styleRulesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); stylePropertiesScrollbar = new AppleVerticalScrollbar(document.getElementById("stylePropertiesScrollbar")); stylePropertiesScrollArea = new AppleScrollArea(document.getElementById("stylePropertiesScrollview"), stylePropertiesScrollbar); stylePropertiesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); stylePropertiesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); stylePropertiesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); stylePropertiesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); stylePropertiesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); stylePropertiesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9); treeScrollbar._getViewToContentRatio = function() { var contentHeight = Inspector.treeViewScrollHeight(); var height = document.getElementById("treeScrollArea").offsetHeight; if (contentHeight > height) return height / contentHeight; return 1.0; } treeScrollbar._computeTrackOffset = function() { return Inspector.treeViewOffsetTop(); } treeScrollbar._getContentLength = function() { return Inspector.treeViewScrollHeight(); } treeScrollbar._getViewLength = function() { return document.getElementById("treeScrollArea").offsetHeight; } treeScrollbar._canScroll = function() { return true; } treeScrollbar.scrollTo = function(pos) { Inspector.treeViewScrollTo(pos); this.verticalHasScrolled(); } treeScrollbar.verticalHasScrolled = function() { var new_thumb_pos = this._thumbPositionForContentPosition(Inspector.treeViewOffsetTop()); this._thumbStart = new_thumb_pos; this._thumb.style.top = new_thumb_pos + "px"; } // much better AppleScrollArea reveal AppleScrollArea.prototype.reveal = function(node) { var offsetY = 0; var obj = node; do { offsetY += obj.offsetTop; obj = obj.offsetParent; } while (obj && obj != this.content); var offsetX = 0; obj = node; do { offsetX += obj.offsetLeft; obj = obj.offsetParent; } while (obj && obj != this.content); var top = this.content.scrollTop; var height = this.viewHeight; if ((top + height) < (offsetY + node.clientHeight)) this.verticalScrollTo(offsetY - height + node.clientHeight); else if (top > offsetY) this.verticalScrollTo(offsetY); var left = this.content.scrollLeft; var width = this.viewWidth; if ((left + width) < (offsetX + node.clientWidth)) this.horizontalScrollTo(offsetX - width + node.clientWidth); else if (left > offsetX) this.horizontalScrollTo(offsetX); }; window.addEventListener("resize", refreshScrollbars, false);} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/5ec59fdcd1b307b7c960fa55c6890908836dbd49/inspector.js/buggy/third_party/WebKit/WebKit/WebInspector.subproj/webInspector/inspector.js |
|
document.getElementById("filesDivider").addEventListener("mousedown", filesDividerDragStart, false); | function loaded() { document.getElementById("divider").addEventListener("mousedown", sourceDividerDragStart, false); document.getElementById("infoDivider").addEventListener("mousedown", infoDividerDragStart, false); document.getElementById("variableColumnResizer").addEventListener("mousedown", columnResizerDragStart, false);} | 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 loaded() { | function loaded() { | function loaded() { document.getElementById("divider").addEventListener("mousedown", sourceDividerDragStart, false); document.getElementById("infoDivider").addEventListener("mousedown", infoDividerDragStart, false); document.getElementById("filesDivider").addEventListener("mousedown", filesDividerDragStart, false); document.getElementById("variableColumnResizer").addEventListener("mousedown", columnResizerDragStart, false);} | 10664 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/265b0e098271034b585404142515fee7102730f2/debugger.js/clean/third_party/WebKit/WebKitTools/Drosera/debugger.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/railties/html/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/railties/html/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 4687 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4687/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 4687 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4687/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 6649 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6649/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 6649 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6649/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 1534 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1534/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 1534 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1534/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/ce69ee676a665c2710e7b2f1edf9376c3a2ca806/controls.js/clean/src/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 4053 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4053/ce69ee676a665c2710e7b2f1edf9376c3a2ca806/controls.js/clean/src/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 2069 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2069/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 2069 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2069/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 269 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/269/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 269 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/269/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/railties/html/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/railties/html/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 1604 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1604/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 1604 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1604/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/buggy/actionpack/lib/action_view/helpers/javascripts/controls.js |
{ | Object.extend({ | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 107 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/107/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
} | }, this.options.ajaxOptions) | loadExternalText: function() { new Ajax.Request( this.options.loadTextURL, { asynchronous: true, onComplete: this.onLoadedExternalText.bind(this) } ); }, | 107 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/107/7d101d58400acaff232091485c8e140f0a37cbaf/controls.js/clean/railties/html/javascripts/controls.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.