<commit_before>package ca.corefacility.bioinformatics.irida.ria.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter;

import ca.corefacility.bioinformatics.irida.config.IridaApiSecurityConfig;

/**
 * Customizes Spring Security configuration.
 * 
 * @author <NAME> <<EMAIL>>
 */
@Configuration
@EnableWebSecurity
@Import({ IridaApiSecurityConfig.class })
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

	@Override
	public void configure(WebSecurity web) throws Exception {
		web.ignoring().antMatchers("/scripts/**").antMatchers("/styles/**").antMatchers("/images/**");
	}

	@Override
	protected void configure(HttpSecurity http) throws Exception {
		http

		// Prevent Cross Site Request Forgery
		.csrf()
				.disable()
				// Refactor login form

				// See https://jira.springsource.org/browse/SPR-11496
				// This is for SockJS and Web Sockets
				.headers()
				.addHeaderWriter(new XFrameOptionsHeaderWriter(XFrameOptionsHeaderWriter.XFrameOptionsMode.SAMEORIGIN))
				.and()

				.formLogin().defaultSuccessUrl("/").loginPage("/login").failureUrl("/login?error=1").permitAll().and()
				.logout().logoutSuccessUrl("/login").logoutUrl("/logout").permitAll().and().authorizeRequests()
				.antMatchers("/bower_components/**").permitAll().anyRequest().authenticated().and();
	}
}<commit_msg>Removed excess and()<commit_after>package ca.corefacility.bioinformatics.irida.ria.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter;

import ca.corefacility.bioinformatics.irida.config.IridaApiSecurityConfig;

/**
 * Customizes Spring Security configuration.
 * 
 * @author <NAME> <<EMAIL>>
 */
@Configuration
@EnableWebSecurity
@Import({ IridaApiSecurityConfig.class })
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

	@Override
	public void configure(WebSecurity web) throws Exception {
		web.ignoring().antMatchers("/scripts/**").antMatchers("/styles/**").antMatchers("/images/**");
	}

	@Override
	protected void configure(HttpSecurity http) throws Exception {
		http

		// Prevent Cross Site Request Forgery
		.csrf()
				.disable()
				// Refactor login form

				// See https://jira.springsource.org/browse/SPR-11496
				// This is for SockJS and Web Sockets
				.headers()
				.addHeaderWriter(new XFrameOptionsHeaderWriter(XFrameOptionsHeaderWriter.XFrameOptionsMode.SAMEORIGIN))
				.and()

				.formLogin().defaultSuccessUrl("/").loginPage("/login").failureUrl("/login?error=1").permitAll().and()
				.logout().logoutSuccessUrl("/login").logoutUrl("/logout").permitAll().and().authorizeRequests()
				.antMatchers("/bower_components/**").permitAll().anyRequest().authenticated();
	}
}
{'fraction_non_alphanumeric': 0.13121434392828035, 'fraction_numerical': 0.0032599837000814994, 'mean_word_length': 5.768382352941177, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2896963', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1003, 'n_words': 154}