Source:
<code>public String getProfileFname(IPerson person, HttpServletRequest request) { String rslt = null; <START> logger.debug("Choosing profile for user '{}'; stickySelection={}", person.getUserName(), stickySelection); <END> for (IProfileMapper mapper : subMappers) { final String fname = mapper.getProfileFname(person, request); if (fname != null) { logger.debug("Profile mapper found profile fname={}", mapper, fname); rslt = fname; break; } } if (stickySelection && !person.isGuest() && !(person instanceof RestrictedPerson)) { final Hashtable<Integer, UserProfile> profiles = layoutStore.getUserProfileList(person); logger.debug("Profiles for user '{}' are: {}", person.getUserName(), profiles); final UserProfile stickyProfile = findStickyProfile(profiles); logger.debug("stickyProfile for user '{}' is: {}", person.getUserName(), stickyProfile); if (rslt != null) { if (defaultProfileName.equals(rslt) && stickyProfile != null) { logger.debug("Clearing sticky profile '{}' for user '{}'", stickyProfile.getProfileName(), person.getUserName()); clearStickyProfile(person, stickyProfile); } else if (!defaultProfileName.equals(rslt) && stickyProfile == null) { logger.debug("Setting sticky profile '{}' for user '{}'", rslt, person.getUserName()); setStickyProfile(person, rslt); } else if (!defaultProfileName.equals(rslt) && !stickyProfile.getProfileName().equals(rslt)) { logger.debug("Updating sticky profile '{}' for user '{}'", rslt, person.getUserName()); updateStickyProfile(person, stickyProfile, rslt); } } if (rslt == null && stickyProfile != null) { logger.debug("Applying sticky profile '{}' for user '{}'", stickyProfile.getProfileName(), person.getUserName()); rslt = stickyProfile.getProfileName(); } } if (STICKY_PROFILE_FNAME.equals(rslt)) { logger.warn("Selected synthetic (pointer) profile for user '{}'", person.getUserName()); rslt = defaultProfileName; } return rslt != null ? rslt : defaultProfileName; }</code><technical_language>suggest trace debug it's, well, tracing method call dynamic state log</technical_language>

Target:
public String getProfileFname(IPerson person, HttpServletRequest request) { String rslt = null; logger.trace("Choosing profile for user '{}'; stickySelection={}", person.getUserName(), stickySelection); for (IProfileMapper mapper : subMappers) { final String fname = mapper.getProfileFname(person, request); if (fname != null) { logger.debug("Profile mapper found profile fname={}", mapper, fname); rslt = fname; break; } } if (stickySelection && !person.isGuest() && !(person instanceof RestrictedPerson)) { final Hashtable<Integer, UserProfile> profiles = layoutStore.getUserProfileList(person); logger.debug("Profiles for user '{}' are: {}", person.getUserName(), profiles); final UserProfile stickyProfile = findStickyProfile(profiles); logger.debug("stickyProfile for user '{}' is: {}", person.getUserName(), stickyProfile); if (rslt != null) { if (defaultProfileName.equals(rslt) && stickyProfile != null) { logger.debug("Clearing sticky profile '{}' for user '{}'", stickyProfile.getProfileName(), person.getUserName()); clearStickyProfile(person, stickyProfile); } else if (!defaultProfileName.equals(rslt) && stickyProfile == null) { logger.debug("Setting sticky profile '{}' for user '{}'", rslt, person.getUserName()); setStickyProfile(person, rslt); } else if (!defaultProfileName.equals(rslt) && !stickyProfile.getProfileName().equals(rslt)) { logger.debug("Updating sticky profile '{}' for user '{}'", rslt, person.getUserName()); updateStickyProfile(person, stickyProfile, rslt); } } if (rslt == null && stickyProfile != null) { logger.debug("Applying sticky profile '{}' for user '{}'", stickyProfile.getProfileName(), person.getUserName()); rslt = stickyProfile.getProfileName(); } } if (STICKY_PROFILE_FNAME.equals(rslt)) { logger.warn("Selected synthetic (pointer) profile for user '{}'; falling back to default of '{}'", person.getUserName(), defaultProfileName); rslt = defaultProfileName; } return rslt != null ? rslt : defaultProfileName; }