rem: var indexOfNewItem = aNewParentIndex + newParentItem.children.length;; 
add: var indexOfNewItem = aNewParentIndex + newParentItem.children.length; 
context:   moveFeed: function(aOldFeedIndex, aNewParentIndex)  {    // if the new parent is the same as the current parent, then do nothing    if (this.mView.getParentIndex(aOldFeedIndex) == aNewParentIndex)      return;    var currentItem = this.mView.getItemAtIndex(aOldFeedIndex);    var currentParentItem = this.mView.getItemAtIndex(this.mView.getParentIndex(aOldFeedIndex));    var currentParentResource = rdf.GetResource(currentParentItem.url);    var newParentItem = this.mView.getItemAtIndex(aNewParentIndex);    var newParentResource = rdf.GetResource(newParentItem.url);    var ds = getSubscriptionsDS(this.mRSSServer);    var resource = rdf.GetResource(currentItem.url);    var currentFolder = currentParentResource.QueryInterface(Components.interfaces.nsIMsgFolder);    // unassert the older URI, add an assertion for the new parent URI...    ds.Change(resource, FZ_DESTFOLDER, currentParentResource, newParentResource);    // we need to update the feed url attributes on the databases for each folder    updateFolderFeedUrl(currentParentResource.QueryInterface(Components.interfaces.nsIMsgFolder),                         currentItem.url, true); // remove our feed url property from the current folder    updateFolderFeedUrl(newParentResource.QueryInterface(Components.interfaces.nsIMsgFolder),                         currentItem.url, false);       // add our feed url property to the new folder    // Finally, update our view layer    this.mView.removeItemAtIndex(aOldFeedIndex, 1);    if (aNewParentIndex > aOldFeedIndex)      aNewParentIndex--;        currentItem.level = newParentItem.level + 1;    newParentItem.children.push(currentItem);    var indexOfNewItem = aNewParentIndex + newParentItem.children.length;;    if (!newParentItem.open) // force open the container      this.mView.toggleOpenState(aNewParentIndex);    else    {      this.mFeedContainers.splice(indexOfNewItem, 0, currentItem);      this.mView.mRowCount++;      this.mTree.treeBoxObject.rowCountChanged(indexOfNewItem, 1);    }    gFeedSubscriptionsWindow.mTree.view.selection.select(indexOfNewItem)  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/0b159dccf5293e9add5a79f33e3e6e3fe3498469/feed-subscriptions.js/clean/mail/extensions/newsblog/content/feed-subscriptions.js