rem:  if((!bMatchContains && (sKeyIndex === 0)) ||  (bMatchContains && (sKeyIndex > -1))) {  aResults.unshift(aDataset); 
add: if(aData[i]) { if(aData[i].constructor == String) { aDataset[0] = aData[i]; } else if(aData[i].constructor == Array) { aDataset = aData[i]; } }  if(aDataset[0] && (aDataset[0].constructor == String)) { var sKeyIndex = (this.queryMatchCase) ? encodeURIComponent(aDataset[0]).indexOf(sQuery): encodeURIComponent(aDataset[0]).toLowerCase().indexOf(sQuery);   if((!bMatchContains && (sKeyIndex === 0)) ||  (bMatchContains && (sKeyIndex > -1))) {  aResults.unshift(aDataset); } 
context: YAHOO.widget.DS_JSArray.prototype.doQuery = function(oCallbackFn, sQuery, oParent) {    var aData = this.data; // the array    var aResults = []; // container for results    var bMatchFound = false;    var bMatchContains = this.queryMatchContains;    if(!this.queryMatchCase) {        sQuery = sQuery.toLowerCase();    }    // Loop through each element of the array...    // which can be a string or an array of strings    for(var i = aData.length-1; i >= 0; i--) {        var aDataset = [];        if(aData[i]) {            if(aData[i].constructor == String) {                aDataset[0] = aData[i];            }            else if(aData[i].constructor == Array) {                aDataset = aData[i];            }        }        if(aDataset[0] && (aDataset[0].constructor == String)) {            var sKeyIndex = (this.queryMatchCase) ?            encodeURIComponent(aDataset[0]).indexOf(sQuery):            encodeURIComponent(aDataset[0]).toLowerCase().indexOf(sQuery);            // A STARTSWITH match is when the query is found at the beginning of the key string...            if((!bMatchContains && (sKeyIndex === 0)) ||            // A CONTAINS match is when the query is found anywhere within the key string...            (bMatchContains && (sKeyIndex > -1))) {                // Stash a match into aResults[].                aResults.unshift(aDataset);            }        }    }    this.getResultsEvent.fire(this, oParent, sQuery, aResults);    oCallbackFn(sQuery, aResults, oParent);};
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/autocomplete-debug.js/buggy/www/resources/yui/autocomplete/autocomplete-debug.js