rem:  if (identities.Count() > 1 && optionalHint) {  var tempID; for (id = 0; id < identities.Count(); id++) { tempID = identities.GetElementAt(id).QueryInterface(Components.interfaces.nsIMsgIdentity); if (optionalHint.search(tempID.email) >= 0) { identity = tempID; break; } }          if (!identity) { 
add: try {  if (identities.Count() > 1 && optionalHint) {  var tempID; 
context: function getBestIdentity(identities, optionalHint){  var identity = null;  // if we have more than one identity and a hint to help us pick one  if (identities.Count() > 1 && optionalHint) {    // 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.search(tempID.email) >= 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)) >= 0) {          identity = tempID;          break;        }      }    }  }  // 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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/401ebece6181c0fcbd19a2e470b0378c050fdc27/mailCommands.js/clean/mailnews/base/resources/content/mailCommands.js