rem: var listname = mailList.dirName; listname = listname.toLowerCase(); oldListName = oldListName.toLowerCase(); 
add: var canonicalNewListName = listname.toLowerCase(); var canonicalOldListName = oldListName.toLowerCase(); 
context: function GetListValue(mailList, doAdd){  mailList.dirName = document.getElementById('ListName').value;  if (mailList.dirName.length == 0)  {    var alertText = gAddressBookBundle.getString("emptyListName");    alert(alertText);    return false;  }  else  {    var listname = mailList.dirName;    listname = listname.toLowerCase();    oldListName = oldListName.toLowerCase();    if (doAdd)    {      if (mailingListExists(listname))        return false;    }    else if (oldListName != listname)    {      if (mailingListExists(listname))        return false;    }  }  mailList.listNickName = document.getElementById('ListNickName').value;  mailList.description = document.getElementById('ListDescription').value;  var oldTotal = mailList.addressLists.Count();  var i = 1;  var pos = 0;  var inputField, fieldValue, cardproperty;  while ((inputField = awGetInputElement(i)))  {    fieldValue = inputField.value;        if (doAdd || (!doAdd && pos >= oldTotal))      cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance();    else      cardproperty = mailList.addressLists.GetElementAt(pos);    if (fieldValue == "")    {      if (!doAdd && cardproperty)      try      {        mailList.addressLists.DeleteElementAt(pos);      }      catch(ex)      {        // Ignore attempting to remove an item        // at a position greater than the number        // of elements in the addressLists attribute      }    }    else if (cardproperty)    {      cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard);      if (cardproperty)      {        var addresses = {};        var names = {};        var fullNames = {};        var numAddresses = gHeaderParser.parseHeadersWithArray(fieldValue, addresses, names, fullNames);        cardproperty.primaryEmail = addresses.value[0];        cardproperty.displayName = names.value[0];        if (doAdd || (doAdd == false && pos >= oldTotal))          mailList.addressLists.AppendElement(cardproperty);        pos++;      }    }    i++;  }  --i;    if (doAdd == false && i < oldTotal)  {    for (var j = i; j < oldTotal; j++)      mailList.addressLists.DeleteElementAt(j);  }  return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/f34413b495d6b7aa748735fc772ce806071f49a5/abMailListDialog.js/buggy/mailnews/addrbook/resources/content/abMailListDialog.js