rem: for (var i = 0; i < count; i++) 
add: for (var i = 0; i < count; ++i) 
context: function deleteJunkInFolder(){  MsgJunkMailInfo(true);  var view = GetDBView();  // need to expand all threads, so we find everything  view.doCommand(nsMsgViewCommandType.expandAll);  var treeView = view.QueryInterface(Components.interfaces.nsITreeView);  var count = treeView.rowCount;  if (!count)    return;  var treeSelection = treeView.selection;  var clearedSelection = false;    // select the junk messages  for (var i = 0; i < count; i++)   {    var messageUri = view.getURIForViewIndex(i);    var msgHdr = messenger.msgHdrFromURI(messageUri);    var junkScore = msgHdr.getStringProperty("junkscore");     var isJunk = ((junkScore != "") && (junkScore != "0"));    // if the message is junk, select it.    if (isJunk)     {      // only do this once      if (!clearedSelection)      {        // clear the current selection        // since we will be deleting all selected messages        treeSelection.clearSelection();        clearedSelection = true;        treeSelection.selectEventsSuppressed = true;      }      treeSelection.rangedSelect(i, i, true /* augment */);    }  }  // if we didn't clear the selection  // there was no junk, so bail.  if (!clearedSelection)    return;  treeSelection.selectEventsSuppressed = false;  // delete the selected messages  //  // XXX todo  // should we try to set next message after delete   // to the message selected before we did all this, if it was not junk?  SetNextMessageAfterDelete();    view.doCommand(nsMsgViewCommandType.deleteMsg);  treeSelection.clearSelection();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e870274c1fab3343b4266c8a864a953f337b6402/mailCommands.js/buggy/mailnews/base/resources/content/mailCommands.js