rem: logins = foundLogins.filter(function (l) { var fit = (l.username.length <= maxUsernameLen && l.password.length <= maxPasswordLen); if (!fit) this.log("Ignored " + l.username + " login: won't fit");  return fit; }, this); 
add: var found = logins.some(function(l) { matchingLogin = l; return (l.username == username); }); 
context:             logins = foundLogins.filter(function (l) {                    var fit = (l.username.length <= maxUsernameLen &&                               l.password.length <= maxPasswordLen);                    if (!fit)                        this.log("Ignored " + l.username + " login: won't fit");                    return fit;                }, this);
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/6ccd2aa9c9d8760e31362abc1f3a246dd9a8724f/nsLoginManager.js/buggy/toolkit/components/passwordmgr/src/nsLoginManager.js