question: public void resetPassword ( String uuid , String realm , Map map ) throws PWResetException { populateLockoutValues ( realm ) ; PWResetAccountLockout pwResetLockout = new PWResetAccountLockout ( this ) ; try { localeContext . setOrgLocale ( realm ) ; AMIdentity user = IdUtils . getIdentity ( getSSOToken ( ) , uuid ) ; sendAttemptEmail ( user ) ; if ( isUserAnswersCorrect ( map , user , realm ) ) { pwResetLockout . removeUserLockoutEntry ( uuid ) ; String password = getPasswordResetValue ( realm , user ) ; if ( password != null && password . length ( ) > 0 ) { NotifyPassword passwordNotify = getNotifyPassword ( realm ) ; if ( passwordNotify != null ) { changePassword ( user , password , passwordNotify , uuid , realm ) ; writeLog ( "pwResetSuccess.message" , uuid ) ; } else { errorMsg = getLocalizedString ( "passResetError.message" ) ; } } else { errorMsg = getLocalizedString ( "passResetError.message" ) ; } } else { pwResetLockout . invalidAnswer ( user ) ; if ( ! isLockoutWarning ( pwResetLockout , uuid ) ) { errorMsg = getLocalizedString ( "wrongAnswer.message" ) ; } } } catch ( SSOException e ) { debug . warning ( "PWResetQuestionModelImpl.resetPassword" , e ) ; errorMsg = getErrorString ( e ) ; } catch ( IdRepoException e ) { debug . warning ( "PWResetQuestionModelImpl.resetPassword" , e ) ; errorMsg = getErrorString ( e ) ; } if ( ( errorMsg != null ) && ( errorMsg . length ( ) > 0 ) ) { writeLog ( "pwResetFail.message" , errorMsg , uuid ) ; throw new PWResetException ( errorMsg ) ; } else if ( ( informationMsg != null ) && ( informationMsg . length ( ) > 0 ) ) { writeLog ( "pwResetFail.message" , uuid ) ; throw new PWResetException ( informationMsg ) ; } }
target:  Resets the user password.