<commit_before>package com.aemreunal.config;

import javax.servlet.FilterRegistration;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.filter.DelegatingFilterProxy;
import org.springframework.web.servlet.DispatcherServlet;

/*
 **************************
 * Copyright (c) 2014     *
 *                        *
 * This code belongs to:  *
 *                        *
 * <NAME>        *
 * S001974                *
 *                        *
 * <EMAIL>    *
 * <EMAIL>   *
 *                        *
 * aemreunal.com          *
 **************************
 */

public class WebAppInitializer implements WebApplicationInitializer {
    // TODO find out what this class is used for

    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        AnnotationConfigWebApplicationContext webAppContext = new AnnotationConfigWebApplicationContext();
//        webAppContext.register(CoreConfig.class, MVCConfig.class, SecurityConfig.class);
        webAppContext.register(CoreConfig.class, MVCConfig.class);
        servletContext.addListener(new ContextLoaderListener(webAppContext));
//        servletContext.setInitParameter("defaultHtmlEscape", "true");

        AnnotationConfigWebApplicationContext dispatchCtx = new AnnotationConfigWebApplicationContext();
        ServletRegistration.Dynamic dispatcher = servletContext.addServlet("dispatcher", new DispatcherServlet(dispatchCtx));
        dispatcher.setLoadOnStartup(1);
        dispatcher.addMapping("/");

//        configureSpringSecurity(servletContext, webAppContext);
    }

    private void configureSpringSecurity(ServletContext servletContext, WebApplicationContext rootContext) {
        FilterRegistration.Dynamic springSecurity = servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy("springSecurityFilterChain", rootContext));
        springSecurity.addMappingForUrlPatterns(null, true, "/*");
    }

}<commit_msg>Remove clutter<commit_after>package com.aemreunal.config;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;

/*
 **************************
 * Copyright (c) 2014     *
 *                        *
 * This code belongs to:  *
 *                        *
 * <NAME>        *
 * S001974                *
 *                        *
 * <EMAIL>    *
 * <EMAIL>   *
 *                        *
 * aemreunal.com          *
 **************************
 */

public class WebAppInitializer implements WebApplicationInitializer {
    // TODO find out what this class is used for

    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        AnnotationConfigWebApplicationContext webAppContext = new AnnotationConfigWebApplicationContext();
        webAppContext.register(CoreConfig.class, MVCConfig.class, SecurityConfig.class);
        servletContext.addListener(new ContextLoaderListener(webAppContext));

        AnnotationConfigWebApplicationContext dispatchCtx = new AnnotationConfigWebApplicationContext();
        ServletRegistration.Dynamic dispatcher = servletContext.addServlet("dispatcher", new DispatcherServlet(dispatchCtx));

        dispatcher.setLoadOnStartup(1);
        dispatcher.addMapping("/");
    }


}
{'fraction_non_alphanumeric': 0.1080389144905274, 'fraction_numerical': 0.0056323604710701485, 'mean_word_length': 3.651190476190476, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '3629940', 'n_tokens_mistral': 970, 'n_tokens_neox': 919, 'n_words': 165}