rem: var olddivs = root.innerHTML.substring(divstart,root.innerHTML.length); rootstr = root.innerHTML.substring(0,divstart); 
add: var olddivs = rooty.innerHTML.substring(divstart,rooty.innerHTML.length); rootstr = rooty.innerHTML.substring(0,divstart); 
context: function intense_annot(root,selections,rtids) {  selecObj = new Array;  rootObj = new Array;  var rootstr = '';  var rootid = root.id;  var divstart = root.innerHTML.indexOf('<div');  var DIVstart = root.innerHTML.indexOf('<DIV');  divstart = (DIVstart > divstart) ? DIVstart : divstart;  if (divstart == -1) {    rootSer = getXMLNodeSerialisation(root,'noattr');    var divstartSer = rootSer.indexOf('<div');    rootstr = root.innerHTML;  }  if (divstart > -1) {    var olddivs = root.innerHTML.substring(divstart,root.innerHTML.length);    rootstr = root.innerHTML.substring(0,divstart);  }  else if (divstartSer > -1) {    var olddivs = rootSer.substring(divstartSer,rootSer.length);    rootstr = rootSer.substring(0,divstart);  }  // couple lines of html-ignoring help from  // http://www.notestips.com/80256B3A007F2692/1/NAMO5RNV2S   // by Mike Golding, 9/24/2003  //Extract HTML Tags  var regexp=/<[^<>]*>/ig;  var rootHTMLArray = rootstr.match(regexp);  //Replace HTML tags (may not work in Safari)  rootStrippedHTML = rootstr.replace(regexp,"$!$");    var root_words = rootStrippedHTML.split(/[\s$!]+/);    // there is one rootObj, each word in the root sentence a sub-obj  for (var i=0; i<root_words.length; i++) {    rootObj[i] = new Object;    rootObj[i].word = root_words[i];    rootObj[i].intensity = 0;    rootObj[i].annotations = new Array;  }    // each selecObj[n] refers to a single selection, and then has a .words[] array  // that holds each word in the selection.  for (var i=0; i<selections.length; i++) {    selecObj[i] = new Object;    selecObj[i].selection = selections[i];    selecObj[i].words = new Array(selections[i].split(/[\s$!]+/));    selecObj[i].rtid = rtids[i];    // this initializes a handy "matchindex" attribute that tells you     // which array index of rootObj has the first char of the match    // (so you can skip the irrelevant indices that precede it)    intense_doRoughMatch(selections,selecObj,root_words,i);  }  intense_incrWords(selecObj,rootObj);  returnstring = intense_genReturn(rootObj,rootHTMLArray);  if (olddivs) {    returnstring += olddivs;  }  loadHTMLtoDiv(returnstring,rootid);}
meta: 891	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/891/d81801bea5a832c839d00f7eb346766a61b5d1ee/stet-intense-shorter.js/buggy/stet-intense-shorter.js