Buggy code:
@ Service public class UserRegistrationInformationServiceImpl implements UserRegistrationInformationService { @ Autowired private UserRegistrationInformatioDao userRegistrationInformatioDao ; @ Autowired private UserSpecializationDao userSpecializationDao ; @ Autowired private UserDao userDao ; @ Autowired private UserRoleDao userRoleDao ; @ Autowired private DocumentInfoService documentInfoService ; @ Autowired private BaseService baseService ; @ Autowired private MailService mailService ; @ Autowired private MessageSource messageSource ; @ Autowired private CountryDao countryDao ; @ Autowired private DocumentInfoDao documentInfoDao ; @ Autowired private ColumnMasterDataDao columnMasterDataDao ; @ Autowired private MarketingDataDao marketingDataDao ; @ Autowired private Cloner userRegistrationCloner ; @ Autowired private UserTabStatusService userTabStatusService ; @ Autowired private CycleOnlineTestService cycleOnlineTestService ; @ Autowired private UserOnlineTestDetailService userOnlineTestDetailService ; private static final Logger LOG = LoggerFactory . getLogger ( UserRegistrationInformationServiceImpl . class ) ; @ Override @ Transactional ( readOnly = true , propagation = Propagation . REQUIRES_NEW ) public UserRegistrationInformation getUserRegistrationInformation ( final Long userId ) { } @ Override @ Transactional ( readOnly = true , propagation = Propagation . REQUIRES_NEW ) public RegistrationDto getRegistrationDto ( final GdeUser user ) { } private List < String > findRelativePageFieldforFormId ( final Long formIdParam ) { } @ Override @ Transactional ( readOnly = true , propagation = Propagation . REQUIRES_NEW ) public PersonalDataDto getPersonalData ( final GdeUser user ) { } @ Override @ Transactional ( readOnly = false , propagation = Propagation . REQUIRED , rollbackFor = Exception . class ) public void savePersonalData ( final PersonalDataDto personalForm , final GdeUser user ) { } @ Override @ Transactional ( readOnly = false , propagation = Propagation . REQUIRES_NEW , rollbackFor = Exception . class ) public UserRegistrationInformation submitUserRegistration ( final RegistrationDto registrationDto , final GdeUser user , final MailMetaData mailMetaData ) { } @ Override @ Transactional ( readOnly = false , propagation = Propagation . REQUIRES_NEW , rollbackFor = Exception . class ) public UserRegistrationInformation submitUserRegistration ( final RegistrationDto registrationDto , final GdeUser user , final MailMetaData mailMetaData , final MailMetaData onlineTestMetaData , final Locale locale ) { } private String createTestLinkSummary ( final GdeUser user , final MailMetaData mailMetaData ) { StringBuilder stringBuilder = new StringBuilder ( ) ; List < CycleOnlineTestDto > onlineTestList = cycleOnlineTestService . getCycleOnlineTestDtos ( user . getRegistrationWindowId ( ) . getId ( ) ) ; List < UserOnlineTestDetail > userOnlineTestDetails = new ArrayList < > ( ) ; if ( CollectionUtils . isNotEmpty ( onlineTestList ) ) { for ( CycleOnlineTestDto onlineTestDto : onlineTestList ) { UserOnlineTestDetail userOnlineTestDetail = new UserOnlineTestDetail ( ) ; userOnlineTestDetail . setUser ( user ) ; userOnlineTestDetail . setCycleOnlineTest ( new com . nagarro . gde . persistence . model . CycleOnlineTest ( onlineTestDto . getObjId ( ) ) ) ; userOnlineTestDetail . setToken ( UUID . randomUUID ( ) . toString ( ) ) ; userOnlineTestDetail . setTokenTimestamp ( new Date ( ) ) ; <START_BUG> userOnlineTestDetail . setTestToolUserId ( GDEStringUtils . concat ( user . getId ( ) , "_" , onlineTestDto . getObjId ( ) ) ) ; <END_BUG> userOnlineTestDetails . add ( userOnlineTestDetail ) ; stringBuilder . append ( onlineTestDto . getTestName ( ) ) ; stringBuilder . append ( ":&nbsp;" ) ; stringBuilder . append ( "<a<seq2seq4repair_space>href='" ) ; String [ ] urlParams = new String [ 3 ] ; urlParams [ 0 ] = mailMetaData . getContextPath ( ) ; urlParams [ 1 ] = userOnlineTestDetail . getToken ( ) ; stringBuilder . append ( messageSource . getMessage ( "user.online.test.url" , urlParams , Locale . ENGLISH ) ) ; stringBuilder . append ( "'<seq2seq4repair_space>style='text-decoration:none;<seq2seq4repair_space>color:<seq2seq4repair_space>#00a7e1;'>Click<seq2seq4repair_space>Here<//a><br//>" ) ; } userOnlineTestDetailService . saveOrUpdate ( userOnlineTestDetails ) ; } return stringBuilder . toString ( ) ; } @ Override @ Transactional ( readOnly = false , propagation = Propagation . REQUIRED , rollbackFor = Exception . class ) public UserRegistrationInformation saveUserRegistration ( final RegistrationDto registrationDto , final GdeUser user , final boolean changeUserRole ) { } @ Override @ Transactional ( readOnly = false , propagation = Propagation . REQUIRED , rollbackFor = Exception . class ) public void setRegistrationDocDto ( final RegistrationDto registrationDto , final Long entityId , final String entityClass ) { } private DocumentInfo fetchDoc ( final GdeUser user , final DocCategoryEnum docCategoryEnum ) { } @ Override public void cloneUserRegistrationInfo ( final GdeUser sourceUser , final GdeUser targetUser ) { } }

Fix:
userOnlineTestDetail . setTestToolUserId ( ( ( ( GDEStringUtils . concat ( user . getId ( ) , "_" , onlineTestDto . getObjId ( ) ) ) + "_" ) + ( System . currentTimeMillis ( ) ) ) ) ;