add:  try { if (!nsPrefBranch) { var prefService = Components.classes["@mozilla.org/preferences-service;1"]; prefService = prefService.getService(); prefService = prefService.QueryInterface(Components.interfaces.nsIPrefService);  nsPrefBranch = prefService.getBranch(null); } } catch (ex) { dump("error getting pref service. "+ex+"\n"); } 
context: function OnInit(){    var title        = null;    var titleElement = null;    var brandName    = null;    var acctType     = null;    var acctName     = null;    var brandBundle;    var messengerBundle;    // Set the header for the page.    // Title containts the brand name of the application and the account    // type (mail/news) and the name of the account    try {        // Get title element from the document        titleElement = document.getElementById("AccountCentralTitle");        // Get the brand name        brandBundle = document.getElementById("bundle_brand");        brandName    = brandBundle.getString("brandShortName");         // Get the account type        messengerBundle = document.getElementById("bundle_messenger");        selectedServer = GetSelectedServer();         var serverType = selectedServer.type;         if (serverType == "nntp")            acctType = messengerBundle.getString("newsAcctType");        else            acctType = messengerBundle.getString("mailAcctType");        // Get the account name        var msgFolder = GetSelectedMsgFolder();        acctName = msgFolder.prettyName;        title = messengerBundle.getFormattedString("acctCentralTitleFormat",                                                   [brandName,                                                    acctType,                                                    acctName]);        titleElement.setAttribute("value", title);        // Display and collapse items presented to the user based on account type        var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + serverType];        protocolInfo = protocolInfo.getService(Components.interfaces.nsIMsgProtocolInfo);        ArrangeAccountCentralItems(selectedServer, protocolInfo, msgFolder);    }    catch(ex) {        dump("Error -> " + ex + "\n");    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/4908a3ccdc3d63b456643d07405cd5bdb98600be/msgAccountCentral.js/buggy/mailnews/base/resources/content/msgAccountCentral.js