rem: for (var i=0; i<arrayOfDirectories.length; i++) 
add: for (var i = 0; i < prefCount.value; i++) 
context: function nsLDAPPrefsService() {  var arrayOfDirectories = null;  var j = 0;  try {    gPrefInt = Components.classes["@mozilla.org/preferences;1"];    gPrefInt = gPrefInt.getService(nsIPref);  }  catch (ex) {    dump("failed to get prefs service!\n");    return;  }  /* generate the list of directory servers from preferences */  var children = gPrefInt.CreateChildList("ldap_2.servers");  if(children) {    arrayOfDirectories = children.split(';');    this.availDirectories = new Array();    var position;    var description;    for (var i=0; i<arrayOfDirectories.length; i++)    {      if ((arrayOfDirectories[i] != "ldap_2.servers.pab") &&         (arrayOfDirectories[i] != "ldap_2.servers.history")) {        try{          position = gPrefInt.GetIntPref(arrayOfDirectories[i]+".position");        }        catch(ex){          position = 1;        }        try{          dirType = gPrefInt.GetIntPref(arrayOfDirectories[i]+".dirType");        }        catch(ex){          dirType = 1;        }        if ((position != 0) && (dirType == 1)) {          try{            description = gPrefInt.CopyUnicharPref(arrayOfDirectories[i]+".description");          }          catch(ex){            description = null;          }          if (description) {            this.availDirectories[j] = new Array(2);            this.availDirectories[j][0] = arrayOfDirectories[i];            this.availDirectories[j][1] = description;            j++;          }        }      }    }  }  this.migrate();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/faf03ce445712b372523f881cc3144cfadc7a611/nsLDAPPrefsService.js/buggy/mailnews/addrbook/src/nsLDAPPrefsService.js