<commit_before>package org.aslak.github.merge;

import java.io.IOException;
import java.util.regex.Pattern;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;

@WebFilter(filterName= "HTML5RewriteFilter", urlPatterns = {"/*"})
public class HTML5RewriteFilter implements Filter {

    public static final Pattern PATTERN = Pattern.compile("(^.*/api/|\\.(css|js|png|jpg))");
    public static final String APP_INDEX = "/app/index.jsp";
    
    @Override
    public void init(FilterConfig filterConfig) throws ServletException { }

    @Override
    public void destroy() {}

    
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        HttpServletRequest httpRequest = (HttpServletRequest)request;
        request.setAttribute("BASE_ROOT", httpRequest.getContextPath());
        
        if(PATTERN.matcher(httpRequest.getRequestURI()).find()) {
            chain.doFilter(request, response);
        } else {<commit_msg>Allow HTML files to pass through Rewrite filter<commit_after>package org.aslak.github.merge;

import java.io.IOException;
import java.util.regex.Pattern;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;

@WebFilter(filterName= "HTML5RewriteFilter", urlPatterns = {"/*"})
public class HTML5RewriteFilter implements Filter {

    public static final Pattern PATTERN = Pattern.compile("(^.*/api/|\\.(css|js|png|jpg|html))");
    public static final String APP_INDEX = "/app/index.jsp";
    
    @Override
    public void init(FilterConfig filterConfig) throws ServletException { }

    @Override
    public void destroy() {}

    
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        HttpServletRequest httpRequest = (HttpServletRequest)request;
        request.setAttribute("BASE_ROOT", httpRequest.getContextPath());
        
        if(PATTERN.matcher(httpRequest.getRequestURI()).find()) {
            chain.doFilter(request, response);
        } else {
{'fraction_non_alphanumeric': 0.10507948817371074, 'fraction_numerical': 0.0015509887553315238, 'mean_word_length': 4.512820512820513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3017995', 'n_tokens_mistral': 692, 'n_tokens_neox': 676, 'n_words': 155}