<commit_before>package org.nanocontainer.nanowar;

import java.io.IOException;

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.http.HttpServletRequest;

import org.picocontainer.PicoContainer;
import org.picocontainer.PicoInitializationException;

/**
* <p>
* A Filter which delegates to another Filter which is registered in a PicoContainer,
* in any of the web scopes: context, session or request.
*</p>
*
* <p>The delegate Filter must be registered via the <code>delegate-key</code> or <code>delegate-class</code>
* init-params of this Filter.  
*
* <p>The initialization is done lazily, using the <code>init-type</code> init-param
* to control it.  Allowed values are:
* <ul>
*   <li>"context": will call init() on the filter only once</li>
*   <li>"request": will re-init it at every request</li>
*   <li>"never": will never init it</li>
*</ul>
*The default is "context".<commit_msg>Clarified use and scope of ServletContainerProxyFilter.<commit_after>package org.nanocontainer.nanowar;

import java.io.IOException;

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.http.HttpServletRequest;

import org.picocontainer.PicoContainer;
import org.picocontainer.PicoInitializationException;

/**
*<p>
* ServletContainerProxyFilter is a Filter which delegates to any Filter which is registered in a PicoContainer,
* in any of the web scopes: context, session or request.
* This form of delegation is particularly useful as it brings dependency injections to filters.
* In fact the delegate filter may be implemented via any form of dependency injection.
*</p>
*
*<p>The delegate Filter must be registered via the <code>delegate-key</code> or <code>delegate-class</code>
* init-params of this Filter.  
*</p>
* 
*<p>The initialization is done lazily, using the <code>init-type</code> init-param
* to control it.  Allowed values are:
* <ul>
*   <li>"context": will call init() on the filter only once</li>
*   <li>"request": will re-init it at every request</li>
*   <li>"never": will never init it</li>
*</ul>
*The default is "context".
{'fraction_non_alphanumeric': 0.11023294509151414, 'fraction_numerical': 0.0, 'mean_word_length': 5.246753246753247, 'pattern_counts': {'":': 6, '<': 40, '<?xml version=': 0, '>': 40, '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': '1375647', 'n_tokens_mistral': 716, 'n_tokens_neox': 713, 'n_words': 243}