Buggy code:
@ Service public class UserService implements UserDetailsService { private static Logger LOG = Logger . getLogger ( UserService . class ) ; @ Autowired @ Qualifier ( "theUserPersistRepository" ) private IUserRepository repository ; @ Autowired private EmailService emailService ; private static final String TX_NAME = "txService" ; @ Autowired private PlatformTransactionManager txManager ; private DefaultTransactionDefinition customTx ; public UserService ( ) { } public void create ( final UserDetailsImpl user ) throws ServiceException { BCryptPasswordEncoder encoder = new BCryptPasswordEncoder ( ) ; user . setPassword ( encoder . encode ( user . getPassword ( ) ) ) ; TransactionStatus status = null ; try { status = txManager . getTransaction ( customTx ) ; if ( repository . isEmailExists ( user ) ) throw new ServiceException ( "Sorry,<seq2seq4repair_space>e-mail<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>exists" ) ; repository . create ( user ) ; txManager . commit ( status ) ; <START_BUG> UserService . LOG . info ( String . format ( "New<seq2seq4repair_space>user<seq2seq4repair_space>is<seq2seq4repair_space>created:<seq2seq4repair_space>UserId:<seq2seq4repair_space>%d,<seq2seq4repair_space>UserEmail:<seq2seq4repair_space>%s." , user . getId ( ) , user . getName ( ) ) ) ; <END_BUG> } catch ( Exception e ) { UserService . LOG . error ( String . format ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>creating<seq2seq4repair_space>user.<seq2seq4repair_space>UserId:<seq2seq4repair_space>%d,<seq2seq4repair_space>UserEmail:<seq2seq4repair_space>%s." , user . getId ( ) , user . getName ( ) ) ) ; if ( status != null ) { txManager . rollback ( status ) ; UserService . LOG . info ( "Rollback<seq2seq4repair_space>done." ) ; } throw new ServiceException ( ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>creating<seq2seq4repair_space>user:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , e ) ; } } @ Override public UserDetails loadUserByUsername ( String email ) throws UsernameNotFoundException { } public void updatePassword ( final UserCreateForm form , String password ) throws ServiceException { } public Optional < UserDetailsImpl > getUserByEmail ( String email ) throws ServiceException { } public Optional < UserDetailsImpl > getUserById ( Long userId ) throws ServiceException { } public void confirm ( String email ) throws ServiceException { } public String getToken ( String email ) throws ServiceException { } public String setNewToken ( String email ) throws ServiceException { } public ModelAndView getSignUpErrors ( String url , BindingResult bindingResult ) throws ServiceException { } public ModelAndView resetPassInDB ( String email ) throws ServiceException { } public ModelAndView updatePass ( String email , String token , String [ ] passwords ) throws ServiceException { } public void cleanDB ( ) throws ServiceException { } }

Fix:
UserService . LOG . info ( String . format ( "New<seq2seq4repair_space>user<seq2seq4repair_space>is<seq2seq4repair_space>created:<seq2seq4repair_space>UserId:<seq2seq4repair_space>%d,<seq2seq4repair_space>UserEmail:<seq2seq4repair_space>%s." , user . getId ( ) , user . getUsername ( ) ) ) ;