rem:  if (optionalHint.search(tempID.email.slice(start, tempID.email.length).toLowerCase()) >= 0) { 
add: if (optionalHint.search(tempID.email.slice(start).toLowerCase()) >= 0) { 
context: function getBestIdentity(identities, optionalHint){  var identity = null;  try  {    // if we have more than one identity and a hint to help us pick one    if (identities.Count() > 1 && optionalHint) {      // normalize case on the optional hint to improve our chances of finding a match      optionalHint = optionalHint.toLowerCase();      // iterate over all of the identities      var tempID;      for (id = 0; id < identities.Count(); id++) {         tempID = identities.GetElementAt(id).QueryInterface(Components.interfaces.nsIMsgIdentity);        if (optionalHint.indexOf(tempID.email.toLowerCase()) >= 0) {          identity = tempID;          break;        }      }      // if we could not find an exact email address match within the hint fields then maybe the message      // was to a mailing list. In this scenario, we won't have a match based on email address.       // Before we just give up, try and search for just a shared domain between the the hint and       // the email addresses for our identities. Hey, it is better than nothing and in the case      // of multiple matches here, we'll end up picking the first one anyway which is what we would have done      // if we didn't do this second search. This helps the case for corporate users where mailing lists will have the same domain      // as one of your multiple identities.      if (!identity) {        for (id = 0; id < identities.Count(); id++) {           tempID = identities.GetElementAt(id).QueryInterface(Components.interfaces.nsIMsgIdentity);          // extract out the partial domain          var start = tempID.email.lastIndexOf("@"); // be sure to include the @ sign in our search to reduce the risk of false positives            if (optionalHint.search(tempID.email.slice(start, tempID.email.length).toLowerCase()) >= 0) {            identity = tempID;            break;          }        }      }    }  }  catch (ex) {dump (ex + "\n");}  // still no matches? Give up and pick the first one like we used to.  if (!identity)    identity = identities.GetElementAt(0).QueryInterface(Components.interfaces.nsIMsgIdentity);   return identity;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/af2eb552c77af7d974ab24c78f0e96e457b30df0/mailCommands.js/buggy/mailnews/base/resources/content/mailCommands.js