rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
13
136k
meta
stringlengths
132
347
line = tokenizer.stripComment(line); if (line === 'C') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'common_time'}; } else if (line === 'C|') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'cut_time'}; } else if (line.length === 0 || line.toLowerCase() === 'none') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return null;
line = tokenizer.stripComment(line); if (line === 'C') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'common_time'}; } else if (line === 'C|') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'cut_time'}; } else if (line.length === 0 || line.toLowerCase() === 'none') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return null; } else { var tokens = tokenizer.tokenize(line, 0, line.length); try { var parseNum = function() { var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number of meter"; ret.value += parseInt(tok.token); ret.num += tok.token; if (tokens.length === 0 || tokens[0].token === '/') return ret; tok = tokens.shift(); if (tok.token === ')') { if (tokens.length === 0 || tokens[0].token === '/') return ret; throw "Unexpected paren in meter"; } if (tok.token !== '.' && tok.token !== '+') throw "Expected top number of meter"; ret.num += tok.token; if (tokens.length === 0) throw "Expected top number of meter"; tok = tokens.shift(); } return ret; }; var parseFraction = function() { var ret = parseNum(); if (tokens.length === 0) throw "Expected slash in meter"; var tok = tokens.shift(); if (tok.token !== '/') throw "Expected slash in meter"; tok = tokens.shift(); if (tok.type !== 'number') throw "Expected bottom number of meter"; ret.den = tok.token; ret.value = ret.value / parseInt(ret.den); return ret; }; if (tokens.length === 0) throw "Expected meter definition in M: line"; var meter = {type: 'specified', value: [ ]}; var totalLength = 0; while (1) { var ret = parseFraction(); totalLength += ret.value; meter.value.push({ num: ret.num, den: ret.den }); if (tokens.length === 0) break; var tok = tokens.shift(); if (tok.token !== '+') throw "Extra characters in M: line"; } if (multilineVars.havent_set_length === true) { multilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125; } return meter; } catch (e) { warn(e, line, 0);
this.setMeter = function(line) { line = tokenizer.stripComment(line); if (line === 'C') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'common_time'}; } else if (line === 'C|') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'cut_time'}; } else if (line.length === 0 || line.toLowerCase() === 'none') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return null; } else { var tokens = tokenizer.tokenize(line, 0, line.length); // the form is [open_paren] decimal [ plus|dot decimal ]... [close_paren] slash decimal [plus same_as_before] try { var parseNum = function() { // handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren] var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number of meter"; ret.value += parseInt(tok.token); ret.num += tok.token; if (tokens.length === 0 || tokens[0].token === '/') return ret; tok = tokens.shift(); if (tok.token === ')') { if (tokens.length === 0 || tokens[0].token === '/') return ret; throw "Unexpected paren in meter"; } if (tok.token !== '.' && tok.token !== '+') throw "Expected top number of meter"; ret.num += tok.token; if (tokens.length === 0) throw "Expected top number of meter"; tok = tokens.shift(); } return ret; // just to suppress warning }; var parseFraction = function() { // handles this much: parseNum slash decimal var ret = parseNum(); if (tokens.length === 0) throw "Expected slash in meter"; var tok = tokens.shift(); if (tok.token !== '/') throw "Expected slash in meter"; tok = tokens.shift(); if (tok.type !== 'number') throw "Expected bottom number of meter"; ret.den = tok.token; ret.value = ret.value / parseInt(ret.den); return ret; }; if (tokens.length === 0) throw "Expected meter definition in M: line"; var meter = {type: 'specified', value: [ ]}; var totalLength = 0; while (1) { var ret = parseFraction(); totalLength += ret.value; meter.value.push({ num: ret.num, den: ret.den }); if (tokens.length === 0) break; var tok = tokens.shift(); if (tok.token !== '+') throw "Extra characters in M: line"; } if (multilineVars.havent_set_length === true) { multilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125; } return meter; } catch (e) { warn(e, line, 0); } } return null; };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
else { var tokens = tokenizer.tokenize(line, 0, line.length); try { var parseNum = function() { var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number of meter"; ret.value += parseInt(tok.token); ret.num += tok.token; if (tokens.length === 0 || tokens[0].token === '/') return ret; tok = tokens.shift(); if (tok.token === ')') { if (tokens.length === 0 || tokens[0].token === '/') return ret; throw "Unexpected paren in meter"; } if (tok.token !== '.' && tok.token !== '+') throw "Expected top number of meter"; ret.num += tok.token; if (tokens.length === 0) throw "Expected top number of meter"; tok = tokens.shift(); } return ret; }; var parseFraction = function() { var ret = parseNum(); if (tokens.length === 0) throw "Expected slash in meter"; var tok = tokens.shift(); if (tok.token !== '/') throw "Expected slash in meter"; tok = tokens.shift(); if (tok.type !== 'number') throw "Expected bottom number of meter"; ret.den = tok.token; ret.value = ret.value / parseInt(ret.den); return ret; }; if (tokens.length === 0) throw "Expected meter definition in M: line"; var meter = {type: 'specified', value: [ ]}; var totalLength = 0; while (1) { var ret = parseFraction(); totalLength += ret.value; meter.value.push({ num: ret.num, den: ret.den }); if (tokens.length === 0) break; var tok = tokens.shift(); if (tok.token !== '+') throw "Extra characters in M: line"; } if (multilineVars.havent_set_length === true) { multilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125; } return meter; } catch (e) { warn(e, line, 0); } } return null; };
} return null; };
this.setMeter = function(line) { line = tokenizer.stripComment(line); if (line === 'C') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'common_time'}; } else if (line === 'C|') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return {type: 'cut_time'}; } else if (line.length === 0 || line.toLowerCase() === 'none') { if (multilineVars.havent_set_length === true) multilineVars.default_length = 0.125; return null; } else { var tokens = tokenizer.tokenize(line, 0, line.length); // the form is [open_paren] decimal [ plus|dot decimal ]... [close_paren] slash decimal [plus same_as_before] try { var parseNum = function() { // handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren] var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number of meter"; ret.value += parseInt(tok.token); ret.num += tok.token; if (tokens.length === 0 || tokens[0].token === '/') return ret; tok = tokens.shift(); if (tok.token === ')') { if (tokens.length === 0 || tokens[0].token === '/') return ret; throw "Unexpected paren in meter"; } if (tok.token !== '.' && tok.token !== '+') throw "Expected top number of meter"; ret.num += tok.token; if (tokens.length === 0) throw "Expected top number of meter"; tok = tokens.shift(); } return ret; // just to suppress warning }; var parseFraction = function() { // handles this much: parseNum slash decimal var ret = parseNum(); if (tokens.length === 0) throw "Expected slash in meter"; var tok = tokens.shift(); if (tok.token !== '/') throw "Expected slash in meter"; tok = tokens.shift(); if (tok.type !== 'number') throw "Expected bottom number of meter"; ret.den = tok.token; ret.value = ret.value / parseInt(ret.den); return ret; }; if (tokens.length === 0) throw "Expected meter definition in M: line"; var meter = {type: 'specified', value: [ ]}; var totalLength = 0; while (1) { var ret = parseFraction(); totalLength += ret.value; meter.value.push({ num: ret.num, den: ret.den }); if (tokens.length === 0) break; var tok = tokens.shift(); if (tok.token !== '+') throw "Extra characters in M: line"; } if (multilineVars.havent_set_length === true) { multilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125; } return meter; } catch (e) { warn(e, line, 0); } } return null; };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
var setMeter = function(meter) { meter = tokenizer.stripComment(meter); if (meter === 'C') {
var setMeter = function(line) { line = tokenizer.stripComment(line); if (line === 'C') {
var setMeter = function(meter) { meter = tokenizer.stripComment(meter); if (meter === 'C') { multilineVars.meter = {type: 'common_time'}; multilineVars.havent_set_length = false; } else if (meter === 'C|') { multilineVars.meter = {type: 'cut_time'}; multilineVars.havent_set_length = false; } else if (meter.length === 0 || meter.toLowerCase() === 'none') multilineVars.meter = null; else { var a = meter.split('/'); if (a.length === 2) multilineVars.meter = {type: 'specified', num: a[0].strip(), den: a[1].strip()}; if (multilineVars.havent_set_length === true) { multilineVars.default_length = multilineVars.meter.num/multilineVars.meter.den < 0.75 ? 0.5 : 1; multilineVars.havent_set_length = false; } } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/66c5771dcec8aa949d4f3e38d5c1edaf2264c555/abc_parse.js/buggy/abc_parse.js
multilineVars.havent_set_length = false; } else if (meter === 'C|') {
if (multilineVars.havent_set_length === true) multilineVars.default_length = 1; } else if (line === 'C|') {
var setMeter = function(meter) { meter = tokenizer.stripComment(meter); if (meter === 'C') { multilineVars.meter = {type: 'common_time'}; multilineVars.havent_set_length = false; } else if (meter === 'C|') { multilineVars.meter = {type: 'cut_time'}; multilineVars.havent_set_length = false; } else if (meter.length === 0 || meter.toLowerCase() === 'none') multilineVars.meter = null; else { var a = meter.split('/'); if (a.length === 2) multilineVars.meter = {type: 'specified', num: a[0].strip(), den: a[1].strip()}; if (multilineVars.havent_set_length === true) { multilineVars.default_length = multilineVars.meter.num/multilineVars.meter.den < 0.75 ? 0.5 : 1; multilineVars.havent_set_length = false; } } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/66c5771dcec8aa949d4f3e38d5c1edaf2264c555/abc_parse.js/buggy/abc_parse.js
multilineVars.havent_set_length = false; } else if (meter.length === 0 || meter.toLowerCase() === 'none')
if (multilineVars.havent_set_length === true) multilineVars.default_length = 1; } else if (line.length === 0 || line.toLowerCase() === 'none') {
var setMeter = function(meter) { meter = tokenizer.stripComment(meter); if (meter === 'C') { multilineVars.meter = {type: 'common_time'}; multilineVars.havent_set_length = false; } else if (meter === 'C|') { multilineVars.meter = {type: 'cut_time'}; multilineVars.havent_set_length = false; } else if (meter.length === 0 || meter.toLowerCase() === 'none') multilineVars.meter = null; else { var a = meter.split('/'); if (a.length === 2) multilineVars.meter = {type: 'specified', num: a[0].strip(), den: a[1].strip()}; if (multilineVars.havent_set_length === true) { multilineVars.default_length = multilineVars.meter.num/multilineVars.meter.den < 0.75 ? 0.5 : 1; multilineVars.havent_set_length = false; } } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/66c5771dcec8aa949d4f3e38d5c1edaf2264c555/abc_parse.js/buggy/abc_parse.js
var a = meter.split('/'); if (a.length === 2) multilineVars.meter = {type: 'specified', num: a[0].strip(), den: a[1].strip()};
var tokens = tokenizer.tokenize(line, 0, line.length); try { var parseNum = function() { var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number of meter"; ret.value += parseInt(tok.token); ret.num += tok.token; if (tokens.length === 0 || tokens[0].token === '/') return ret; tok = tokens.shift(); if (tok.token === ')') { if (tokens.length === 0 || tokens[0].token === '/') return ret; throw "Unexpected paren in meter"; } if (tok.token !== '.' && tok.token !== '+') throw "Expected top number of meter"; ret.num += tok.token; if (tokens.length === 0) throw "Expected top number of meter"; tok = tokens.shift(); } return ret; }; var parseFraction = function() { var ret = parseNum(); if (tokens.length === 0) throw "Expected slash in meter"; var tok = tokens.shift(); if (tok.token !== '/') throw "Expected slash in meter"; tok = tokens.shift(); if (tok.type !== 'number') throw "Expected bottom number of meter"; ret.den = tok.token; ret.value = ret.value / parseInt(ret.den); return ret; } if (tokens.length === 0) throw "Expected meter definition in M: line"; var meter = {type: 'specified', value: [ ]}; var totalLength = 0; while (1) { var ret = parseFraction(); totalLength += ret.value; meter.value.push({ num: ret.num, den: ret.den }); if (tokens.length === 0) break; tok = tokens.shift(); if (tok.token !== '+') throw "Extra characters in M: line"; } multilineVars.meter = meter;
var setMeter = function(meter) { meter = tokenizer.stripComment(meter); if (meter === 'C') { multilineVars.meter = {type: 'common_time'}; multilineVars.havent_set_length = false; } else if (meter === 'C|') { multilineVars.meter = {type: 'cut_time'}; multilineVars.havent_set_length = false; } else if (meter.length === 0 || meter.toLowerCase() === 'none') multilineVars.meter = null; else { var a = meter.split('/'); if (a.length === 2) multilineVars.meter = {type: 'specified', num: a[0].strip(), den: a[1].strip()}; if (multilineVars.havent_set_length === true) { multilineVars.default_length = multilineVars.meter.num/multilineVars.meter.den < 0.75 ? 0.5 : 1; multilineVars.havent_set_length = false; } } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/66c5771dcec8aa949d4f3e38d5c1edaf2264c555/abc_parse.js/buggy/abc_parse.js
multilineVars.default_length = multilineVars.meter.num/multilineVars.meter.den < 0.75 ? 0.5 : 1; multilineVars.havent_set_length = false;
multilineVars.default_length = totalLength < 0.75 ? 0.5 : 1;
var setMeter = function(meter) { meter = tokenizer.stripComment(meter); if (meter === 'C') { multilineVars.meter = {type: 'common_time'}; multilineVars.havent_set_length = false; } else if (meter === 'C|') { multilineVars.meter = {type: 'cut_time'}; multilineVars.havent_set_length = false; } else if (meter.length === 0 || meter.toLowerCase() === 'none') multilineVars.meter = null; else { var a = meter.split('/'); if (a.length === 2) multilineVars.meter = {type: 'specified', num: a[0].strip(), den: a[1].strip()}; if (multilineVars.havent_set_length === true) { multilineVars.default_length = multilineVars.meter.num/multilineVars.meter.den < 0.75 ? 0.5 : 1; multilineVars.havent_set_length = false; } } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/66c5771dcec8aa949d4f3e38d5c1edaf2264c555/abc_parse.js/buggy/abc_parse.js
} catch (e) { warn(e, line, 0); }
var setMeter = function(meter) { meter = tokenizer.stripComment(meter); if (meter === 'C') { multilineVars.meter = {type: 'common_time'}; multilineVars.havent_set_length = false; } else if (meter === 'C|') { multilineVars.meter = {type: 'cut_time'}; multilineVars.havent_set_length = false; } else if (meter.length === 0 || meter.toLowerCase() === 'none') multilineVars.meter = null; else { var a = meter.split('/'); if (a.length === 2) multilineVars.meter = {type: 'specified', num: a[0].strip(), den: a[1].strip()}; if (multilineVars.havent_set_length === true) { multilineVars.default_length = multilineVars.meter.num/multilineVars.meter.den < 0.75 ? 0.5 : 1; multilineVars.havent_set_length = false; } } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/66c5771dcec8aa949d4f3e38d5c1edaf2264c555/abc_parse.js/buggy/abc_parse.js
var i = tokenizer.skipWhiteSpace(str); str = str.substring(i); if (str.startsWith('m=') || str.startsWith('middle=')) { str = str.substring(str.indexOf('=')+1); multilineVars.clef.middle = parseMiddle(str); } };
var i = tokenizer.skipWhiteSpace(str); str = str.substring(i); if (str.startsWith('m=') || str.startsWith('middle=')) { str = str.substring(str.indexOf('=')+1); multilineVars.clef.middle = parseMiddle(str); } };
var setMiddle = function(str) { var i = tokenizer.skipWhiteSpace(str); str = str.substring(i); if (str.startsWith('m=') || str.startsWith('middle=')) { str = str.substring(str.indexOf('=')+1); multilineVars.clef.middle = parseMiddle(str); } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.6",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=
null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery-ui.js/buggy/javascript/jquery-ui.js
if (popupContainer === undefined || popupContainer == null) return;
setMRUdatabases: function() { //return; // alert("set"); // get the popup menu for this list of logins and subgroups // var container = this._currentWindow.document.getElementById("KeeFox_ChangeDB-Button"); var popupContainer = this._currentWindow.document.getElementById("KeeFox_ChangeDB-Popup"); // Remove all of the existing buttons for (i = popupContainer.childNodes.length; i > 0; i--) { popupContainer.removeChild(popupContainer.childNodes[0]); } var mruArray = this._currentWindow.keeFoxInst.getAllDatabaseFileNames(); if (mruArray == null || mruArray.length == 0) { var noItemsButton = null; noItemsButton = this._currentWindow.document.createElement("menuitem"); noItemsButton.setAttribute("label", this.strbundle.getString("changeDBButtonEmpty.label")); noItemsButton.setAttribute("disabled", "true"); noItemsButton.setAttribute("tooltiptext", this.strbundle.getString("changeDBButtonEmpty.tip")); popupContainer.appendChild(noItemsButton); return; } else { for (i = 0; i < mruArray.length; i++) { var tempButton = null; tempButton = this._currentWindow.document.createElement("menuitem"); tempButton.setAttribute("label", mruArray[i]); tempButton.setAttribute("tooltiptext", this.strbundle.getString("changeDBButtonListItem.tip")); tempButton.setAttribute("oncommand", "keeFoxInst.changeDatabase('" + mruArray[i].replace(/[\\]/g,'\\\\') + "',false); event.stopPropagation();"); tempButton.setAttribute("class", "menuitem-iconic"); //tempButton.setAttribute("context", "KeeFox-login-context"); in future this could enable "set to default for this location..." etc. ? tempButton.setAttribute("image", "chrome://mozapps/skin/passwordmgr/key.png"); //TODO: use KeePass database icon popupContainer.appendChild(tempButton); } } },
2656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2656/3493c6e90936247e4528a0cd55f33cd21a635ec2/KFToolBar.js/clean/Firefox addon/KeeFox/chrome/content/KFToolBar.js
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery.js/clean/javascript/jquery.js
bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left- e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e67dc72e11289d294cc6b462fc98149983bd62f4/jquery.js/clean/wp-includes/js/jquery/jquery.js
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&&
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a,e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&&
2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/frontend/core/js/jquery/jquery.js
-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position= "relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery);
a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery);
3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery-ui.js/buggy/javascript/jquery-ui.js
setOffset: function( elem, options, i ) { var position = jQuery.css( elem, "position" ); if ( position === "static" ) { elem.style.position = "relative"; } var curElem = jQuery( elem ), curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1), props = {}, curPosition = {}, curTop, curLeft; if ( calculatePosition ) { curPosition = curElem.position(); } curTop = calculatePosition ? curPosition.top : parseInt( curCSSTop, 10 ) || 0; curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0; if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if (options.top != null) { props.top = (options.top - curOffset.top) + curTop; } if (options.left != null) { props.left = (options.left - curOffset.left) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } }
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
setOffset: function( elem, options, i ) { var position = jQuery.css( elem, "position" ); // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } var curElem = jQuery( elem ), curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1), props = {}, curPosition = {}, curTop, curLeft; // need to be able to calculate position if either top or left is auto and position is absolute if ( calculatePosition ) { curPosition = curElem.position(); } curTop = calculatePosition ? curPosition.top : parseInt( curCSSTop, 10 ) || 0; curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0; if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if (options.top != null) { props.top = (options.top - curOffset.top) + curTop; } if (options.left != null) { props.left = (options.left - curOffset.left) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } }
10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/337f8a7f8f1bd9e61727ac292aa76724b4cf7a46/jquery.js/clean/wp-includes/js/jquery/jquery.js
b.left+=a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d= c(b),g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
b.left+=a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/2fdac1ebbdba127489a58801f9e124cb3526654d/ui.position.js/buggy/wp-includes/js/jquery/ui.position.js
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&&
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/jquery.js/clean/js/jquery.js
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&&
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a,e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&&
2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/backend/core/js/jquery/jquery.js
bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left- e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/4d748e5cbfcbd91691b089e42cffdf43918e6201/jquery.min.js/clean/web/javascript/jquery/jquery.min.js
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&&
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8e2f21f44411204c60060f830cb1a800533462d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js
d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,e=a.offsetLeft;d.offset.initialize();if(d.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(d.curCSS(a,"marginTop",true))||0;e+=parseFloat(d.curCSS(a,"marginLeft",true))||0}return{top:b,left:e}},setOffset:function(a,b,e){if(/static/.test(d.curCSS(a,"position")))a.style.position="relative";var g=d(a),h=g.offset(),k=parseInt(d.curCSS(a,"top",true),10)||0,l=parseInt(d.curCSS(a,"left",true),10)||0;if(d.isFunction(b))b=b.call(a, e,h);e={top:b.top-h.top+k,left:b.left-h.left+l};"using"in b?b.using.call(a,e):g.css(e)}};d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),e=this.offset(),g=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();e.top-=parseFloat(d.curCSS(a,"marginTop",true))||0;e.left-=parseFloat(d.curCSS(a,"marginLeft",true))||0;g.top+=parseFloat(d.curCSS(b[0],"borderTopWidth",true))||0;g.left+=parseFloat(d.curCSS(b[0],"borderLeftWidth",true))||0;return{top:e.top-
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,e=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;e+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:e}},setOffset:function(a,b,e){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),h=f.offset(),k=parseInt(c.curCSS(a,"top",true),10)||0,l=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, e,h);e={top:b.top-h.top+k,left:b.left-h.left+l};"using"in b?b.using.call(a,e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),e=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();e.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;e.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:e.top-
d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,e=a.offsetLeft;d.offset.initialize();if(d.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(d.curCSS(a,"marginTop",true))||0;e+=parseFloat(d.curCSS(a,"marginLeft",true))||0}return{top:b,left:e}},setOffset:function(a,b,e){if(/static/.test(d.curCSS(a,"position")))a.style.position="relative";var g=d(a),h=g.offset(),k=parseInt(d.curCSS(a,"top",true),10)||0,l=parseInt(d.curCSS(a,"left",true),10)||0;if(d.isFunction(b))b=b.call(a,e,h);e={top:b.top-h.top+k,left:b.left-h.left+l};"using"in b?b.using.call(a,e):g.css(e)}};d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),e=this.offset(),g=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();e.top-=parseFloat(d.curCSS(a,"marginTop",true))||0;e.left-=parseFloat(d.curCSS(a,"marginLeft",true))||0;g.top+=parseFloat(d.curCSS(b[0],"borderTopWidth",true))||0;g.left+=parseFloat(d.curCSS(b[0],"borderLeftWidth",true))||0;return{top:e.top-
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/bb76d586bec69eabec79913009e9ba30d248e123/jquery.min.js/buggy/src/web/skeleton/jquery.min.js
return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||l<n-k)j.$.scrollTo(0,l);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;
},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);
return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||l<n-k)j.$.scrollTo(0,l);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
element = hasLayout($(element));
element = hasLayout_IE($(element));
function setOpacity_IE(element, value) { element = hasLayout($(element)); var filter = Element.getStyle(element, 'filter'), style = element.style; if (value == 1 || value === '') { // Remove the `alpha` filter from IE's `filter` CSS property. If there // is anything left after removal, put it back where it was; otherwise // remove the property. filter = stripAlphaFromFilter_IE(filter); if (filter) style.filter = filter; else style.removeAttribute('filter'); return element; } if (value < 0.00001) value = 0; style.filter = stripAlphaFromFilter_IE(filter) + 'alpha(opacity=' + (value * 100) + ')'; return element; }
6684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6684/e5c8fcead6331b7ca2a2eddc735b07a784afa3d6/dom.js/clean/src/dom/dom.js
style = element.style;
style = element.style;
function setOpacity_IE(element, value) { element = hasLayout($(element)); var filter = Element.getStyle(element, 'filter'), style = element.style; if (value == 1 || value === '') { // Remove the `alpha` filter from IE's `filter` CSS property. If there // is anything left after removal, put it back where it was; otherwise // remove the property. filter = stripAlphaFromFilter_IE(filter); if (filter) style.filter = filter; else style.removeAttribute('filter'); return element; } if (value < 0.00001) value = 0; style.filter = stripAlphaFromFilter_IE(filter) + 'alpha(opacity=' + (value * 100) + ')'; return element; }
6684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6684/e5c8fcead6331b7ca2a2eddc735b07a784afa3d6/dom.js/clean/src/dom/dom.js
else style.removeAttribute('filter');
else style.removeAttribute('filter');
function setOpacity_IE(element, value) { element = hasLayout($(element)); var filter = Element.getStyle(element, 'filter'), style = element.style; if (value == 1 || value === '') { // Remove the `alpha` filter from IE's `filter` CSS property. If there // is anything left after removal, put it back where it was; otherwise // remove the property. filter = stripAlphaFromFilter_IE(filter); if (filter) style.filter = filter; else style.removeAttribute('filter'); return element; } if (value < 0.00001) value = 0; style.filter = stripAlphaFromFilter_IE(filter) + 'alpha(opacity=' + (value * 100) + ')'; return element; }
6684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6684/e5c8fcead6331b7ca2a2eddc735b07a784afa3d6/dom.js/clean/src/dom/dom.js
(function($){$.imgAreaSelect={onKeyPress:null};$.imgAreaSelect.init=function(img,options){var $img=$(img),imgLoaded,$box=$('<div />'),$area=$('<div />'),$border1=$('<div />'),$border2=$('<div />'),$areaOpera,$outLeft=$('<div />'),$outTop=$('<div />'),$outRight=$('<div />'),$outBottom=$('<div />'),$handles=$([]),handleWidth,handles=[],left,top,M=Math,imgOfs,imgWidth,imgHeight,$parent,parOfs,zIndex=0,position='absolute',$p,startX,startY,scaleX=1,scaleY=1,resizeMargin=10,resize=[],V=0,H=1,d,aspectRatio,x1,x2,y1,y2,x,y,adjusted,shown,i,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};var $o=$outLeft.add($outTop).add($outRight).add($outBottom);function viewX(x){return x+imgOfs.left-parOfs.left}function viewY(y){return y+imgOfs.top-parOfs.top}function selX(x){return x-imgOfs.left+parOfs.left}function selY(y){return y-imgOfs.top+parOfs.top}function evX(event){return event.pageX-parOfs.left}function evY(event){return event.pageY-parOfs.top}function trueSelection(){return{x1:M.round(selection.x1*scaleX),y1:M.round(selection.y1*scaleY),x2:M.round(selection.x2*scaleX),y2:M.round(selection.y2*scaleY),width:M.round(selection.x2*scaleX)-M.round(selection.x1*scaleX),height:M.round(selection.y2*scaleY)-M.round(selection.y1*scaleY)}}function getZIndex(){$p=$img;while($p.length&&!$p.is('body')){if(!isNaN($p.css('z-index'))&&$p.css('z-index')>zIndex)zIndex=$p.css('z-index');if($p.css('position')=='fixed')position='fixed';$p=$p.parent()}if(!isNaN(options.zIndex))zIndex=options.zIndex}function adjust(){imgOfs={left:M.round($img.offset().left),top:M.round($img.offset().top)};imgWidth=$img.width();imgHeight=$img.height();if($().jquery=='1.3.2'&&$.browser.safari&&position=='fixed'){imgOfs.top+=M.max(document.documentElement.scrollTop,$('body').scrollTop());imgOfs.left+=M.max(document.documentElement.scrollLeft,$('body').scrollLeft())}parOfs=$.inArray($parent.css('position'),['absolute','relative'])!=-1?{left:M.round($parent.offset().left)-$parent.scrollLeft(),top:M.round($parent.offset().top)-$parent.scrollTop()}:position=='fixed'?{left:$(document).scrollLeft(),top:$(document).scrollTop()}:{left:0,top:0};left=viewX(0);top=viewY(0)}function update(resetKeyPress){if(!shown)return;$box.css({left:viewX(selection.x1)+'px',top:viewY(selection.y1)+'px',width:selection.width+'px',height:selection.height+'px'});$area.add($border1).add($border2).css({left:'0px',top:'0px',width:M.max(selection.width-options.borderWidth*2,0)+'px',height:M.max(selection.height-options.borderWidth*2,0)+'px'});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$border1.add($border2).css({opacity:options.borderOpacity});$outLeft.css({left:left+'px',top:top+'px',width:selection.x1+'px',height:imgHeight+'px'});$outTop.css({left:left+selection.x1+'px',top:top+'px',width:selection.width+'px',height:selection.y1+'px'});$outRight.css({left:left+selection.x2+'px',top:top+'px',width:imgWidth-selection.x2+'px',height:imgHeight+'px'});$outBottom.css({left:left+selection.x1+'px',top:top+selection.y2+'px',width:selection.width+'px',height:imgHeight-selection.y2+'px'});if(handles.length){handles[1].css({left:selection.width-handleWidth+'px'});handles[2].css({left:selection.width-handleWidth+'px',top:selection.height-handleWidth+'px'});handles[3].css({top:selection.height-handleWidth+'px'});if(handles.length==8){handles[4].css({left:(selection.width-handleWidth)/2+'px'});handles[5].css({left:selection.width-handleWidth+'px',top:(selection.height-handleWidth)/2+'px'});handles[6].css({left:(selection.width-handleWidth)/2+'px',top:selection.height-handleWidth+'px'});handles[7].css({top:(selection.height-handleWidth)/2+'px'})}}if(resetKeyPress!==false){if($.imgAreaSelect.keyPress!=docKeyPress)$(document).unbind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress);if(options.keys)$(document).bind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress=docKeyPress)}if($.browser.msie&&options.borderWidth==1&&options.borderOpacity<1){$border1.add($border2).css('margin','0');setTimeout(function(){$border1.add($border2).css('margin','auto')},0)}}function areaMouseMove(event){if(!adjusted){adjust();adjusted=true;$box.one('mouseout',function(){adjusted=false})}x=selX(evX(event))-selection.x1;y=selY(evY(event))-selection.y1;resize=[];if(options.resizable){if(y<=resizeMargin)resize[V]='n';else if(y>=selection.height-resizeMargin)resize[V]='s';if(x<=resizeMargin)resize[H]='w';else if(x>=selection.width-resizeMargin)resize[H]='e'}$box.css('cursor',resize.length?resize.join('')+'-resize':options.movable?'move':'');if($areaOpera)$areaOpera.toggle()}function docMouseUp(event){resize=[];$('body').css('cursor','');if(options.autoHide||selection.width*selection.height==0)$box.add($o).hide();options.onSelectEnd(img,trueSelection());$(document).unbind('mousemove',selectingMouseMove);$box.mousemove(areaMouseMove)}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(options.resizable&&resize.length>0){$('body').css('cursor',resize.join('')+'-resize');x1=viewX(selection[resize[H]=='w'?'x2':'x1']);y1=viewY(selection[resize[V]=='n'?'y2':'y1']);$(document).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove)}else if(options.movable){startX=left+selection.x1-evX(event);startY=top+selection.y1-evY(event);$box.unbind('mousemove',areaMouseMove);$(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,trueSelection());$(document).unbind('mousemove',movingMouseMove);$box.mousemove(areaMouseMove)})}else $img.mousedown(event);return false}function aspectRatioXY(){x2=M.max(left,M.min(left+imgWidth,x1+M.abs(y2-y1)*aspectRatio*(x2<x1?-1:1)));y2=M.round(M.max(top,M.min(top+imgHeight,y1+M.abs(x2-x1)/aspectRatio*(y2<y1?-1:1))));x2=M.round(x2)}function aspectRatioYX(){y2=M.max(top,M.min(top+imgHeight,y1+M.abs(x2-x1)/aspectRatio*(y2<y1?-1:1)));x2=M.round(M.max(left,M.min(left+imgWidth,x1+M.abs(y2-y1)*aspectRatio*(x2<x1?-1:1))));y2=M.round(y2)}function doResize(){if(options.minWidth&&M.abs(x2-x1)<options.minWidth){x2=x1-options.minWidth*(x2<x1?1:-1);if(x2<left)x1=left+options.minWidth;else if(x2>left+imgWidth)x1=left+imgWidth-options.minWidth}if(options.minHeight&&M.abs(y2-y1)<options.minHeight){y2=y1-options.minHeight*(y2<y1?1:-1);if(y2<top)y1=top+options.minHeight;else if(y2>top+imgHeight)y1=top+imgHeight-options.minHeight}x2=M.max(left,M.min(x2,left+imgWidth));y2=M.max(top,M.min(y2,top+imgHeight));if(aspectRatio)if(M.abs(x2-x1)/aspectRatio>M.abs(y2-y1))aspectRatioYX();else aspectRatioXY();if(options.maxWidth&&M.abs(x2-x1)>options.maxWidth){x2=x1-options.maxWidth*(x2<x1?1:-1);if(aspectRatio)aspectRatioYX()}if(options.maxHeight&&M.abs(y2-y1)>options.maxHeight){y2=y1-options.maxHeight*(y2<y1?1:-1);if(aspectRatio)aspectRatioXY()}selection={x1:selX(M.min(x1,x2)),x2:selX(M.max(x1,x2)),y1:selY(M.min(y1,y2)),y2:selY(M.max(y1,y2)),width:M.abs(x2-x1),height:M.abs(y2-y1)};update();options.onSelectChange(img,trueSelection())}function selectingMouseMove(event){x2=!resize.length||resize[H]||aspectRatio?evX(event):viewX(selection.x2);y2=!resize.length||resize[V]||aspectRatio?evY(event):viewY(selection.y2);doResize();return false}function doMove(newX1,newY1){x2=(x1=newX1)+selection.width;y2=(y1=newY1)+selection.height;selection=$.extend(selection,{x1:selX(x1),y1:selY(y1),x2:selX(x2),y2:selY(y2)});update();options.onSelectChange(img,trueSelection())}function movingMouseMove(event){x1=M.max(left,M.min(startX+evX(event),left+imgWidth-selection.width));y1=M.max(top,M.min(startY+evY(event),top+imgHeight-selection.height));doMove(x1,y1);event.preventDefault();return false}function startSelection(event){adjust();x2=x1;y2=y1;doResize();resize=[];$box.add($o.is(':visible')?null:$o).show();shown=true;$(document).unbind('mouseup',cancelSelection).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove);options.onSelectStart(img,trueSelection())}function cancelSelection(){$(document).unbind('mousemove',startSelection);$box.add($o).hide();selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};options.onSelectChange(img,selection);options.onSelectEnd(img,selection)}function imgMouseDown(event){if(event.which!=1)return false;adjust();startX=x1=evX(event);startY=y1=evY(event);$(document).one('mousemove',startSelection).one('mouseup',cancelSelection);return false}function parentScroll(){adjust();update(false);x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2)}function imgLoad(){imgLoaded=true;if(options.show){shown=true;adjust();update();$box.add($o).show()}$box.add($o).css({visibility:''})}var docKeyPress=function(event){var k=options.keys,d,t,key=event.keyCode||event.which;d=!isNaN(k.alt)&&(event.altKey||event.originalEvent.altKey)?k.alt:!isNaN(k.ctrl)&&event.ctrlKey?k.ctrl:!isNaN(k.shift)&&event.shiftKey?k.shift:!isNaN(k.arrows)?k.arrows:10;if(k.arrows=='resize'||(k.shift=='resize'&&event.shiftKey)||(k.ctrl=='resize'&&event.ctrlKey)||(k.alt=='resize'&&(event.altKey||event.originalEvent.altKey))){switch(key){case 37:d=-d;case 39:t=M.max(x1,x2);x1=M.min(x1,x2);x2=M.max(t+d,x1);if(aspectRatio)aspectRatioYX();break;case 38:d=-d;case 40:t=M.max(y1,y2);y1=M.min(y1,y2);y2=M.max(t+d,y1);if(aspectRatio)aspectRatioXY();break;default:return}doResize()}else{x1=M.min(x1,x2);y1=M.min(y1,y2);switch(key){case 37:doMove(M.max(x1-d,left),y1);break;case 38:doMove(x1,M.max(y1-d,top));break;case 39:doMove(x1+M.min(d,imgWidth-selX(x2)),y1);break;case 40:doMove(x1,y1+M.min(d,imgHeight-selY(y2)));break;default:return}}return false};this.setOptions=function(newOptions){if(newOptions.parent)($parent=$(newOptions.parent)).append($box.add($o));adjust();getZIndex();if(newOptions.x1!=null){selection={x1:newOptions.x1,y1:newOptions.y1,x2:newOptions.x2,y2:newOptions.y2};newOptions.show=!newOptions.hide;x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2);selection.width=x2-x1;selection.height=y2-y1}if(newOptions.handles!=null){$handles.remove();$handles=$(handles=[]);i=newOptions.handles?newOptions.handles=='corners'?4:8:0;while(i--)$handles=$handles.add(handles[i]=$('<div />'));handleWidth=4+options.borderWidth;$handles.css({position:'absolute',borderWidth:options.borderWidth+'px',borderStyle:'solid',borderColor:options.borderColor1,opacity:options.borderOpacity,backgroundColor:options.borderColor2,width:handleWidth+'px',height:handleWidth+'px',fontSize:'0px',zIndex:zIndex>0?zIndex+1:'1'}).addClass(options.classPrefix+'-handle');handleWidth+=options.borderWidth*2}update();options=$.extend(options,newOptions);if(options.imageWidth||options.imageHeight){scaleX=(parseInt(options.imageWidth)||imgWidth)/imgWidth;scaleY=(parseInt(options.imageHeight)||imgHeight)/imgHeight}if(newOptions.keys)options.keys=$.extend({shift:1,ctrl:'resize'},newOptions.keys===true?{}:newOptions.keys);$o.addClass(options.classPrefix+'-outer');$area.addClass(options.classPrefix+'-selection');$border1.addClass(options.classPrefix+'-border1');$border2.addClass(options.classPrefix+'-border2');$box.add($area).add($border1).add($border2).css({borderWidth:options.borderWidth+'px'});$area.css({backgroundColor:options.selectionColor,opacity:options.selectionOpacity});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$border1.add($border2).css({opacity:options.borderOpacity});$o.css({opacity:options.outerOpacity,backgroundColor:options.outerColor});$box.append($area.add($border1).add($border2).add($handles).add($areaOpera));if(newOptions.hide)$box.add($o).hide();else if(newOptions.show&&imgLoaded){shown=true;update();$box.add($o).show()}aspectRatio=options.aspectRatio&&(d=options.aspectRatio.split(/:/))?d[0]/d[1]:null;if(aspectRatio)if(options.minWidth)options.minHeight=parseInt(options.minWidth/aspectRatio);else if(options.minHeight)options.minWidth=parseInt(options.minHeight*aspectRatio);if(options.disable||options.enable===false){$box.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);$img.add($o).unbind('mousedown',imgMouseDown);$(window).unbind('resize',parentScroll);$img.add($img.parents()).unbind('scroll',parentScroll)}else if(options.enable||options.disable===false){if(options.resizable||options.movable)$box.mousemove(areaMouseMove).mousedown(areaMouseDown);if(!options.persistent)$img.add($o).mousedown(imgMouseDown);$(window).resize(parentScroll);$img.add($img.parents()).scroll(parentScroll)}options.enable=options.disable=undefined};if($.browser.msie)$img.attr('unselectable','on');$.imgAreaSelect.keyPress=$.browser.msie||$.browser.safari?'keydown':'keypress';if($.browser.opera)($areaOpera=$('<div style="width: 100%; height: 100%; position: absolute;" />')).css({zIndex:zIndex>0?zIndex+2:'2'});this.setOptions(options=$.extend({borderColor1:'#000',borderColor2:'#fff',borderWidth:1,borderOpacity:.5,classPrefix:'imgareaselect',movable:true,resizable:true,selectionColor:'#fff',selectionOpacity:0,outerColor:'#000',outerOpacity:.4,parent:'body',onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},options));$box.add($o).css({visibility:'hidden',position:position,overflow:'hidden',zIndex:zIndex>0?zIndex:'0'});$area.css({borderStyle:'solid'});$box.css({position:position,zIndex:zIndex>0?zIndex+2:'2'});$area.add($border1).add($border2).css({position:'absolute'});img.complete||img.readyState=='complete'||!$img.is('img')?imgLoad():$img.one('load',imgLoad)};$.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if($(this).data('imgAreaSelect'))$(this).data('imgAreaSelect').setOptions(options);else{if(options.enable===undefined&&options.disable===undefined)options.enable=true;$(this).data('imgAreaSelect',new $.imgAreaSelect.init(this,options))}});return this}})(jQuery);
(function($){var abs=Math.abs,max=Math.max,min=Math.min,round=Math.round;function div(){return $('<div/>')}$.imgAreaSelect=function(img,options){var $img=$(img),imgLoaded,$box=div(),$area=div(),$border=div().add(div()).add(div()).add(div()),$outer=div().add(div()).add(div()).add(div()),$handles=$([]),$areaOpera,left,top,imgOfs,imgWidth,imgHeight,$parent,parOfs,zIndex=0,position='absolute',startX,startY,scaleX,scaleY,resizeMargin=10,resize,minWidth,minHeight,maxWidth,maxHeight,aspectRatio,shown,x1,y1,x2,y2,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0},docElem=document.documentElement,$p,d,i,o,w,h,adjusted;function viewX(x){return x+imgOfs.left-parOfs.left}function viewY(y){return y+imgOfs.top-parOfs.top}function selX(x){return x-imgOfs.left+parOfs.left}function selY(y){return y-imgOfs.top+parOfs.top}function evX(event){return event.pageX-parOfs.left}function evY(event){return event.pageY-parOfs.top}function getSelection(noScale){var sx=noScale||scaleX,sy=noScale||scaleY;return{x1:round(selection.x1*sx),y1:round(selection.y1*sy),x2:round(selection.x2*sx),y2:round(selection.y2*sy),width:round(selection.x2*sx)-round(selection.x1*sx),height:round(selection.y2*sy)-round(selection.y1*sy)}}function setSelection(x1,y1,x2,y2,noScale){var sx=noScale||scaleX,sy=noScale||scaleY;selection={x1:round(x1/sx),y1:round(y1/sy),x2:round(x2/sx),y2:round(y2/sy)};selection.width=selection.x2-selection.x1;selection.height=selection.y2-selection.y1}function adjust(){if(!$img.width())return;imgOfs={left:round($img.offset().left),top:round($img.offset().top)};imgWidth=$img.width();imgHeight=$img.height();minWidth=options.minWidth||0;minHeight=options.minHeight||0;maxWidth=min(options.maxWidth||1<<24,imgWidth);maxHeight=min(options.maxHeight||1<<24,imgHeight);if($().jquery=='1.3.2'&&position=='fixed'&&!docElem['getBoundingClientRect']){imgOfs.top+=max(document.body.scrollTop,docElem.scrollTop);imgOfs.left+=max(document.body.scrollLeft,docElem.scrollLeft)}parOfs=$.inArray($parent.css('position'),['absolute','relative'])+1?{left:round($parent.offset().left)-$parent.scrollLeft(),top:round($parent.offset().top)-$parent.scrollTop()}:position=='fixed'?{left:$(document).scrollLeft(),top:$(document).scrollTop()}:{left:0,top:0};left=viewX(0);top=viewY(0);if(selection.x2>imgWidth||selection.y2>imgHeight)doResize()}function update(resetKeyPress){if(!shown)return;$box.css({left:viewX(selection.x1),top:viewY(selection.y1)}).add($area).width(w=selection.width).height(h=selection.height);$area.add($border).add($handles).css({left:0,top:0});$border.width(max(w-$border.outerWidth()+$border.innerWidth(),0)).height(max(h-$border.outerHeight()+$border.innerHeight(),0));$($outer[0]).css({left:left,top:top,width:selection.x1,height:imgHeight});$($outer[1]).css({left:left+selection.x1,top:top,width:w,height:selection.y1});$($outer[2]).css({left:left+selection.x2,top:top,width:imgWidth-selection.x2,height:imgHeight});$($outer[3]).css({left:left+selection.x1,top:top+selection.y2,width:w,height:imgHeight-selection.y2});w-=$handles.outerWidth();h-=$handles.outerHeight();switch($handles.length){case 8:$($handles[4]).css({left:w/2});$($handles[5]).css({left:w,top:h/2});$($handles[6]).css({left:w/2,top:h});$($handles[7]).css({top:h/2});case 4:$handles.slice(1,3).css({left:w});$handles.slice(2,4).css({top:h})}if(resetKeyPress!==false){if($.imgAreaSelect.keyPress!=docKeyPress)$(document).unbind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress);if(options.keys)$(document)[$.imgAreaSelect.keyPress]($.imgAreaSelect.onKeyPress=docKeyPress)}if($.browser.msie&&$border.outerWidth()-$border.innerWidth()==2){$border.css('margin',0);setTimeout(function(){$border.css('margin','auto')},0)}}function doUpdate(resetKeyPress){adjust();update(resetKeyPress);x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2)}function hide($elem,fn){options.fadeSpeed?$elem.fadeOut(options.fadeSpeed,fn):$elem.hide()}function areaMouseMove(event){var x=selX(evX(event))-selection.x1,y=selY(evY(event))-selection.y1;if(!adjusted){adjust();adjusted=true;$box.one('mouseout',function(){adjusted=false})}resize='';if(options.resizable){if(y<=resizeMargin)resize='n';else if(y>=selection.height-resizeMargin)resize='s';if(x<=resizeMargin)resize+='w';else if(x>=selection.width-resizeMargin)resize+='e'}$box.css('cursor',resize?resize+'-resize':options.movable?'move':'');if($areaOpera)$areaOpera.toggle()}function docMouseUp(event){$('body').css('cursor','');if(options.autoHide||selection.width*selection.height==0)hide($box.add($outer),function(){$(this).hide()});options.onSelectEnd(img,getSelection());$(document).unbind('mousemove',selectingMouseMove);$box.mousemove(areaMouseMove)}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(resize){$('body').css('cursor',resize+'-resize');x1=viewX(selection[/w/.test(resize)?'x2':'x1']);y1=viewY(selection[/n/.test(resize)?'y2':'y1']);$(document).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove)}else if(options.movable){startX=left+selection.x1-evX(event);startY=top+selection.y1-evY(event);$box.unbind('mousemove',areaMouseMove);$(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,getSelection());$(document).unbind('mousemove',movingMouseMove);$box.mousemove(areaMouseMove)})}else $img.mousedown(event);return false}function fixAspectRatio(xFirst){if(aspectRatio)if(xFirst){x2=max(left,min(left+imgWidth,x1+abs(y2-y1)*aspectRatio*(x2>x1||-1)));y2=round(max(top,min(top+imgHeight,y1+abs(x2-x1)/aspectRatio*(y2>y1||-1))));x2=round(x2)}else{y2=max(top,min(top+imgHeight,y1+abs(x2-x1)/aspectRatio*(y2>y1||-1)));x2=round(max(left,min(left+imgWidth,x1+abs(y2-y1)*aspectRatio*(x2>x1||-1))));y2=round(y2)}}function doResize(){x1=min(x1,left+imgWidth);y1=min(y1,top+imgHeight);if(abs(x2-x1)<minWidth){x2=x1-minWidth*(x2<x1||-1);if(x2<left)x1=left+minWidth;else if(x2>left+imgWidth)x1=left+imgWidth-minWidth}if(abs(y2-y1)<minHeight){y2=y1-minHeight*(y2<y1||-1);if(y2<top)y1=top+minHeight;else if(y2>top+imgHeight)y1=top+imgHeight-minHeight}x2=max(left,min(x2,left+imgWidth));y2=max(top,min(y2,top+imgHeight));fixAspectRatio(abs(x2-x1)<abs(y2-y1)*aspectRatio);if(abs(x2-x1)>maxWidth){x2=x1-maxWidth*(x2<x1||-1);fixAspectRatio()}if(abs(y2-y1)>maxHeight){y2=y1-maxHeight*(y2<y1||-1);fixAspectRatio(true)}selection={x1:selX(min(x1,x2)),x2:selX(max(x1,x2)),y1:selY(min(y1,y2)),y2:selY(max(y1,y2)),width:abs(x2-x1),height:abs(y2-y1)};update();options.onSelectChange(img,getSelection())}function selectingMouseMove(event){x2=resize==''||/w|e/.test(resize)||aspectRatio?evX(event):viewX(selection.x2);y2=resize==''||/n|s/.test(resize)||aspectRatio?evY(event):viewY(selection.y2);doResize();return false}function doMove(newX1,newY1){x2=(x1=newX1)+selection.width;y2=(y1=newY1)+selection.height;$.extend(selection,{x1:selX(x1),y1:selY(y1),x2:selX(x2),y2:selY(y2)});update();options.onSelectChange(img,getSelection())}function movingMouseMove(event){x1=max(left,min(startX+evX(event),left+imgWidth-selection.width));y1=max(top,min(startY+evY(event),top+imgHeight-selection.height));doMove(x1,y1);event.preventDefault();return false}function startSelection(){adjust();x2=x1;y2=y1;doResize();resize='';if($outer.is(':not(:visible)'))$box.add($outer).hide().fadeIn(options.fadeSpeed||0);shown=true;$(document).unbind('mouseup',cancelSelection).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove);options.onSelectStart(img,getSelection())}function cancelSelection(){$(document).unbind('mousemove',startSelection);hide($box.add($outer));selection={x1:selX(x1),y1:selY(y1),x2:selX(x1),y2:selY(y1),width:0,height:0};options.onSelectChange(img,getSelection());options.onSelectEnd(img,getSelection())}function imgMouseDown(event){if(event.which!=1||$outer.is(':animated'))return false;adjust();startX=x1=evX(event);startY=y1=evY(event);$(document).one('mousemove',startSelection).one('mouseup',cancelSelection);return false}function windowResize(){doUpdate(false)}function imgLoad(){imgLoaded=true;setOptions(options=$.extend({classPrefix:'imgareaselect',movable:true,resizable:true,parent:'body',onInit:function(){},onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},options));$box.add($outer).css({visibility:''});if(options.show){shown=true;adjust();update();$box.add($outer).hide().fadeIn(options.fadeSpeed||0)}setTimeout(function(){options.onInit(img,getSelection())},0)}var docKeyPress=function(event){var k=options.keys,d,t,key=event.keyCode;d=!isNaN(k.alt)&&(event.altKey||event.originalEvent.altKey)?k.alt:!isNaN(k.ctrl)&&event.ctrlKey?k.ctrl:!isNaN(k.shift)&&event.shiftKey?k.shift:!isNaN(k.arrows)?k.arrows:10;if(k.arrows=='resize'||(k.shift=='resize'&&event.shiftKey)||(k.ctrl=='resize'&&event.ctrlKey)||(k.alt=='resize'&&(event.altKey||event.originalEvent.altKey))){switch(key){case 37:d=-d;case 39:t=max(x1,x2);x1=min(x1,x2);x2=max(t+d,x1);fixAspectRatio();break;case 38:d=-d;case 40:t=max(y1,y2);y1=min(y1,y2);y2=max(t+d,y1);fixAspectRatio(true);break;default:return}doResize()}else{x1=min(x1,x2);y1=min(y1,y2);switch(key){case 37:doMove(max(x1-d,left),y1);break;case 38:doMove(x1,max(y1-d,top));break;case 39:doMove(x1+min(d,imgWidth-selX(x2)),y1);break;case 40:doMove(x1,y1+min(d,imgHeight-selY(y2)));break;default:return}}return false};function styleOptions($elem,props){for(option in props)if(options[option]!==undefined)$elem.css(props[option],options[option])}function setOptions(newOptions){if(newOptions.parent)($parent=$(newOptions.parent)).append($box.add($outer));$.extend(options,newOptions);adjust();if(newOptions.handles!=null){$handles.remove();$handles=$([]);i=newOptions.handles?newOptions.handles=='corners'?4:8:0;while(i--)$handles=$handles.add(div());$handles.addClass(options.classPrefix+'-handle').css({position:'absolute',fontSize:0,zIndex:zIndex+1||1});if(!parseInt($handles.css('width')))$handles.width(5).height(5);if(o=options.borderWidth)$handles.css({borderWidth:o,borderStyle:'solid'});styleOptions($handles,{borderColor1:'border-color',borderColor2:'background-color',borderOpacity:'opacity'})}scaleX=options.imageWidth/imgWidth||1;scaleY=options.imageHeight/imgHeight||1;if(newOptions.x1!=null){setSelection(newOptions.x1,newOptions.y1,newOptions.x2,newOptions.y2);newOptions.show=!newOptions.hide}if(newOptions.keys)options.keys=$.extend({shift:1,ctrl:'resize'},newOptions.keys);$outer.addClass(options.classPrefix+'-outer');$area.addClass(options.classPrefix+'-selection');for(i=0;i++<4;)$($border[i-1]).addClass(options.classPrefix+'-border'+i);styleOptions($area,{selectionColor:'background-color',selectionOpacity:'opacity'});styleOptions($border,{borderOpacity:'opacity',borderWidth:'border-width'});styleOptions($outer,{outerColor:'background-color',outerOpacity:'opacity'});if(o=options.borderColor1)$($border[0]).css({borderStyle:'solid',borderColor:o});if(o=options.borderColor2)$($border[1]).css({borderStyle:'dashed',borderColor:o});$box.append($area.add($border).add($handles).add($areaOpera));if($.browser.msie){if(o=$outer.css('filter').match(/opacity=([0-9]+)/))$outer.css('opacity',o[1]/100);if(o=$border.css('filter').match(/opacity=([0-9]+)/))$border.css('opacity',o[1]/100)}if(newOptions.hide)hide($box.add($outer));else if(newOptions.show&&imgLoaded){shown=true;$box.add($outer).fadeIn(options.fadeSpeed||0);doUpdate()}aspectRatio=(d=(options.aspectRatio||'').split(/:/))[0]/d[1];if(options.disable||options.enable===false){$box.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);$img.add($outer).unbind('mousedown',imgMouseDown);$(window).unbind('resize',windowResize)}else if(options.enable||options.disable===false){if(options.resizable||options.movable)$box.mousemove(areaMouseMove).mousedown(areaMouseDown);if(!options.persistent)$img.add($outer).mousedown(imgMouseDown);$(window).resize(windowResize)}options.enable=options.disable=undefined}this.remove=function(){$img.unbind('mousedown',imgMouseDown);$box.add($outer).remove()};this.getOptions=function(){return options};this.setOptions=setOptions;this.getSelection=getSelection;this.setSelection=setSelection;this.update=doUpdate;$p=$img;while($p.length){zIndex=max(zIndex,!isNaN($p.css('z-index'))?$p.css('z-index'):zIndex);if($p.css('position')=='fixed')position='fixed';$p=$p.parent(':not(body)')}zIndex=options.zIndex||zIndex;if($.browser.msie)$img.attr('unselectable','on');$.imgAreaSelect.keyPress=$.browser.msie||$.browser.safari?'keydown':'keypress';if($.browser.opera)$areaOpera=div().css({width:'100%',height:'100%',position:'absolute',zIndex:zIndex+2||2});$box.add($outer).css({visibility:'hidden',position:position,overflow:'hidden',zIndex:zIndex||'0'});$box.css({zIndex:zIndex+2||2});$area.add($border).css({position:'absolute',fontSize:0});img.complete||img.readyState=='complete'||!$img.is('img')?imgLoad():$img.one('load',imgLoad)};$.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if($(this).data('imgAreaSelect')){if(options.remove){$(this).data('imgAreaSelect').remove();$(this).removeData('imgAreaSelect')}else $(this).data('imgAreaSelect').setOptions(options)}else if(!options.remove){if(options.enable===undefined&&options.disable===undefined)options.enable=true;$(this).data('imgAreaSelect',new $.imgAreaSelect(this,options))}});if(options.instance)return $(this).data('imgAreaSelect');return this}})(jQuery);
(function($){$.imgAreaSelect={onKeyPress:null};$.imgAreaSelect.init=function(img,options){var $img=$(img),imgLoaded,$box=$('<div />'),$area=$('<div />'),$border1=$('<div />'),$border2=$('<div />'),$areaOpera,$outLeft=$('<div />'),$outTop=$('<div />'),$outRight=$('<div />'),$outBottom=$('<div />'),$handles=$([]),handleWidth,handles=[],left,top,M=Math,imgOfs,imgWidth,imgHeight,$parent,parOfs,zIndex=0,position='absolute',$p,startX,startY,scaleX=1,scaleY=1,resizeMargin=10,resize=[],V=0,H=1,d,aspectRatio,x1,x2,y1,y2,x,y,adjusted,shown,i,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};var $o=$outLeft.add($outTop).add($outRight).add($outBottom);function viewX(x){return x+imgOfs.left-parOfs.left}function viewY(y){return y+imgOfs.top-parOfs.top}function selX(x){return x-imgOfs.left+parOfs.left}function selY(y){return y-imgOfs.top+parOfs.top}function evX(event){return event.pageX-parOfs.left}function evY(event){return event.pageY-parOfs.top}function trueSelection(){return{x1:M.round(selection.x1*scaleX),y1:M.round(selection.y1*scaleY),x2:M.round(selection.x2*scaleX),y2:M.round(selection.y2*scaleY),width:M.round(selection.x2*scaleX)-M.round(selection.x1*scaleX),height:M.round(selection.y2*scaleY)-M.round(selection.y1*scaleY)}}function getZIndex(){$p=$img;while($p.length&&!$p.is('body')){if(!isNaN($p.css('z-index'))&&$p.css('z-index')>zIndex)zIndex=$p.css('z-index');if($p.css('position')=='fixed')position='fixed';$p=$p.parent()}if(!isNaN(options.zIndex))zIndex=options.zIndex}function adjust(){imgOfs={left:M.round($img.offset().left),top:M.round($img.offset().top)};imgWidth=$img.width();imgHeight=$img.height();if($().jquery=='1.3.2'&&$.browser.safari&&position=='fixed'){imgOfs.top+=M.max(document.documentElement.scrollTop,$('body').scrollTop());imgOfs.left+=M.max(document.documentElement.scrollLeft,$('body').scrollLeft())}parOfs=$.inArray($parent.css('position'),['absolute','relative'])!=-1?{left:M.round($parent.offset().left)-$parent.scrollLeft(),top:M.round($parent.offset().top)-$parent.scrollTop()}:position=='fixed'?{left:$(document).scrollLeft(),top:$(document).scrollTop()}:{left:0,top:0};left=viewX(0);top=viewY(0)}function update(resetKeyPress){if(!shown)return;$box.css({left:viewX(selection.x1)+'px',top:viewY(selection.y1)+'px',width:selection.width+'px',height:selection.height+'px'});$area.add($border1).add($border2).css({left:'0px',top:'0px',width:M.max(selection.width-options.borderWidth*2,0)+'px',height:M.max(selection.height-options.borderWidth*2,0)+'px'});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$border1.add($border2).css({opacity:options.borderOpacity});$outLeft.css({left:left+'px',top:top+'px',width:selection.x1+'px',height:imgHeight+'px'});$outTop.css({left:left+selection.x1+'px',top:top+'px',width:selection.width+'px',height:selection.y1+'px'});$outRight.css({left:left+selection.x2+'px',top:top+'px',width:imgWidth-selection.x2+'px',height:imgHeight+'px'});$outBottom.css({left:left+selection.x1+'px',top:top+selection.y2+'px',width:selection.width+'px',height:imgHeight-selection.y2+'px'});if(handles.length){handles[1].css({left:selection.width-handleWidth+'px'});handles[2].css({left:selection.width-handleWidth+'px',top:selection.height-handleWidth+'px'});handles[3].css({top:selection.height-handleWidth+'px'});if(handles.length==8){handles[4].css({left:(selection.width-handleWidth)/2+'px'});handles[5].css({left:selection.width-handleWidth+'px',top:(selection.height-handleWidth)/2+'px'});handles[6].css({left:(selection.width-handleWidth)/2+'px',top:selection.height-handleWidth+'px'});handles[7].css({top:(selection.height-handleWidth)/2+'px'})}}if(resetKeyPress!==false){if($.imgAreaSelect.keyPress!=docKeyPress)$(document).unbind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress);if(options.keys)$(document).bind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress=docKeyPress)}if($.browser.msie&&options.borderWidth==1&&options.borderOpacity<1){$border1.add($border2).css('margin','0');setTimeout(function(){$border1.add($border2).css('margin','auto')},0)}}function areaMouseMove(event){if(!adjusted){adjust();adjusted=true;$box.one('mouseout',function(){adjusted=false})}x=selX(evX(event))-selection.x1;y=selY(evY(event))-selection.y1;resize=[];if(options.resizable){if(y<=resizeMargin)resize[V]='n';else if(y>=selection.height-resizeMargin)resize[V]='s';if(x<=resizeMargin)resize[H]='w';else if(x>=selection.width-resizeMargin)resize[H]='e'}$box.css('cursor',resize.length?resize.join('')+'-resize':options.movable?'move':'');if($areaOpera)$areaOpera.toggle()}function docMouseUp(event){resize=[];$('body').css('cursor','');if(options.autoHide||selection.width*selection.height==0)$box.add($o).hide();options.onSelectEnd(img,trueSelection());$(document).unbind('mousemove',selectingMouseMove);$box.mousemove(areaMouseMove)}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(options.resizable&&resize.length>0){$('body').css('cursor',resize.join('')+'-resize');x1=viewX(selection[resize[H]=='w'?'x2':'x1']);y1=viewY(selection[resize[V]=='n'?'y2':'y1']);$(document).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove)}else if(options.movable){startX=left+selection.x1-evX(event);startY=top+selection.y1-evY(event);$box.unbind('mousemove',areaMouseMove);$(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,trueSelection());$(document).unbind('mousemove',movingMouseMove);$box.mousemove(areaMouseMove)})}else $img.mousedown(event);return false}function aspectRatioXY(){x2=M.max(left,M.min(left+imgWidth,x1+M.abs(y2-y1)*aspectRatio*(x2<x1?-1:1)));y2=M.round(M.max(top,M.min(top+imgHeight,y1+M.abs(x2-x1)/aspectRatio*(y2<y1?-1:1))));x2=M.round(x2)}function aspectRatioYX(){y2=M.max(top,M.min(top+imgHeight,y1+M.abs(x2-x1)/aspectRatio*(y2<y1?-1:1)));x2=M.round(M.max(left,M.min(left+imgWidth,x1+M.abs(y2-y1)*aspectRatio*(x2<x1?-1:1))));y2=M.round(y2)}function doResize(){if(options.minWidth&&M.abs(x2-x1)<options.minWidth){x2=x1-options.minWidth*(x2<x1?1:-1);if(x2<left)x1=left+options.minWidth;else if(x2>left+imgWidth)x1=left+imgWidth-options.minWidth}if(options.minHeight&&M.abs(y2-y1)<options.minHeight){y2=y1-options.minHeight*(y2<y1?1:-1);if(y2<top)y1=top+options.minHeight;else if(y2>top+imgHeight)y1=top+imgHeight-options.minHeight}x2=M.max(left,M.min(x2,left+imgWidth));y2=M.max(top,M.min(y2,top+imgHeight));if(aspectRatio)if(M.abs(x2-x1)/aspectRatio>M.abs(y2-y1))aspectRatioYX();else aspectRatioXY();if(options.maxWidth&&M.abs(x2-x1)>options.maxWidth){x2=x1-options.maxWidth*(x2<x1?1:-1);if(aspectRatio)aspectRatioYX()}if(options.maxHeight&&M.abs(y2-y1)>options.maxHeight){y2=y1-options.maxHeight*(y2<y1?1:-1);if(aspectRatio)aspectRatioXY()}selection={x1:selX(M.min(x1,x2)),x2:selX(M.max(x1,x2)),y1:selY(M.min(y1,y2)),y2:selY(M.max(y1,y2)),width:M.abs(x2-x1),height:M.abs(y2-y1)};update();options.onSelectChange(img,trueSelection())}function selectingMouseMove(event){x2=!resize.length||resize[H]||aspectRatio?evX(event):viewX(selection.x2);y2=!resize.length||resize[V]||aspectRatio?evY(event):viewY(selection.y2);doResize();return false}function doMove(newX1,newY1){x2=(x1=newX1)+selection.width;y2=(y1=newY1)+selection.height;selection=$.extend(selection,{x1:selX(x1),y1:selY(y1),x2:selX(x2),y2:selY(y2)});update();options.onSelectChange(img,trueSelection())}function movingMouseMove(event){x1=M.max(left,M.min(startX+evX(event),left+imgWidth-selection.width));y1=M.max(top,M.min(startY+evY(event),top+imgHeight-selection.height));doMove(x1,y1);event.preventDefault();return false}function startSelection(event){adjust();x2=x1;y2=y1;doResize();resize=[];$box.add($o.is(':visible')?null:$o).show();shown=true;$(document).unbind('mouseup',cancelSelection).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove);options.onSelectStart(img,trueSelection())}function cancelSelection(){$(document).unbind('mousemove',startSelection);$box.add($o).hide();selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};options.onSelectChange(img,selection);options.onSelectEnd(img,selection)}function imgMouseDown(event){if(event.which!=1)return false;adjust();startX=x1=evX(event);startY=y1=evY(event);$(document).one('mousemove',startSelection).one('mouseup',cancelSelection);return false}function parentScroll(){adjust();update(false);x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2)}function imgLoad(){imgLoaded=true;if(options.show){shown=true;adjust();update();$box.add($o).show()}$box.add($o).css({visibility:''})}var docKeyPress=function(event){var k=options.keys,d,t,key=event.keyCode||event.which;d=!isNaN(k.alt)&&(event.altKey||event.originalEvent.altKey)?k.alt:!isNaN(k.ctrl)&&event.ctrlKey?k.ctrl:!isNaN(k.shift)&&event.shiftKey?k.shift:!isNaN(k.arrows)?k.arrows:10;if(k.arrows=='resize'||(k.shift=='resize'&&event.shiftKey)||(k.ctrl=='resize'&&event.ctrlKey)||(k.alt=='resize'&&(event.altKey||event.originalEvent.altKey))){switch(key){case 37:d=-d;case 39:t=M.max(x1,x2);x1=M.min(x1,x2);x2=M.max(t+d,x1);if(aspectRatio)aspectRatioYX();break;case 38:d=-d;case 40:t=M.max(y1,y2);y1=M.min(y1,y2);y2=M.max(t+d,y1);if(aspectRatio)aspectRatioXY();break;default:return}doResize()}else{x1=M.min(x1,x2);y1=M.min(y1,y2);switch(key){case 37:doMove(M.max(x1-d,left),y1);break;case 38:doMove(x1,M.max(y1-d,top));break;case 39:doMove(x1+M.min(d,imgWidth-selX(x2)),y1);break;case 40:doMove(x1,y1+M.min(d,imgHeight-selY(y2)));break;default:return}}return false};this.setOptions=function(newOptions){if(newOptions.parent)($parent=$(newOptions.parent)).append($box.add($o));adjust();getZIndex();if(newOptions.x1!=null){selection={x1:newOptions.x1,y1:newOptions.y1,x2:newOptions.x2,y2:newOptions.y2};newOptions.show=!newOptions.hide;x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2);selection.width=x2-x1;selection.height=y2-y1}if(newOptions.handles!=null){$handles.remove();$handles=$(handles=[]);i=newOptions.handles?newOptions.handles=='corners'?4:8:0;while(i--)$handles=$handles.add(handles[i]=$('<div />'));handleWidth=4+options.borderWidth;$handles.css({position:'absolute',borderWidth:options.borderWidth+'px',borderStyle:'solid',borderColor:options.borderColor1,opacity:options.borderOpacity,backgroundColor:options.borderColor2,width:handleWidth+'px',height:handleWidth+'px',fontSize:'0px',zIndex:zIndex>0?zIndex+1:'1'}).addClass(options.classPrefix+'-handle');handleWidth+=options.borderWidth*2}update();options=$.extend(options,newOptions);if(options.imageWidth||options.imageHeight){scaleX=(parseInt(options.imageWidth)||imgWidth)/imgWidth;scaleY=(parseInt(options.imageHeight)||imgHeight)/imgHeight}if(newOptions.keys)options.keys=$.extend({shift:1,ctrl:'resize'},newOptions.keys===true?{}:newOptions.keys);$o.addClass(options.classPrefix+'-outer');$area.addClass(options.classPrefix+'-selection');$border1.addClass(options.classPrefix+'-border1');$border2.addClass(options.classPrefix+'-border2');$box.add($area).add($border1).add($border2).css({borderWidth:options.borderWidth+'px'});$area.css({backgroundColor:options.selectionColor,opacity:options.selectionOpacity});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$border1.add($border2).css({opacity:options.borderOpacity});$o.css({opacity:options.outerOpacity,backgroundColor:options.outerColor});$box.append($area.add($border1).add($border2).add($handles).add($areaOpera));if(newOptions.hide)$box.add($o).hide();else if(newOptions.show&&imgLoaded){shown=true;update();$box.add($o).show()}aspectRatio=options.aspectRatio&&(d=options.aspectRatio.split(/:/))?d[0]/d[1]:null;if(aspectRatio)if(options.minWidth)options.minHeight=parseInt(options.minWidth/aspectRatio);else if(options.minHeight)options.minWidth=parseInt(options.minHeight*aspectRatio);if(options.disable||options.enable===false){$box.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);$img.add($o).unbind('mousedown',imgMouseDown);$(window).unbind('resize',parentScroll);$img.add($img.parents()).unbind('scroll',parentScroll)}else if(options.enable||options.disable===false){if(options.resizable||options.movable)$box.mousemove(areaMouseMove).mousedown(areaMouseDown);if(!options.persistent)$img.add($o).mousedown(imgMouseDown);$(window).resize(parentScroll);$img.add($img.parents()).scroll(parentScroll)}options.enable=options.disable=undefined};if($.browser.msie)$img.attr('unselectable','on');$.imgAreaSelect.keyPress=$.browser.msie||$.browser.safari?'keydown':'keypress';if($.browser.opera)($areaOpera=$('<div style="width: 100%; height: 100%; position: absolute;" />')).css({zIndex:zIndex>0?zIndex+2:'2'});this.setOptions(options=$.extend({borderColor1:'#000',borderColor2:'#fff',borderWidth:1,borderOpacity:.5,classPrefix:'imgareaselect',movable:true,resizable:true,selectionColor:'#fff',selectionOpacity:0,outerColor:'#000',outerOpacity:.4,parent:'body',onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},options));$box.add($o).css({visibility:'hidden',position:position,overflow:'hidden',zIndex:zIndex>0?zIndex:'0'});$area.css({borderStyle:'solid'});$box.css({position:position,zIndex:zIndex>0?zIndex+2:'2'});$area.add($border1).add($border2).css({position:'absolute'});img.complete||img.readyState=='complete'||!$img.is('img')?imgLoad():$img.one('load',imgLoad)};$.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if($(this).data('imgAreaSelect'))$(this).data('imgAreaSelect').setOptions(options);else{if(options.enable===undefined&&options.disable===undefined)options.enable=true;$(this).data('imgAreaSelect',new $.imgAreaSelect.init(this,options))}});return this}})(jQuery);
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/4120b09b68ebe356eaf79e35f7e2d6ee441dee08/jquery.imgareaselect.js/buggy/js/jquery.imgareaselect.js
for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) {
for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) {
setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); }
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/controls.js/buggy/web/src/main/webapp/js/controls.js
var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) :
var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) :
setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); }
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/controls.js/buggy/web/src/main/webapp/js/controls.js
if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); }
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/controls.js/buggy/web/src/main/webapp/js/controls.js
} else if (entry.length >= instance.options.partialChars &&
} else if (entry.length >= instance.options.partialChars &&
setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); }
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/controls.js/buggy/web/src/main/webapp/js/controls.js
foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); }
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/controls.js/buggy/web/src/main/webapp/js/controls.js
ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
ret = ret.concat(partial.slice(0, instance.options.choices - ret.length));
setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); }
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/controls.js/buggy/web/src/main/webapp/js/controls.js
}, options || {});
}, options || { });
setOptions: function(options) { this.options = Object.extend({ choices: 10, partialSearch: true, partialChars: 2, ignoreCase: true, fullSearch: false, selector: function(instance) { var ret = []; // Beginning matches var partial = []; // Inside matches var entry = instance.getToken(); var count = 0; for (var i = 0; i < instance.options.array.length && ret.length < instance.options.choices ; i++) { var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + elem.substr(entry.length) + "</li>"); break; } else if (entry.length >= instance.options.partialChars && instance.options.partialSearch && foundPos != -1) { if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" + elem.substr(foundPos, entry.length) + "</strong>" + elem.substr( foundPos + entry.length) + "</li>"); break; } } foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : elem.indexOf(entry, foundPos + 1); } } if (partial.length) ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) return "<ul>" + ret.join('') + "</ul>"; } }, options || {}); }
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/controls.js/buggy/web/src/main/webapp/js/controls.js
(function(){var C="http:
var Xmla;(function(){var D="http:
(function(){var C="http://schemas.xmlsoap.org/soap/",d=C+"envelope/",g="SOAP-ENV",k="xmlns:"+g+'="'+d+'"',u=g+':encodingStyle="'+C+'encoding/"',i="urn:schemas-microsoft-com:",v=i+"xml-analysis",h='xmlns="'+v+'"',H="sql",j=i+"xml-sql",D="http://www.w3.org/2001/XMLSchema",c="xsd",E="http://www.w3.org/2001/XMLSchema-instance",G="xsi",b=v+":rowset",a=window.ActiveXObject?true:false;function f(J){var L;if(a){L=new ActiveXObject("MSXML2.XMLHTTP.3.0")}else{L=new XMLHttpRequest()}L.open("POST",J.url,J.async);var I=false;var K=function(){I=true;switch(L.readyState){case 0:J.aborted(L);break;case 4:if(L.status===200){J.complete(L)}else{J.error(Xmla.Exception._newError("HTTP_ERROR","_ajax",J))}break}};L.onreadystatechange=K;L.setRequestHeader("Content-Type","text/xml");L.send(J.data);if(!J.async&&!I){K.call(L)}return L}function s(I){return typeof(I)==="undefined"}function F(I){return typeof(I)==="function"}function y(I){return typeof(I)==="string"}function A(I){return typeof(I)==="number"}function w(I){return typeof(I)==="object"}function p(I){return I.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var n=function(K,J,L,I){if(F(K.getElementsByTagNameNS)){return K.getElementsByTagNameNS(J,I)}else{if(L){return K.getElementsByTagName(L+":"+I)}else{return K.getElementsByTagName(I)}}};var o=function(J,K,L,I){if(F(J.getAttributeNS)){return J.getAttributeNS(K,I)}else{if(L){return J.getAttribute(L+":"+I)}else{return J.getAttribute(I)}}};function t(I,O,M,K){if(!K){K=""}var J="\n"+K+"<"+I+">";if(M){var R;J+="\n"+K+" <"+O+">";for(var Q in M){if(M.hasOwnProperty(Q)){R=M[Q];J+="\n"+K+" <"+Q+">";if(typeof(R)==="array"){for(var P,L=0,N=R.length;L<N;L++){P=R[L];J+="<Value>"+p(P)+"</Value>"}}else{J+=p(R)}J+="</"+Q+">"}}J+="\n"+K+" </"+O+">"}J+="\n"+K+"</"+I+">";return J}var m="RequestType";function B(I){var K="";var L=I.method;K+="\n<"+g+":Envelope "+k+" "+u+">\n <"+g+":Body>\n <"+L+" "+h+" "+u+">";var J=null;switch(L){case Xmla.METHOD_DISCOVER:if(s(I.requestType)){J=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",I)}else{K+="\n <"+m+">"+I.requestType+"</"+m+">"+t("Restrictions","RestrictionList",I.restrictions," ")+t("Properties","PropertyList",I.properties," ")}break;case Xmla.METHOD_EXECUTE:if(s(I.statement)){J=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",I)}else{K+="\n <Command>\n <Statement>"+I.statement+"</Statement>\n </Command>"+t("Properties","PropertyList",I.properties," ")}break;default:}if(J!==null){J._throw()}K+="\n </"+L+">\n </"+g+":Body>\n</"+g+":Envelope>";return K}function x(J,K,I){if(K&&(!J)){J={}}for(var L in K){if(K.hasOwnProperty(L)){if(I||s(J[L])){J[L]=K[L]}}}return J}Xmla=function(I){this.listeners={};this.listeners[Xmla.EVENT_REQUEST]=[];this.listeners[Xmla.EVENT_SUCCESS]=[];this.listeners[Xmla.EVENT_ERROR]=[];this.listeners[Xmla.EVENT_DISCOVER]=[];this.listeners[Xmla.EVENT_DISCOVER_SUCCESS]=[];this.listeners[Xmla.EVENT_DISCOVER_ERROR]=[];this.listeners[Xmla.EVENT_EXECUTE]=[];this.listeners[Xmla.EVENT_EXECUTE_SUCCESS]=[];this.listeners[Xmla.EVENT_EXECUTE_ERROR]=[];this.options=x(x({},Xmla.defaultOptions,true),I,true);return this};Xmla.defaultOptions={requestTimeout:30000,async:false};Xmla.METHOD_DISCOVER="Discover";Xmla.METHOD_EXECUTE="Execute";var q="DISCOVER_";var l="MDSCHEMA_";var r="DBSCHEMA_";Xmla.DISCOVER_DATASOURCES=q+"DATASOURCES";Xmla.DISCOVER_PROPERTIES=q+"PROPERTIES";Xmla.DISCOVER_SCHEMA_ROWSETS=q+"SCHEMA_ROWSETS";Xmla.DISCOVER_ENUMERATORS=q+"ENUMERATORS";Xmla.DISCOVER_KEYWORDS=q+"KEYWORDS";Xmla.DISCOVER_LITERALS=q+"LITERALS";Xmla.DBSCHEMA_CATALOGS=r+"CATALOGS";Xmla.DBSCHEMA_COLUMNS=r+"COLUMNS";Xmla.DBSCHEMA_PROVIDER_TYPES=r+"PROVIDER_TYPES";Xmla.DBSCHEMA_SCHEMATA=r+"SCHEMATA";Xmla.DBSCHEMA_TABLES=r+"TABLES";Xmla.DBSCHEMA_TABLES_INFO=r+"TABLES_INFO";Xmla.MDSCHEMA_ACTIONS=l+"ACTIONS";Xmla.MDSCHEMA_CUBES=l+"CUBES";Xmla.MDSCHEMA_DIMENSIONS=l+"DIMENSIONS";Xmla.MDSCHEMA_FUNCTIONS=l+"FUNCTIONS";Xmla.MDSCHEMA_HIERARCHIES=l+"HIERARCHIES";Xmla.MDSCHEMA_LEVELS=l+"LEVELS";Xmla.MDSCHEMA_MEASURES=l+"MEASURES";Xmla.MDSCHEMA_MEMBERS=l+"MEMBERS";Xmla.MDSCHEMA_PROPERTIES=l+"PROPERTIES";Xmla.MDSCHEMA_SETS=l+"SETS";Xmla.EVENT_REQUEST="request";Xmla.EVENT_SUCCESS="success";Xmla.EVENT_ERROR="error";Xmla.EVENT_EXECUTE="execute";Xmla.EVENT_EXECUTE_SUCCESS="executesuccess";Xmla.EVENT_EXECUTE_ERROR="executeerror";Xmla.EVENT_DISCOVER="discover";Xmla.EVENT_DISCOVER_SUCCESS="discoversuccess";Xmla.EVENT_DISCOVER_ERROR="discovererror";Xmla.EVENT_GENERAL=[Xmla.EVENT_REQUEST,Xmla.EVENT_SUCCESS,Xmla.EVENT_ERROR];Xmla.EVENT_DISCOVER_ALL=[Xmla.EVENT_DISCOVER,Xmla.EVENT_DISCOVER_SUCCESS,Xmla.EVENT_DISCOVER_ERROR];Xmla.EVENT_EXECUTE_ALL=[Xmla.EVENT_EXECUTE,Xmla.EVENT_EXECUTE_SUCCESS,Xmla.EVENT_EXECUTE_ERROR];Xmla.EVENT_ALL=[].concat(Xmla.EVENT_GENERAL,Xmla.EVENT_DISCOVER_ALL,Xmla.EVENT_EXECUTE_ALL);Xmla.PROP_DATASOURCEINFO="DataSourceInfo";Xmla.PROP_CATALOG="Catalog";Xmla.PROP_CUBE="Cube";Xmla.PROP_FORMAT="Format";Xmla.PROP_FORMAT_TABULAR="Tabular";Xmla.PROP_FORMAT_MULTIDIMENSIONAL="Multidimensional";Xmla.PROP_AXISFORMAT="AxisFormat";Xmla.PROP_AXISFORMAT_TUPLE="TupleFormat";Xmla.PROP_AXISFORMAT_CLUSTER="ClusterFormat";Xmla.PROP_AXISFORMAT_CUSTOM="CustomFormat";Xmla.PROP_CONTENT="Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(I){x(this.options,I,true)},addListener:function(N){var L=N.events;if(s(L)){Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",N)._throw()}if(y(L)){if(L==="all"){L=Xmla.EVENT_ALL}else{L=L.split(",")}}if(!(L instanceof Array)){Xmla.Exception._newError("WRONG_EVENTS_FORMAT","Xmla.addListener",N)._throw()}var K=L.length;var I,M;for(var J=0;J<K;J++){I=L[J].replace(/\s+/g,"");M=this.listeners[I];if(!M){Xmla.Exception._newError("UNKNOWN_EVENT","Xmla.addListener",N)._throw()}if(F(N.handler)){if(!w(N.scope)){N.scope=window}M.push(N)}else{Xmla.Exception._newError("INVALID_EVENT_HANDLER","Xmla.addListener",N)._throw()}}},_fireEvent:function(N,Q,J){var O=this.listeners[N];if(!O){Xmla.Exception._newError("UNKNOWN_EVENT","Xmla._fireEvent",N)._throw()}var M=O.length;var I=true;if(M){var K,P;for(var L=0;L<M;L++){K=O[L];P=K.handler.call(K.scope,N,Q,this);if(J&&P===false){I=false;break}}}else{if(N==="error"){Q.exception._throw()}}return I},request:function(J){var K=this;if(this.response){this.response.close()}this.response=null;this.responseText=null;this.responseXml=null;J.url=s(J.url)?this.options.url:J.url;if(s(J.url)){ex=Xmla.Exception._newError("MISSING_URL","Xmla.request",J);ex._throw()}J.properties=x(J.properties,this.options.properties,false);J.restrictions=x(J.restrictions,this.options.restrictions,false);J.async=s(J.async)?this.options.async:J.async;J.requestTimeout=s(J.requestTimeout)?this.options.requestTimeout:J.requestTimeout;var L=B(J);this.soapMessage=L;var M;var I={async:J.async,timeout:J.requestTimeout,data:L,error:function(N){J.exception=exeception;K._requestError(J)},complete:function(N){J.xhr=N;K._requestSuccess(J)},url:J.url};if(J.username){I.username=J.username}if(J.password){I.password=J.password}if(this._fireEvent(Xmla.EVENT_REQUEST,J,true)&&((J.method==Xmla.METHOD_DISCOVER&&this._fireEvent(Xmla.EVENT_DISCOVER,J))||(J.method==Xmla.METHOD_EXECUTE&&this._fireEvent(Xmla.EVENT_EXECUTE,J)))){M=f(I)}return this.response},_requestError:function(I){this._fireEvent("error",I)},_requestSuccess:function(J){var N=J.xhr;this.responseXML=N.responseXML;this.responseText=N.responseText;var O=J.method;var I=n(this.responseXML,d,g,"Fault");if(I.length){I=I.item(0);J.exception=new Xmla.Exception(Xmla.Exception.TYPE_ERROR,I.getElementsByTagName("faultcode").item(0).childNodes.item(0).data,I.getElementsByTagName("faultstring").item(0).childNodes.item(0).data,null,"_requestSuccess",J);switch(O){case Xmla.METHOD_DISCOVER:this._fireEvent(Xmla.EVENT_DISCOVER_ERROR,J);break;case Xmla.METHOD_EXECUTE:this._fireEvent(Xmla.EVENT_EXECUTE_ERROR,J);break}this._fireEvent(Xmla.EVENT_ERROR,J)}else{switch(O){case Xmla.METHOD_DISCOVER:var M=new Xmla.Rowset(this.responseXML,J.requestType);J.rowset=M;this.response=M;this._fireEvent(Xmla.EVENT_DISCOVER_SUCCESS,J);break;case Xmla.METHOD_EXECUTE:var L;var K=J.properties[Xmla.PROP_FORMAT];switch(K){case Xmla.PROP_FORMAT_TABULAR:L=new Xmla.Rowset(this.responseXML);break;case Xmla.PROP_FORMAT_MULTIDIMENSIONAL:break}J.resultset=L;this.response=L;this._fireEvent(Xmla.EVENT_EXECUTE_SUCCESS,J);break}this._fireEvent(Xmla.EVENT_SUCCESS,J)}},execute:function(I){var J=I.properties;if(s(J)){J={};I.properties=J}if(s(J[Xmla.PROP_CONTENT])){J[Xmla.PROP_CONTENT]=Xmla.PROP_CONTENT_SCHEMADATA}if(s(J[Xmla.PROP_FORMAT])){I.properties[Xmla.PROP_FORMAT]=Xmla.PROP_FORMAT_MULTIDIMENSIONAL}var K=x(I,{method:Xmla.METHOD_EXECUTE},true);return this.request(K)},executeTabular:function(I){if(!I.properties){I.properties={}}I.properties[Xmla.PROP_FORMAT]=Xmla.PROP_FORMAT_TABULAR;return this.execute(I)},executeMultiDimensional:function(I){if(!I.properties){I.properties={}}I.properties[Xmla.PROP_FORMAT]=Xmla.PROP_FORMAT_MULTIDIMENSIONAL;return this.execute(I)},discover:function(I){var J=x(I,{method:Xmla.METHOD_DISCOVER},true);return this.request(J)},discoverDataSources:function(I){var J=x(I,{requestType:Xmla.DISCOVER_DATASOURCES},true);return this.discover(J)},discoverProperties:function(I){var J=x(I,{requestType:Xmla.DISCOVER_PROPERTIES},true);return this.discover(J)},discoverSchemaRowsets:function(I){var J=x(I,{requestType:Xmla.DISCOVER_SCHEMA_ROWSETS},true);return this.discover(J)},discoverEnumerators:function(I){var J=x(I,{requestType:Xmla.DISCOVER_ENUMERATORS},true);return this.discover(J)},discoverKeywords:function(I){var J=x(I,{requestType:Xmla.DISCOVER_KEYWORDS},true);return this.discover(J)},discoverLiterals:function(I){var J=x(I,{requestType:Xmla.DISCOVER_LITERALS},true);return this.discover(J)},discoverDBCatalogs:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_CATALOGS},true);return this.discover(J)},discoverDBColumns:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_COLUMNS},true);return this.discover(J)},discoverDBProviderTypes:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_PROVIDER_TYPES},true);return this.discover(J)},discoverDBSchemata:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_SCHEMATA},true);return this.discover(J)},discoverDBTables:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_TABLES},true);return this.discover(J)},discoverDBTablesInfo:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_TABLES_INFO},true);return this.discover(J)},discoverMDActions:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_ACTIONS},true);return this.discover(J)},discoverMDCubes:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_CUBES},true);return this.discover(J)},discoverMDDimensions:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_DIMENSIONS},true);return this.discover(J)},discoverMDFunctions:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_FUNCTIONS},true);return this.discover(J)},discoverMDHierarchies:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_HIERARCHIES},true);return this.discover(J)},discoverMDLevels:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_LEVELS},true);return this.discover(J)},discoverMDMeasures:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_MEASURES},true);return this.discover(J)},discoverMDMembers:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_MEMBERS},true);return this.discover(J)},discoverMDProperties:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_PROPERTIES},true);return this.discover(J)},discoverMDSets:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_SETS},true);return this.discover(J)}};function z(M){var J=n(M,D,c,"complexType"),L=J.length,K,I;for(I=0;I<L;I++){K=J.item(I);if(K.getAttribute("name")==="row"){return K}}return null}Xmla.Rowset=function(J,I){this._initData(J,I);return this};Xmla.Rowset.MD_DIMTYPE_UNKNOWN=0;Xmla.Rowset.MD_DIMTYPE_TIME=1;Xmla.Rowset.MD_DIMTYPE_MEASURE=2;Xmla.Rowset.MD_DIMTYPE_OTHER=3;Xmla.Rowset.MD_DIMTYPE_QUANTITATIVE=5;Xmla.Rowset.MD_DIMTYPE_ACCOUNTS=6;Xmla.Rowset.MD_DIMTYPE_CUSTOMERS=7;Xmla.Rowset.MD_DIMTYPE_PRODUCTS=8;Xmla.Rowset.MD_DIMTYPE_SCENARIO=9;Xmla.Rowset.MD_DIMTYPE_UTILIY=10;Xmla.Rowset.MD_DIMTYPE_CURRENCY=11;Xmla.Rowset.MD_DIMTYPE_RATES=12;Xmla.Rowset.MD_DIMTYPE_CHANNEL=13;Xmla.Rowset.MD_DIMTYPE_PROMOTION=14;Xmla.Rowset.MD_DIMTYPE_ORGANIZATION=15;Xmla.Rowset.MD_DIMTYPE_BILL_OF_MATERIALS=16;Xmla.Rowset.MD_DIMTYPE_GEOGRAPHY=17;Xmla.Rowset.KEYS={};Xmla.Rowset.KEYS[Xmla.DBSCHEMA_CATALOGS]=["CATALOG_NAME"];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_COLUMNS]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_PROVIDER_TYPES]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_SCHEMATA]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_TABLES]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_TABLES_INFO]=[];Xmla.Rowset.KEYS[Xmla.DISCOVER_DATASOURCES]=["DataSourceName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_ENUMERATORS]=["EnumName","ElementName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_KEYWORDS]=["Keyword"];Xmla.Rowset.KEYS[Xmla.DISCOVER_LITERALS]=["LiteralName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_PROPERTIES]=["PropertyName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_SCHEMA_ROWSETS]=["SchemaName"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_ACTIONS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_CUBES]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_DIMENSIONS]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME","DIMENSION_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_FUNCTIONS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_HIERARCHIES]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME","HIERARCHY_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_LEVELS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_MEASURES]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME","MEASURE_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_MEMBERS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_PROPERTIES]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_SETS]=[];Xmla.Rowset.prototype={_type:null,rows:null,numRows:null,fieldOrder:null,fields:null,_fieldCount:null,_initData:function(L,R){this._type=R;this.rows=n(L,b,null,"row");this.numRows=this.rows?this.rows.length:0;this.reset();this.fieldOrder=[];this.fields={};this._fieldCount=0;var Q=z(L);if(Q){var W=n(Q,D,c,"sequence").item(0),N=W.childNodes,P=N.length,U,I,V,S,M,T,J;for(var O=0;O<P;O++){U=N.item(O);if(U.nodeType!=1){continue}I=o(U,j,H,"field");V=U.getAttribute("name");T=U.getAttribute("type");if(T==null&&this.row){var K=this.row.getElementsByTagName(V);if(K.length){T=o(K.item(0),E,G,"type")}}if(!T&&R==Xmla.DISCOVER_SCHEMA_ROWSETS&&V=="Restrictions"){T="Restrictions"}S=U.getAttribute("minOccurs");M=U.getAttribute("maxOccurs");J=this._getValueConverter(T);this.fields[I]={name:V,label:I,index:this._fieldCount++,type:T,jsType:J.jsType,minOccurs:s(S)?1:S,maxOccurs:s(M)?1:(M==="unbounded"?Infinity:M),getter:this._createFieldGetter(V,J.func,S,M)};this.fieldOrder.push(I)}}else{Xmla.Exception._newError("ERROR_PARSING_RESPONSE","Xmla.Rowset",L)._throw()}},_boolConverter:function(I){return I==="true"?true:false},_intConverter:function(I){return parseInt(I,10)},_floatConverter:function(I){return parseFloat(I,10)},_textConverter:function(I){return I},_restrictionsConverter:function(I){return I},_arrayConverter:function(K,J){var I=[],M=K.length,N;for(var L=0;L<M;L++){N=K.item(L);I.push(J(this._elementText(N)))}return I},_elementText:function(J){if(J.innerText){return J.innerText}else{if(J.textContent){return J.textContent}else{var M="",L=J.childNodes,K=L.length;for(var I=0;I<K;I++){M+=L.item(I).data}return M}}},_getValueConverter:function(J){var I={};switch(J){case"xsd:boolean":I.func=this._boolConverter;I.jsType="boolean";break;case"xsd:decimal":case"xsd:double":case"xsd:float":I.func=this._floatConverter;I.jsType="number";break;case"xsd:int":case"xsd:integer":case"xsd:nonPositiveInteger":case"xsd:negativeInteger":case"xsd:nonNegativeInteger":case"xsd:positiveInteger":case"xsd:short":case"xsd:byte":case"xsd:long":case"xsd:unsignedLong":case"xsd:unsignedInt":case"xsd:unsignedShort":case"xsd:unsignedByte":I.func=this._intConverter;I.jsType="number";break;case"xsd:string":I.func=this._textConverter;I.jsType="string";break;case"Restrictions":I.func=this._restrictionsConverter;I.jsType="object";break;default:I.func=this._textConverter;I.jsType="object";break}return I},_createFieldGetter:function(N,J,M,K){if(M===null){M="1"}if(K===null){K="1"}var L=this;var I;if(K==="1"){if(M==="1"){I=function(){var O=n(this.row,b,null,N);return J(L._elementText(O.item(0)))}}else{if(M==="0"){I=function(){var O=n(this.row,b,null,N);if(!O.length){return null}else{return J(L._elementText(O.item(0)))}}}}}else{if(M==="1"){I=function(){var O=n(this.row,b,null,N);return L._arrayConverter(O,J)}}else{if(M==="0"){I=function(){var O=n(this.row,b,null,N);if(!O.length){return null}else{return L._arrayConverter(O,J)}}}}}return I},getType:function(){return this._type},getFields:function(){var L=[],K=this._fieldCount,I=this.fieldOrder;for(var J=0;J<K;J++){L[J]=this.fieldDef(I[J])}return L},getFieldNames:function(){var K=[];for(var I=0,J=this.fieldCount();I<J;I++){K[I]=this.fieldOrder[I]}return K},hasMoreRows:function(){return this.numRows>this.rowIndex},next:function(){this.row=this.rows.item(++this.rowIndex)},curr:function(){return this.rowIndex},rowCount:function(){return this.numRows},reset:function(){this.rowIndex=0;this.row=(this.hasMoreRows())?this.rows.item(this.rowIndex):null},fieldDef:function(I){var J=this.fields[I];if(s(J)){Xmla.Exception._newError("INVALID_FIELD","Xmla.Rowset.fieldDef",I)._throw()}return J},fieldIndex:function(I){var J=this.fieldDef(I);return J.index},fieldName:function(I){var J=this.fieldOrder[I];if(s(J)){Xmla.Exception._newError("INVALID_FIELD","Xmla.Rowset.fieldDef",I)._throw()}return J},fieldVal:function(I){if(A(I)){I=this.fieldName(I)}var J=this.fieldDef(I);return J.getter.call(this)},fieldCount:function(){return this._fieldCount},close:function(){this.row=null;this.rows=null},readAsArray:function(){var L=[],I=this.fields,K,J;for(K in I){if(I.hasOwnProperty(K)){J=I[K];L[J.index]=J.getter.call(this)}}return L},fetchAsArray:function(){var I;if(this.hasMoreRows()){I=this.readAsArray();this.next()}else{I=false}return I},readAsObject:function(){var J={},I=this.fields,L,K;for(L in I){if(I.hasOwnProperty(L)){K=I[L];J[L]=K.getter.call(this)}}return J},fetchAsObject:function(){var I;if(this.hasMoreRows()){I=this.readAsObject();this.next()}else{I=false}return I},fetchCustom:function(J){var I;if(this.hasMoreRows()){I=J.call(this);this.next()}else{I=false}return I},fetchAllAsArray:function(I){var J;if(!I){I=[]}while((J=this.fetchAsArray())){I.push(J)}return I},fetchAllAsObject:function(I){var J;if(!I){I=[]}while((J=this.fetchAsObject())){I.push(J)}return I},fetchAllCustom:function(J,I){var K;if(!J){J=[]}while((K=this.fetchCustom(I))){J.push(K)}return J},mapAsObject:function(I,Q,S){var N,R,J,K,L=I;for(var O=0,M=Q.length,P=M-1;O<M;O++){N=Q[O];R=S[N];J=L[R];if(J){if(O===P){if(J instanceof Array){J.push(S)}else{L[R]=[J,S]}}else{L=J}}else{if(O===P){L[R]=S}else{L=L[R]={}}}}},mapAllAsObject:function(I,J){if(!J){J={}}if(!I){I=this.getKey()}var K;while(K=this.fetchAsObject()){this.mapAsObject(J,I,K)}return J},getKey:function(){var I;if(this._type){I=Xmla.Rowset.KEYS[this._type]}else{I=this.getFieldNames()}return I}};Xmla.Exception=function(J,L,K,I,N,M){this.type=J;this.code=L;this.message=K;this.source=N;this.helpfile=I;this.data=M;return this};Xmla.Exception.TYPE_WARNING="warning";Xmla.Exception.TYPE_ERROR="error";var e="http://code.google.com/p/xmla4js/wiki/ExceptionCodes";Xmla.Exception.MISSING_REQUEST_TYPE_CDE=-1;Xmla.Exception.MISSING_REQUEST_TYPE_MSG="Missing_Request_Type";Xmla.Exception.MISSING_REQUEST_TYPE_HLP=e+"#"+Xmla.Exception.MISSING_REQUEST_TYPE_CDE+"_"+Xmla.Exception.MISSING_REQUEST_TYPE_MSG;Xmla.Exception.MISSING_STATEMENT_CDE=-2;Xmla.Exception.MISSING_STATEMENT_MSG="Missing_Statement";Xmla.Exception.MISSING_STATEMENT_HLP=e+"#"+Xmla.Exception.MISSING_STATEMENT_CDE+"_"+Xmla.Exception.MISSING_STATEMENT_MSG;Xmla.Exception.MISSING_URL_CDE=-3;Xmla.Exception.MISSING_URL_MSG="Missing_URL";Xmla.Exception.MISSING_URL_HLP=e+"#"+Xmla.Exception.MISSING_URL_CDE+"_"+Xmla.Exception.MISSING_URL_MSG;Xmla.Exception.NO_EVENTS_SPECIFIED_CDE=-4;Xmla.Exception.NO_EVENTS_SPECIFIED_MSG="No_Events_Specified";Xmla.Exception.NO_EVENTS_SPECIFIED_HLP=e+"#"+Xmla.Exception.NO_EVENTS_SPECIFIED_CDE+"_"+Xmla.Exception.NO_EVENTS_SPECIFIED_MSG;Xmla.Exception.WRONG_EVENTS_FORMAT_CDE=-5;Xmla.Exception.WRONG_EVENTS_FORMAT_MSG="Wrong_Events_Format";Xmla.Exception.WRONG_EVENTS_FORMAT_HLP=e+"#"+Xmla.Exception.NO_EVENTS_SPECIFIED_CDE+"_"+Xmla.Exception.NO_EVENTS_SPECIFIED_MSG;Xmla.Exception.UNKNOWN_EVENT_CDE=-6;Xmla.Exception.UNKNOWN_EVENT_MSG="Unknown_Event";Xmla.Exception.UNKNOWN_EVENT_HLP=e+"#"+Xmla.Exception.UNKNOWN_EVENT_CDE+"_"+Xmla.Exception.UNKNOWN_EVENT_MSG;Xmla.Exception.INVALID_EVENT_HANDLER_CDE=-7;Xmla.Exception.INVALID_EVENT_HANDLER_MSG="Invalid_Events_Handler";Xmla.Exception.INVALID_EVENT_HANDLER_HLP=e+"#"+Xmla.Exception.INVALID_EVENT_HANDLER_CDE+"_"+Xmla.Exception.INVALID_EVENT_HANDLER_MSG;Xmla.Exception.ERROR_PARSING_RESPONSE_CDE=-8;Xmla.Exception.ERROR_PARSING_RESPONSE_MSG="Error_Parsing_Response";Xmla.Exception.ERROR_PARSING_RESPONSE_HLP=e+"#"+Xmla.Exception.ERROR_PARSING_RESPONSE_CDE+"_"+Xmla.Exception.ERROR_PARSING_RESPONSE_MSG;Xmla.Exception.INVALID_FIELD_CDE=-9;Xmla.Exception.INVALID_FIELD_MSG="Invalid_Field";Xmla.Exception.INVALID_FIELD_HLP=e+"#"+Xmla.Exception.INVALID_FIELD_CDE+"_"+Xmla.Exception.INVALID_FIELD_MSG;Xmla.Exception.HTTP_ERROR_CDE=-10;Xmla.Exception.HTTP_ERROR_MSG="HTTP Error";Xmla.Exception.HTTP_ERROR_HLP=e+"#"+Xmla.Exception.INVALID_FIELD_CDE+"_"+Xmla.Exception.INVALID_FIELD_MSG;Xmla.Exception._newError=function(I,K,J){return new Xmla.Exception(Xmla.Exception.TYPE_ERROR,Xmla.Exception[I+"_CDE"],Xmla.Exception[I+"_MSG"],Xmla.Exception[I+"_HLP"],K,J)};Xmla.Exception.prototype={type:null,code:null,message:null,source:null,helpfile:null,data:null,_throw:function(){throw this}}}());
2393 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2393/e59723b41b1805477095d03df583d3f3111d6691/Xmla-min.js/clean/js/Xmla-min.js
"Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(a){h(this.options,a,true)},addListener:function(a){var b=a.events;j(b)&&Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",a)._throw();if(N(b))b=b==="all"?Xmla.EVENT_ALL:b.split(",");b instanceof Array||Xmla.Exception._newError("WRONG_EVENTS_FORMAT",
"CustomFormat";Xmla.PROP_CONTENT="Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(a){g(this.options,a,true)},addListener:function(a){var b=a.events;j(b)&&Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",a)._throw();if(N(b))b=b==="all"?Xmla.EVENT_ALL:b.split(",");b instanceof
"Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(a){h(this.options,a,true)},addListener:function(a){var b=a.events;j(b)&&Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",a)._throw();if(N(b))b=b==="all"?Xmla.EVENT_ALL:b.split(",");b instanceof Array||Xmla.Exception._newError("WRONG_EVENTS_FORMAT",
2393 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2393/e59723b41b1805477095d03df583d3f3111d6691/Xmla-compiled.js/buggy/js/Xmla-compiled.js
var requestHeaders = ['X-Requested-With', 'XMLHttpRequest', 'X-Prototype-Version', Prototype.Version, 'Accept', 'text/javascript, text/html, application/xml, text/xml, */*'];
var headers = { 'X-Requested-With': 'XMLHttpRequest', 'X-Prototype-Version': Prototype.Version, 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' };
setRequestHeaders: function() { var requestHeaders = ['X-Requested-With', 'XMLHttpRequest', 'X-Prototype-Version', Prototype.Version, 'Accept', 'text/javascript, text/html, application/xml, text/xml, */*']; if (this.options.method == 'post') { requestHeaders.push('Content-type', this.options.contentType); /* Force "Connection: close" for Mozilla browsers to work around * a bug where XMLHttpReqeuest sends an incorrect Content-length * header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType) requestHeaders.push('Connection', 'close'); } if (this.options.requestHeaders) requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); for (var i = 0; i < requestHeaders.length; i += 2) this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
if (this.options.method == 'post') { requestHeaders.push('Content-type', this.options.contentType);
if (this.method == 'post') { headers['Content-type'] = this.options.contentType + (this.options.encoding ? '; charset=' + this.options.encoding : '');
setRequestHeaders: function() { var requestHeaders = ['X-Requested-With', 'XMLHttpRequest', 'X-Prototype-Version', Prototype.Version, 'Accept', 'text/javascript, text/html, application/xml, text/xml, */*']; if (this.options.method == 'post') { requestHeaders.push('Content-type', this.options.contentType); /* Force "Connection: close" for Mozilla browsers to work around * a bug where XMLHttpReqeuest sends an incorrect Content-length * header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType) requestHeaders.push('Connection', 'close'); } if (this.options.requestHeaders) requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); for (var i = 0; i < requestHeaders.length; i += 2) this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
/* Force "Connection: close" for Mozilla browsers to work around * a bug where XMLHttpReqeuest sends an incorrect Content-length * header. See Mozilla Bugzilla #246651.
/* Force "Connection: close" for older Mozilla browsers to work * around a bug where XMLHttpRequest sends an incorrect * Content-length header. See Mozilla Bugzilla #246651.
setRequestHeaders: function() { var requestHeaders = ['X-Requested-With', 'XMLHttpRequest', 'X-Prototype-Version', Prototype.Version, 'Accept', 'text/javascript, text/html, application/xml, text/xml, */*']; if (this.options.method == 'post') { requestHeaders.push('Content-type', this.options.contentType); /* Force "Connection: close" for Mozilla browsers to work around * a bug where XMLHttpReqeuest sends an incorrect Content-length * header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType) requestHeaders.push('Connection', 'close'); } if (this.options.requestHeaders) requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); for (var i = 0; i < requestHeaders.length; i += 2) this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
if (this.transport.overrideMimeType) requestHeaders.push('Connection', 'close');
if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) headers['Connection'] = 'close';
setRequestHeaders: function() { var requestHeaders = ['X-Requested-With', 'XMLHttpRequest', 'X-Prototype-Version', Prototype.Version, 'Accept', 'text/javascript, text/html, application/xml, text/xml, */*']; if (this.options.method == 'post') { requestHeaders.push('Content-type', this.options.contentType); /* Force "Connection: close" for Mozilla browsers to work around * a bug where XMLHttpReqeuest sends an incorrect Content-length * header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType) requestHeaders.push('Connection', 'close'); } if (this.options.requestHeaders) requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); for (var i = 0; i < requestHeaders.length; i += 2) this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
if (this.options.requestHeaders) requestHeaders.push.apply(requestHeaders, this.options.requestHeaders);
if (typeof this.options.requestHeaders == 'object') { var extras = this.options.requestHeaders;
setRequestHeaders: function() { var requestHeaders = ['X-Requested-With', 'XMLHttpRequest', 'X-Prototype-Version', Prototype.Version, 'Accept', 'text/javascript, text/html, application/xml, text/xml, */*']; if (this.options.method == 'post') { requestHeaders.push('Content-type', this.options.contentType); /* Force "Connection: close" for Mozilla browsers to work around * a bug where XMLHttpReqeuest sends an incorrect Content-length * header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType) requestHeaders.push('Connection', 'close'); } if (this.options.requestHeaders) requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); for (var i = 0; i < requestHeaders.length; i += 2) this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
for (var i = 0; i < requestHeaders.length; i += 2) this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);
if (Object.isFunction(extras.push)) for (var i = 0, length = extras.length; i < length; i += 2) headers[extras[i]] = extras[i+1]; else $H(extras).each(function(pair) { headers[pair.key] = pair.value }); } for (var name in headers) this.transport.setRequestHeader(name, headers[name]);
setRequestHeaders: function() { var requestHeaders = ['X-Requested-With', 'XMLHttpRequest', 'X-Prototype-Version', Prototype.Version, 'Accept', 'text/javascript, text/html, application/xml, text/xml, */*']; if (this.options.method == 'post') { requestHeaders.push('Content-type', this.options.contentType); /* Force "Connection: close" for Mozilla browsers to work around * a bug where XMLHttpReqeuest sends an incorrect Content-length * header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType) requestHeaders.push('Connection', 'close'); } if (this.options.requestHeaders) requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); for (var i = 0; i < requestHeaders.length; i += 2) this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
setRequestHeaders: function() { var headers = { 'X-Requested-With': 'XMLHttpRequest', 'X-Prototype-Version': Prototype.Version, 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' }; if (this.method == 'post') { headers['Content-type'] = this.options.contentType + (this.options.encoding ? '; charset=' + this.options.encoding : ''); /* Force "Connection: close" for older Mozilla browsers to work * around a bug where XMLHttpRequest sends an incorrect * Content-length header. See Mozilla Bugzilla #246651. */ if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) headers['Connection'] = 'close'; } // user-defined headers if (typeof this.options.requestHeaders == 'object') { var extras = this.options.requestHeaders; if (Object.isFunction(extras.push)) for (var i = 0, length = extras.length; i < length; i += 2) headers[extras[i]] = extras[i+1]; else $H(extras).each(function(pair) { headers[pair.key] = pair.value }); } for (var name in headers) this.transport.setRequestHeader(name, headers[name]); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/buggy/web/src/main/webapp/js/prototype.js
setSelection : function(start, end)
this.setSelection = function(start, end)
setSelection : function(start, end) { //editAreaLoader.setSelectionRange('abc', pos, parseInt(pos)+1); $(this._id).setSelectionRange(start,end); $(this._id).focus(); },
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/application.js/buggy/application.js
},
};
setSelection : function(start, end) { //editAreaLoader.setSelectionRange('abc', pos, parseInt(pos)+1); $(this._id).setSelectionRange(start,end); $(this._id).focus(); },
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/application.js/buggy/application.js
if (!preventEvent)
if (!preventEvent && selectionIsSane())
function setSelection(ranges, preventEvent) { var axis, range, axes = plot.getAxes(); var o = plot.getOptions(); if (o.selection.mode == "y") { selection.first.x = 0; selection.second.x = plot.width(); } else { axis = ranges["xaxis"]? axes["xaxis"]: (ranges["x2axis"]? axes["x2axis"]: axes["xaxis"]); range = ranges["xaxis"] || ranges["x2axis"] || { from:ranges["x1"], to:ranges["x2"] } selection.first.x = axis.p2c(Math.min(range.from, range.to)); selection.second.x = axis.p2c(Math.max(range.from, range.to)); } if (o.selection.mode == "x") { selection.first.y = 0; selection.second.y = plot.height(); } else { axis = ranges["yaxis"]? axes["yaxis"]: (ranges["y2axis"]? axes["y2axis"]: axes["yaxis"]); range = ranges["yaxis"] || ranges["y2axis"] || { from:ranges["y1"], to:ranges["y2"] } selection.first.y = axis.p2c(Math.min(range.from, range.to)); selection.second.y = axis.p2c(Math.max(range.from, range.to)); } selection.show = true; plot.triggerRedrawOverlay(); if (!preventEvent) triggerSelectedEvent(); }
1484 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/1484/e131b7761813b80aba708293f368caed8cc337d6/jquery.flot.selection.js/clean/jquery.flot.selection.js
return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,e){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>k.length)e=k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character", e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^(-?\d+)(?:px)?$/i;this.px=function(a,b){a=x(a,b);if(a=="auto"||a==null)return 0;return(a=Z.exec(a))?a[1]:0};this.isHidden=function(a){if(a.style.display=="none")return true;
end:b.length+a}}else{e=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",e.length);b=a.text==""?e.length:e.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-e.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,e){var j=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b< 0)b=0;if(e>j.length)e=j.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||h.isIE?true:h.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==
return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,e){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>k.length)e=k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^(-?\d+)(?:px)?$/i;this.px=function(a,b){a=x(a,b);if(a=="auto"||a==null)return 0;return(a=Z.exec(a))?a[1]:0};this.isHidden=function(a){if(a.style.display=="none")return true;
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/3b5851a0b7bf3537f85cb0ca962bb299b0ff8b6f/Wt.min.js/clean/src/web/skeleton/Wt.min.js
"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!= "number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(typeof a.selectionStart!=="undefined"){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=
0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(typeof a.selectionStart!=="undefined"){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;
"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(typeof a.selectionStart!=="undefined"){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/ca3c6e1b6446cca6cde3b6ac8be698303e362058/Wt.min.js/buggy/src/web/skeleton/Wt.min.js
if (elem.selectionStart != undefined) {
if (typeof elem.selectionStart !== 'undefined') {
this.setSelectionRange = function(elem, start, end) { /** * @preserve Includes jQuery Caret Range plugin * Copyright (c) 2009 Matt Zabriskie * Released under the MIT and GPL licenses. */ var val = $(elem).val(); if (typeof start != "number") start = -1; if (typeof end != "number") end = -1; if (start < 0) start = 0; if (end > val.length) end = val.length; if (end < start) end = start; if (start > end) start = end; elem.focus(); if (elem.selectionStart != undefined) { elem.selectionStart = start; elem.selectionEnd = end; } else if (document.selection) { var range = elem.createTextRange(); range.collapse(true); range.moveStart("character", start); range.moveEnd("character", end - start); range.select(); }};
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/9764be5213b30962ec04b94ad969bd447eb5c10a/Wt.js/buggy/src/web/skeleton/Wt.js
end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b< 0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==
"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!= "number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(typeof a.selectionStart!=="undefined"){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=
end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/9764be5213b30962ec04b94ad969bd447eb5c10a/Wt.min.js/clean/src/web/skeleton/Wt.min.js
this.setSelectionRange=function(a,b,e){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>k.length)e=k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!==
this.setSelectionRange=function(a,b,e){var j=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>j.length)e=j.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!==
this.setSelectionRange=function(a,b,e){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>k.length)e=k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!==
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/39b9f5b40482b7e33a2708ec6d23efea2fa51ac4/Wt.min.js/clean/src/web/skeleton/Wt.min.js
k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var X=/^-?\d+(?:px)?$/i;
k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||h.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var X=/^-?\d+(?:px)?$/i;
function(a){var b,e;if(a.selectionStart!=undefined){b=a.selectionStart;e=a.selectionEnd}else if(document.selection){a=$(a).val();e=document.selection.createRange().duplicate();e.moveEnd("character",a.length);b=e.text==""?a.length:a.lastIndexOf(e.text);e=document.selection.createRange().duplicate();e.moveStart("character",-a.length);e=e.text.length}return{start:b,end:e}};this.setSelectionRange=function(a,b,e){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>k.length)e=k.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var X=/^-?\d+(?:px)?$/i;
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/65fe37986780ab872c458deb4869dc6cf286a0cf/Wt.min.js/buggy/src/web/skeleton/Wt.min.js
a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var h=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>h.length)f=h.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;
f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var h=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>h.length)f=h.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart= b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=
a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var h=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>h.length)f=h.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/f66c0eb2940a2bd1ae4228c285fecc8162d03bfb/Wt.min.js/buggy/src/web/skeleton/Wt.min.js
function(a){if(document.selection){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);f.setEndPoint("EndToEnd",b);a=f.text.length-b.text.length;return{start:a,end:a+b.text.length}}else return{start:a.selectionStart,end:a.selectionEnd}};this.setSelectionRange=function(a,b,f){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveEnd("character",f);a.moveStart("character",b);a.select()}else if(a.setSelectionRange){a.focus();a.setSelectionRange(b,f)}};this.isKeyPress=
y:f}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);f.setEndPoint("EndToEnd",b);a=f.text.length-b.text.length;return{start:a,end:a+b.text.length}}else return{start:a.selectionStart,end:a.selectionEnd}};this.setSelectionRange=function(a,b,f){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveEnd("character", f);a.moveStart("character",b);a.select()}else if(a.setSelectionRange){a.focus();a.setSelectionRange(b,f)}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||k.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var U=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=x(a,b);if(a=="auto"||a==null)return 0;return U.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display==
function(a){if(document.selection){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);f.setEndPoint("EndToEnd",b);a=f.text.length-b.text.length;return{start:a,end:a+b.text.length}}else return{start:a.selectionStart,end:a.selectionEnd}};this.setSelectionRange=function(a,b,f){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveEnd("character",f);a.moveStart("character",b);a.select()}else if(a.setSelectionRange){a.focus();a.setSelectionRange(b,f)}};this.isKeyPress=
5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/a369471cf3758972a67918133124dc8066bd63aa/Wt.min.js/buggy/src/web/skeleton/Wt.min.js
var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {};
var options = Object.extend(this.options(element), arguments[2] || { }); var nodeMap = { };
setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/dragdrop.js/buggy/web/src/main/webapp/js/dragdrop.js
setSequence: function(element, new_sequence) { element = $(element); var options = Object.extend(this.options(element), arguments[2] || {}); var nodeMap = {}; this.findElements(element, options).each( function(n) { if (n.id.match(options.format)) nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; n.parentNode.removeChild(n); }); new_sequence.each(function(ident) { var n = nodeMap[ident]; if (n) { n[1].appendChild(n[0]); delete nodeMap[ident]; } }); },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/dragdrop.js/buggy/web/src/main/webapp/js/dragdrop.js
if (cb.value) { DokuCookie.setValue('size',cb.value); media_manager.size = cb.value; for (var i = 1 ; i <= 4 ; ++i) {
var id = cb.id.substring(cb.id.length -1); if (id) { DokuCookie.setValue('size',id); media_manager.size = id; for (var i = 1 ; i <=4 ; ++i) {
setsize: function(event,cb){ if (cb.value) { DokuCookie.setValue('size',cb.value); media_manager.size = cb.value; for (var i = 1 ; i <= 4 ; ++i) { media_manager.outSet("media__sizebtn" + i); } media_manager.inSet("media__sizebtn"+cb.value); } else { DokuCookie.setValue('size',''); media_manager.width = false; } }
5490 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5490/ebb29737d32bc331541f78a1a47f33ba33919938/media.js/buggy/lib/scripts/media.js
media_manager.inSet("media__sizebtn"+cb.value);
media_manager.inSet("media__sizebtn"+id);
setsize: function(event,cb){ if (cb.value) { DokuCookie.setValue('size',cb.value); media_manager.size = cb.value; for (var i = 1 ; i <= 4 ; ++i) { media_manager.outSet("media__sizebtn" + i); } media_manager.inSet("media__sizebtn"+cb.value); } else { DokuCookie.setValue('size',''); media_manager.width = false; } }
5490 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5490/ebb29737d32bc331541f78a1a47f33ba33919938/media.js/buggy/lib/scripts/media.js
if(this.isVertical()) {
if (this.isVertical()) {
setSpan: function(span, range) { if(this.isVertical()) { span.style.top = this.translateToPx(range.start); span.style.height = this.translateToPx(range.end - range.start + this.range.start); } else { span.style.left = this.translateToPx(range.start); span.style.width = this.translateToPx(range.end - range.start + this.range.start); } },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/slider.js/buggy/web/src/main/webapp/js/slider.js
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex();v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex()+1;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex();v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex()+1;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex();v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex()+1;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex();v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])t=t.getParent(),u=t.getIndex()+1;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);
x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone();
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
if(this.icon){var u=(this.iconOffset||0)*-16;m.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+u+'px;"');}m.push('></span><span id="',o,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)m.push('<span class="cke_buttonarrow">'+(b.hc?'&#9660;':'')+'</span>');m.push('</a>','</span>');if(this.onRender)this.onRender();return t;},setState:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getById(this._.id);if(m){m.setState(l);l==0?m.setAttribute('aria-disabled',true):m.removeAttribute('aria-disabled');l==1?m.setAttribute('aria-pressed',true):m.removeAttribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(r,s){var t=r.document,u=t.getBody(),v=false,w=function(){v=true;};u.on(s,w);(b.version>7?t.$:t.$.selection.createRange()).execCommand(s);u.removeListener(s,w);return v;},m=c?function(r,s){return l(r,s);}:function(r,s){try{return r.document.$.execCommand(s);}catch(t){return false;}},n=function(r){this.type=r;this.canUndo=this.type=='cut';};n.prototype={exec:function(r,s){var t=m(r,this.type);if(!t)alert(r.lang.clipboard[this.type+'Error']);return t;}};var o={canUndo:false,exec:c?function(r){r.focus();if(!r.document.getBody().fire('beforepaste')&&!l(r,'paste')){r.fire('pasteDialog');return false;}}:function(r){try{if(!r.document.getBody().fire('beforepaste')&&!r.document.$.execCommand('Paste',false,null))throw 0;}catch(s){setTimeout(function(){r.fire('pasteDialog');},0);return false;}}},p=function(r){if(this.mode!='wysiwyg')return;switch(r.data.keyCode){case 1000+86:case 2000+45:var s=this.document.getBody();if(!c&&s.fire('beforepaste'))r.cancel();else if(b.opera||b.gecko&&b.version<10900)s.fire('paste');return;case 1000+88:case 2000+46:var t=this;this.fire('saveSnapshot');setTimeout(function(){t.fire('saveSnapshot');},0);}};function q(r,s,t){var u=this.document;if(c&&u.getById('cke_pastebin'))return;if(s=='text'&&r.data&&r.data.$.clipboardData){var v=r.data.$.clipboardData.getData('text/plain');if(v){r.data.preventDefault();t(v);return;}}var w=this.getSelection(),x=new d.range(u),y=new h(s=='text'?'textarea':'div',u);
},this);else if(q){q=l.getCommand(q);if(q){q.on('state',function(){this.setState(q.state);},this);p+='cke_'+(q.state==1?'on':q.state==0?'disabled':'off');}}if(!q)p+='cke_off';if(this.className)p+=' '+this.className;m.push('<span class="cke_button">','<a id="',o,'" class="',p,'"',n.gecko&&n.version>=10900&&!n.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+o+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(n.opera||n.gecko&&n.mac)m.push(' onkeypress="return false;"');if(n.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',s,', event);" onfocus="return CKEDITOR.ui.button._.focus(',s,', event);" onclick="CKEDITOR.tools.callFunction(',r,', this); return false;"><span class="cke_icon"');if(this.icon){var u=(this.iconOffset||0)*-16;m.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+u+'px;"');}m.push('>&nbsp;</span><span id="',o,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)m.push('<span class="cke_buttonarrow">'+(b.hc?'&#9660;':'&nbsp;')+'</span>');m.push('</a>','</span>');if(this.onRender)this.onRender();return t;},setState:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getById(this._.id);if(m){m.setState(l);l==0?m.setAttribute('aria-disabled',true):m.removeAttribute('aria-disabled');l==1?m.setAttribute('aria-pressed',true):m.removeAttribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};a.on('reset',function(){k.button._.instances=[];});(function(){var l=function(s,t){var u=s.document,v=u.getBody(),w=false,x=function(){w=true;};v.on(t,x);(b.version>7?u.$:u.$.selection.createRange()).execCommand(t);v.removeListener(t,x);return w;},m=c?function(s,t){return l(s,t);}:function(s,t){try{return s.document.$.execCommand(t);}catch(u){return false;}},n=function(s){this.type=s;this.canUndo=this.type=='cut';};n.prototype={exec:function(s,t){this.type=='cut'&&r(s);var u=m(s,this.type);if(!u)alert(s.lang.clipboard[this.type+'Error']);
if(this.icon){var u=(this.iconOffset||0)*-16;m.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+u+'px;"');}m.push('></span><span id="',o,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)m.push('<span class="cke_buttonarrow">'+(b.hc?'&#9660;':'')+'</span>');m.push('</a>','</span>');if(this.onRender)this.onRender();return t;},setState:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getById(this._.id);if(m){m.setState(l);l==0?m.setAttribute('aria-disabled',true):m.removeAttribute('aria-disabled');l==1?m.setAttribute('aria-pressed',true):m.removeAttribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(r,s){var t=r.document,u=t.getBody(),v=false,w=function(){v=true;};u.on(s,w);(b.version>7?t.$:t.$.selection.createRange()).execCommand(s);u.removeListener(s,w);return v;},m=c?function(r,s){return l(r,s);}:function(r,s){try{return r.document.$.execCommand(s);}catch(t){return false;}},n=function(r){this.type=r;this.canUndo=this.type=='cut';};n.prototype={exec:function(r,s){var t=m(r,this.type);if(!t)alert(r.lang.clipboard[this.type+'Error']);return t;}};var o={canUndo:false,exec:c?function(r){r.focus();if(!r.document.getBody().fire('beforepaste')&&!l(r,'paste')){r.fire('pasteDialog');return false;}}:function(r){try{if(!r.document.getBody().fire('beforepaste')&&!r.document.$.execCommand('Paste',false,null))throw 0;}catch(s){setTimeout(function(){r.fire('pasteDialog');},0);return false;}}},p=function(r){if(this.mode!='wysiwyg')return;switch(r.data.keyCode){case 1000+86:case 2000+45:var s=this.document.getBody();if(!c&&s.fire('beforepaste'))r.cancel();else if(b.opera||b.gecko&&b.version<10900)s.fire('paste');return;case 1000+88:case 2000+46:var t=this;this.fire('saveSnapshot');setTimeout(function(){t.fire('saveSnapshot');},0);}};function q(r,s,t){var u=this.document;if(c&&u.getById('cke_pastebin'))return;if(s=='text'&&r.data&&r.data.$.clipboardData){var v=r.data.$.clipboardData.getData('text/plain');if(v){r.data.preventDefault();t(v);return;}}var w=this.getSelection(),x=new d.range(u),y=new h(s=='text'?'textarea':'div',u);
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
setStyle: function(element, style) {
setStyle: function(element, styles) {
setStyle: function(element, style) { element = $(element); for (var name in style) element.style[name.camelize()] = style[name]; return element; },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
for (var name in style) element.style[name.camelize()] = style[name];
var elementStyle = element.style, match; if (Object.isString(styles)) { element.style.cssText += ';' + styles; return styles.include('opacity') ? element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; } for (var property in styles) if (property == 'opacity') element.setOpacity(styles[property]); else elementStyle[(property == 'float' || property == 'cssFloat') ? (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') : property] = styles[property];
setStyle: function(element, style) { element = $(element); for (var name in style) element.style[name.camelize()] = style[name]; return element; },
6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js
if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='_cke_expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);
},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);
if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='_cke_expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='_cke_expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]); return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||l<n-k)j.$.scrollTo(0,l);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;
},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);
if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='_cke_expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||l<n-k)j.$.scrollTo(0,l);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;
8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js
setTabs : function(tab) { var t = this; if ( 'current' == tab.className ) return false; t.I('div_advanced').style.display = ( 'tab_advanced' == tab.id ) ? 'block' : 'none'; t.I('div_basic').style.display = ( 'tab_basic' == tab.id ) ? 'block' : 'none'; t.I('tab_basic').className = t.I('tab_advanced').className = ''; tab.className = 'current'; return false; },
var tinymce=null,tinyMCEPopup,tinyMCE,wpImage;tinyMCEPopup={init:function(){var d=this,b,a,f,c,e;a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c<a.length;c++){e=a[c].split("=");f[unescape(e[0])]=unescape(e[1])}if(f.mce_rdomain){document.domain=f.mce_rdomain}b=d.getWin();tinymce=b.tinymce;tinyMCE=b.tinyMCE;d.editor=tinymce.EditorManager.activeEditor;d.params=d.editor.windowManager.params;d.dom=d.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);d.editor.windowManager.onOpen.dispatch(d.editor.windowManager,window)},getWin:function(){return window.dialogArguments||opener||parent||top},getParam:function(b,a){return this.editor.getParam(b,a)},close:function(){var a=this,b=a.getWin();function c(){b.tb_remove();tinymce=tinyMCE=a.editor=a.dom=a.dom.doc=null}if(tinymce.isOpera){b.setTimeout(c,0)}else{c()}},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark("simple")},restoreSelection:function(){var a=tinyMCEPopup;if(tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}}};tinyMCEPopup.init();wpImage={preInit:function(){var d=tinyMCEPopup.getWin(),c=d.document.styleSheets,a,b;for(b=0;b<c.length;b++){a=c.item(b).href;if(a&&a.indexOf("colors")!=-1){document.write('<link rel="stylesheet" href="'+a+'" type="text/css" media="all" />')}}},I:function(a){return document.getElementById(a)},current:"",link:"",link_rel:"",target_value:"",current_size_sel:"s100",width:"",height:"",align:"",img_alt:"",setTabs:function(b){var a=this;if("current"==b.className){return false}a.I("div_advanced").style.display=("tab_advanced"==b.id)?"block":"none";a.I("div_basic").style.display=("tab_basic"==b.id)?"block":"none";a.I("tab_basic").className=a.I("tab_advanced").className="";b.className="current";return false},img_seturl:function(b){var c=this,a=c.I("link_rel").value;if("current"==b){c.I("link_href").value=c.current;c.I("link_rel").value=c.link_rel}else{c.I("link_href").value=c.link;if(a){a=a.replace(/attachment|wp-att-[0-9]+/gi,"");c.I("link_rel").value=tinymce.trim(a)}}},imgAlignCls:function(b){var c=this,a=c.I("img_classes").value;c.I("img_demo").className=c.align=b;a=a.replace(/align[^ "']+/gi,"");a+=(" "+b);a=a.replace(/\s+/g," ").replace(/^\s/,"");if("aligncenter"==b){c.I("hspace").value="";c.updateStyle("hspace")}c.I("img_classes").value=a},showSize:function(e){var c=this,f=c.I("img_demo"),a=c.width,d=c.height,g=e.id||"s100",b;b=parseInt(g.substring(1))/200;f.width=Math.round(a*b);f.height=Math.round(d*b);c.showSizeClear();e.style.borderColor="#A3A3A3";e.style.backgroundColor="#E5E5E5"},showSizeSet:function(){var b=this,d,c,a;if((b.width*1.3)>parseInt(b.preloadImg.width)){d=b.I("s130"),c=b.I("s120"),a=b.I("s110");d.onclick=c.onclick=a.onclick=null;d.onmouseover=c.onmouseover=a.onmouseover=null;d.style.color=c.style.color=a.style.color="#aaa"}},showSizeRem:function(){var a=this,c=a.I("img_demo"),b=document.forms[0];c.width=Math.round(b.width.value*0.5);c.height=Math.round(b.height.value*0.5);a.showSizeClear();a.I(a.current_size_sel).style.borderColor="#A3A3A3";a.I(a.current_size_sel).style.backgroundColor="#E5E5E5";return false},showSizeClear:function(){var b=this.I("img_size").getElementsByTagName("div"),a;for(a=0;a<b.length;a++){b[a].style.borderColor="#f1f1f1";b[a].style.backgroundColor="#f1f1f1"}},imgEditSize:function(g){var d=this,i=document.forms[0],a,c,b,e,j;if(!d.preloadImg||!d.preloadImg.width||!d.preloadImg.height){return}a=parseInt(d.preloadImg.width),c=parseInt(d.preloadImg.height),b=d.width||a,e=d.height||c,j=g.id||"s100";size=parseInt(j.substring(1))/100;b=Math.round(b*size);e=Math.round(e*size);i.width.value=Math.min(a,b);i.height.value=Math.min(c,e);d.current_size_sel=j;d.demoSetSize()},demoSetSize:function(a){var c=this.I("img_demo"),b=document.forms[0];c.width=b.width.value?Math.round(b.width.value*0.5):"";c.height=b.height.value?Math.round(b.height.value*0.5):""},demoSetStyle:function(){var b=document.forms[0],a=this.I("img_demo"),c=tinyMCEPopup.editor.dom;if(a){c.setAttrib(a,"style",b.img_style.value);c.setStyle(a,"width","");c.setStyle(a,"height","")}},origSize:function(){var a=this,c=document.forms[0],b=a.I("s100");c.width.value=a.width=a.preloadImg.width;c.height.value=a.height=a.preloadImg.height;a.showSizeSet();a.demoSetSize();a.showSize(b)},init:function(){var a=tinyMCEPopup.editor,b;b=document.body.innerHTML;document.body.innerHTML=a.translate(b);window.setTimeout(function(){wpImage.setup()},500)},setup:function(){var p=this,k,b,l,e,i=document.forms[0],h=tinyMCEPopup.editor,j=p.I("img_demo"),g=tinyMCEPopup.dom,a,o="",n,m;document.dir=tinyMCEPopup.editor.getParam("directionality","");if(tinyMCEPopup.editor.getParam("wpeditimage_disable_captions",false)){p.I("cap_field").style.display="none"}tinyMCEPopup.restoreSelection();b=h.selection.getNode();if(b.nodeName!="IMG"){return}i.img_src.value=j.src=l=h.dom.getAttrib(b,"src");h.dom.setStyle(b,"float","");p.getImageData();k=h.dom.getAttrib(b,"class");if(a=g.getParent(b,"dl")){n=h.dom.getAttrib(a,"class");n=n.match(/align[^ "']+/i);if(n&&!g.hasClass(b,n)){k+=" "+n;tinymce.trim(k)}tinymce.each(a.childNodes,function(c){if(c.nodeName=="DD"&&g.hasClass(c,"wp-caption-dd")){o=c.innerHTML;return}})}i.img_cap.value=o;i.img_title.value=h.dom.getAttrib(b,"title");i.img_alt.value=h.dom.getAttrib(b,"alt");i.border.value=h.dom.getAttrib(b,"border");i.vspace.value=h.dom.getAttrib(b,"vspace");i.hspace.value=h.dom.getAttrib(b,"hspace");i.align.value=h.dom.getAttrib(b,"align");i.width.value=p.width=h.dom.getAttrib(b,"width");i.height.value=p.height=h.dom.getAttrib(b,"height");i.img_classes.value=k;i.img_style.value=h.dom.getAttrib(b,"style");if(g.getAttrib(b,"hspace")){p.updateStyle("hspace")}if(g.getAttrib(b,"border")){p.updateStyle("border")}if(g.getAttrib(b,"vspace")){p.updateStyle("vspace")}if(m=h.dom.getParent(b,"A")){i.link_href.value=p.current=h.dom.getAttrib(m,"href");i.link_title.value=h.dom.getAttrib(m,"title");i.link_rel.value=p.link_rel=h.dom.getAttrib(m,"rel");i.link_style.value=h.dom.getAttrib(m,"style");p.target_value=h.dom.getAttrib(m,"target");i.link_classes.value=h.dom.getAttrib(m,"class")}i.link_target.checked=(p.target_value&&p.target_value=="_blank")?"checked":"";e=l.substring(l.lastIndexOf("/"));e=e.replace(/-[0-9]{2,4}x[0-9]{2,4}/,"");p.link=l.substring(0,l.lastIndexOf("/"))+e;if(k.indexOf("alignleft")!=-1){p.I("alignleft").checked="checked";j.className=p.align="alignleft"}else{if(k.indexOf("aligncenter")!=-1){p.I("aligncenter").checked="checked";j.className=p.align="aligncenter"}else{if(k.indexOf("alignright")!=-1){p.I("alignright").checked="checked";j.className=p.align="alignright"}else{if(k.indexOf("alignnone")!=-1){p.I("alignnone").checked="checked";j.className=p.align="alignnone"}}}}if(p.width&&p.preloadImg.width){p.showSizeSet()}document.body.style.display=""},remove:function(){var a=tinyMCEPopup.editor,c,b;tinyMCEPopup.restoreSelection();b=a.selection.getNode();if(b.nodeName!="IMG"){return}if((c=a.dom.getParent(b,"div"))&&a.dom.hasClass(c,"mceTemp")){a.dom.remove(c)}else{if((c=a.dom.getParent(b,"A"))&&c.childNodes.length==1){a.dom.remove(c)}else{a.dom.remove(b)}}a.execCommand("mceRepaint");tinyMCEPopup.close();return},update:function(){var m=this,v=document.forms[0],g=tinyMCEPopup.editor,e,x,d=null,n,h,p,r,o=null,k=v.img_classes.value,l,q,u="",j,i,s,a,z,w="",c,y;tinyMCEPopup.restoreSelection();e=g.selection.getNode();if(e.nodeName!="IMG"){return}if(v.img_src.value===""){m.remove();return}if(v.img_cap.value!=""&&v.width.value!=""){o=1;k=k.replace(/align[^ "']+\s?/gi,"")}p=g.dom.getParent(e,"a");h=g.dom.getParent(e,"p");n=g.dom.getParent(e,"dl");r=g.dom.getParent(e,"div");tinyMCEPopup.execCommand("mceBeginUndoLevel");g.dom.setAttribs(e,{src:v.img_src.value,title:v.img_title.value,alt:v.img_alt.value,width:v.width.value,height:v.height.value,style:v.img_style.value,"class":k});if(v.link_href.value){if(p==null){if(!v.link_href.value.match(/https?:\/\
setTabs : function(tab) { var t = this; if ( 'current' == tab.className ) return false; t.I('div_advanced').style.display = ( 'tab_advanced' == tab.id ) ? 'block' : 'none'; t.I('div_basic').style.display = ( 'tab_basic' == tab.id ) ? 'block' : 'none'; t.I('tab_basic').className = t.I('tab_advanced').className = ''; tab.className = 'current'; return false; },
10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/61365a44c046fe2812bdbc16cc6993b6a4ed8684/editimage.js/buggy/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
return { type: 'immediate', tempo: tempo };
return {type: 'immediate', tempo: tempo};
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/b469218ea3fed3fd3b63e64dfa8a3d3cd05c473d/abc_parse_header.js/clean/abc_parse_header.js
return { type: delaySet?'delaySet':'immediate', tempo: tempo };
return {type: delaySet?'delaySet':'immediate', tempo: tempo};
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/b469218ea3fed3fd3b63e64dfa8a3d3cd05c473d/abc_parse_header.js/clean/abc_parse_header.js
return { type: 'none' };
return {type: 'none'};
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/b469218ea3fed3fd3b63e64dfa8a3d3cd05c473d/abc_parse_header.js/clean/abc_parse_header.js
try { var tokens = tokenizer.tokenize(line, start, end);
try { var tokens = tokenizer.tokenize(line, start, end);
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
if (tokens.length === 0) throw "Missing parameter in Q: field";
if (tokens.length === 0) throw "Missing parameter in Q: field";
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token;
var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { if (tokens.length === 0) throw "Missing tempo after = in Q: field";
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
if (tokens.length === 0) { return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { if (tokens.length === 0) throw "Missing tempo after C in Q: field";
if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field";
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
if (token.type === 'punct' && token.token === '=') { if (tokens.length === 0) throw "Missing tempo after = in Q: field";
if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { tempo.duration = [1]; tempo.bpm = num; } else { delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') {
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { tempo.duration = [1]; tempo.bpm = num; } else { delaySet = false;
if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token);
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
var den = parseInt(token.token); tempo.duration = [num/den]; while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token);
den = parseInt(token.token); tempo.duration.push(num/den);
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
} else throw "Unknown value in Q: field"; if (tokens.length !== 0) {
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field";
if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token);
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' };
} else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field";
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
};
return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return { type: 'immediate', tempo: tempo }; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return { type: delaySet?'delaySet':'immediate', tempo: tempo }; } catch (msg) { warn(msg, line, start); return { type: 'none' }; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/f5a9f7ef8d556b3359fab3994dac1ddd87440bb3/abc_parse_header.js/buggy/abc_parse_header.js
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return {type: 'immediate', tempo: tempo}; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return {type: delaySet?'delaySet':'immediate', tempo: tempo}; } catch (msg) { warn(msg, line, start); return {type: 'none'}; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/706ad45e1d9619967cf93f65b4152aeb06f9c5a0/abc_parse_header.js/clean/abc_parse_header.js
this.setTempo = function(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; var tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo return {type: 'immediate', tempo: tempo}; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.duration = [1]; tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 tempo.duration = [1]; tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } return {type: delaySet?'delaySet':'immediate', tempo: tempo}; } catch (msg) { warn(msg, line, start); return {type: 'none'}; } };
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/706ad45e1d9619967cf93f65b4152aeb06f9c5a0/abc_parse_header.js/clean/abc_parse_header.js
multilineVars.tempo = {};
var tempo = {};
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.preString = token.token;
tempo.preString = token.token;
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return;
return { type: 'immediate', tempo: tempo };
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token);
tempo.duration = [1]; tempo.bpm = parseInt(token.token);
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.duration = [parseInt(token.token)];
tempo.duration = [parseInt(token.token)];
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.bpm = parseInt(token.token);
tempo.bpm = parseInt(token.token);
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num;
tempo.duration = [1]; tempo.bpm = num;
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.duration = [num/den];
tempo.duration = [num/den];
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.duration.push(num/den);
tempo.duration.push(num/den);
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.bpm = parseInt(token.token);
tempo.bpm = parseInt(token.token);
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
multilineVars.tempo.postString = token.token;
tempo.postString = token.token;
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; }
return { type: delaySet?'delaySet':'immediate', tempo: tempo };
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
return { type: 'none' };
function setTempo(line, start, end) { //Q - tempo; can be used to specify the notes per minute, e.g. if //the default note length is an eighth note then Q:120 or Q:C=120 //is 120 eighth notes per minute. Similarly Q:C3=40 would be 40 //dotted quarter notes per minute. An absolute tempo may also be //set, e.g. Q:1/8=120 is also 120 eighth notes per minute, //irrespective of the default note length. // // This is either a number, "C=number", "Cnumber=number", or fraction [fraction...]=number // It depends on the L: field, which may either not be present, or may appear after this. // If L: is not present, an eighth note is used. // That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an L: field. // So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars. // The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1. // In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional. try { var tokens = tokenizer.tokenize(line, start, end); if (tokens.length === 0) throw "Missing parameter in Q: field"; multilineVars.tempo = {}; var delaySet = true; var token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.preString = token.token; token = tokens.shift(); if (tokens.length === 0) { // It's ok to just get a string for the tempo tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; return; } } if (token.type === 'alpha' && token.token === 'C') { // either type 2 or type 3 if (tokens.length === 0) throw "Missing tempo after C in Q: field"; token = tokens.shift(); if (token.type === 'punct' && token.token === '=') { // This is a type 2 format. The duration is an implied 1 if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = parseInt(token.token); } else if (token.type === 'number') { // This is a type 3 format. multilineVars.tempo.duration = [parseInt(token.token)]; if (tokens.length === 0) throw "Missing = after duration in Q: field"; token = tokens.shift(); if (token.type !== 'punct' || token.token !== '=') throw "Expected = after duration in Q: field"; if (tokens.length === 0) throw "Missing tempo after = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected number after = in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } else throw "Expected number or equal after C in Q: field"; } else if (token.type === 'number') { // either type 1 or type 4 var num = parseInt(token.token); if (tokens.length === 0 || tokens[0].type === 'quote') { // This is type 1 multilineVars.tempo.duration = [1]; multilineVars.tempo.bpm = num; } else { // This is type 4 delaySet = false; token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; var den = parseInt(token.token); multilineVars.tempo.duration = [num/den]; // We got the first fraction, keep getting more as long as we find them. while (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') { token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; num = parseInt(token.token); token = tokens.shift(); if (token.type !== 'punct' && token.token !== '/') throw "Expected fraction in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected fraction in Q: field"; den = parseInt(token.token); multilineVars.tempo.duration.push(num/den); } token = tokens.shift(); if (token.type !== 'punct' && token.token !== '=') throw "Expected = in Q: field"; token = tokens.shift(); if (token.type !== 'number') throw "Expected tempo in Q: field"; multilineVars.tempo.bpm = parseInt(token.token); } } else throw "Unknown value in Q: field"; if (tokens.length !== 0) { token = tokens.shift(); if (token.type === 'quote') { multilineVars.tempo.postString = token.token; token = tokens.shift(); } if (tokens.length !== 0) throw "Unexpected string at end of Q: field"; } if (!delaySet) { tune.metaText.tempo = multilineVars.tempo; delete multilineVars.tempo; } } catch (msg) { warn(msg, line, start); } }
2684 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2684/05b2dde631d4eb1677f46195c6c62184e7d629aa/abc_parse.js/clean/abc_parse.js
setter: function (opts) { const self = this; let classes = [v[1] for ([k, v] in Iterator(this.opts)) if (opts.indexOf(k) < 0)]; let css = classes.length ? classes.join(",") + "{ display: none; }" : ""; styles.addSheet(true, "taboptions", "chrome: tabs.tabsBound = Array.some(opts, function (k) k in self.opts); statusline.updateTabCount();
setter: function (value) { options.safeSetPref("accessibility.typeaheadfind.enablesound", !value, "See 'visualbell' option"); return value;
setter: function (opts) { const self = this; let classes = [v[1] for ([k, v] in Iterator(this.opts)) if (opts.indexOf(k) < 0)]; let css = classes.length ? classes.join(",") + "{ display: none; }" : ""; styles.addSheet(true, "taboptions", "chrome://*", css); tabs.tabsBound = Array.some(opts, function (k) k in self.opts); statusline.updateTabCount(); }
8883 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8883/5c13a4aee6d76c48021ae5803eaac42a16d50fce/liberator.js/buggy/common/content/liberator.js
setter: function(value) {
setter: function (value) {
setter: function(value) { if (value) services.get("debugger").on(); else services.get("debugger").off(); },
8883 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8883/b6e5ab83487742b894ff68fbc8153452988623b1/javascript.js/buggy/common/content/javascript.js