Buggy code:
@ EnableWebSecurity @ Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter { private Logger log = LogManager . getLogger ( SecurityConfig . class ) ; @ Autowired public void configureGlobal ( AuthenticationManagerBuilder auth ) throws Exception { DataSource dataSource = LoadDatabase . getDataSource ( ) ; if ( dataSource == null ) { log . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>datasource" ) ; } else { log . error ( "Loaded<seq2seq4repair_space>the<seq2seq4repair_space>data<seq2seq4repair_space>source<seq2seq4repair_space>successfully" ) ; } <START_BUG> auth . jdbcAuthentication ( ) . dataSource ( dataSource ) . usersByUsernameQuery ( "select<seq2seq4repair_space>userName<seq2seq4repair_space>as<seq2seq4repair_space>username,<seq2seq4repair_space>password,<seq2seq4repair_space>(select<seq2seq4repair_space>1)<seq2seq4repair_space>as<seq2seq4repair_space>enabled<seq2seq4repair_space>from<seq2seq4repair_space>volunteer.dbo.UserTable<seq2seq4repair_space>as<seq2seq4repair_space>users<seq2seq4repair_space>where<seq2seq4repair_space>userName<seq2seq4repair_space>=<seq2seq4repair_space>?;" ) . authoritiesByUsernameQuery ( "select<seq2seq4repair_space>username,<seq2seq4repair_space>(select<seq2seq4repair_space>case<seq2seq4repair_space>when<seq2seq4repair_space>adminStatus<seq2seq4repair_space>=<seq2seq4repair_space>'y'<seq2seq4repair_space>then<seq2seq4repair_space>'ROLE_ADMIN'<seq2seq4repair_space>else<seq2seq4repair_space>'ROLE_USER'<seq2seq4repair_space>END<seq2seq4repair_space>as<seq2seq4repair_space>varchar)<seq2seq4repair_space>as<seq2seq4repair_space>role<seq2seq4repair_space>from<seq2seq4repair_space>UserTable<seq2seq4repair_space>as<seq2seq4repair_space>user_roles<seq2seq4repair_space>where<seq2seq4repair_space>username<seq2seq4repair_space>=<seq2seq4repair_space>?;" ) ; <END_BUG> } protected void configure ( HttpSecurity http ) throws Exception { } }

Fix:
auth . jdbcAuthentication ( ) . dataSource ( dataSource ) . usersByUsernameQuery ( "select<seq2seq4repair_space>userName<seq2seq4repair_space>as<seq2seq4repair_space>username,<seq2seq4repair_space>password,<seq2seq4repair_space>(select<seq2seq4repair_space>1)<seq2seq4repair_space>as<seq2seq4repair_space>enabled<seq2seq4repair_space>from<seq2seq4repair_space>volunteer.dbo.UserTable<seq2seq4repair_space>as<seq2seq4repair_space>users<seq2seq4repair_space>where<seq2seq4repair_space>userName<seq2seq4repair_space>=<seq2seq4repair_space>?;" ) . authoritiesByUsernameQuery ( "select<seq2seq4repair_space>username,<seq2seq4repair_space>(select<seq2seq4repair_space>case<seq2seq4repair_space>when<seq2seq4repair_space>adminStatus<seq2seq4repair_space>=<seq2seq4repair_space>'y'<seq2seq4repair_space>then<seq2seq4repair_space>'ROLE_ADMIN'<seq2seq4repair_space>else<seq2seq4repair_space>'ROLE_USER'<seq2seq4repair_space>END<seq2seq4repair_space>as<seq2seq4repair_space>varchar)<seq2seq4repair_space>as<seq2seq4repair_space>role<seq2seq4repair_space>from<seq2seq4repair_space>volunteer.dbo.UserTable<seq2seq4repair_space>as<seq2seq4repair_space>user_roles<seq2seq4repair_space>where<seq2seq4repair_space>username<seq2seq4repair_space>=<seq2seq4repair_space>?;" ) ;