rem: var selection; 
add:  var selectedRes = gFilterTree.currentIndex >= 0 ? gFilterTree.builderView.getResourceAtIndex(gFilterTree.currentIndex) : null; 
context: function refreshFilterList() {    if (!gFilterTree)       return;    var selection;    var selectedItems = gFilterTree.selectedItems;    if (selectedItems && selectedItems.length >0)        selection = gFilterTree.selectedItems[0].id;    gFilterTree.clearSelection();    gFilterTree.setAttribute("ref", gFilterTree.getAttribute("ref"));    if (selection) {        var newItem = document.getElementById(selection);        // sometimes the selected element is gone.        if (newItem) {            gFilterTree.selectItem(newItem);            gFilterTree.ensureElementIsVisible(newItem);        }    }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/FilterListDialog.js/buggy/mailnews/base/search/resources/content/FilterListDialog.js