<commit_before><?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

    <display-name>Zyeeda Framework Web Application</display-name>

    <resource-ref>
        <description>Default Data Source</description>
        <res-ref-name>jdbc/defaultDS</res-ref-name>
        <res-type>javax.sql.XADataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>Drools Task Data Source</description>
        <res-ref-name>jdbc/droolsTaskDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>User Transaction</description>
        <res-ref-name>UserTransaction</res-ref-name>
        <res-type>javax.transaction.UserTransaction</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>Transaction Manager</description>
        <res-ref-name>TransactionManager</res-ref-name>
        <res-type>javax.transaction.TransactionManager</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>Transaction Synchronization Registry</description>
        <res-ref-name>TransactionSynchronizationRegistry</res-ref-name>
        <res-type>javax.transaction.TransactionSynchronizationRegistry</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

    <listener>
        <listener-class>
            com.zyeeda.framework.web.ContextListener
        </listener-class>
    </listener>

    <!-- 
    <filter>
        <filter-name>CharacterEncodingFilter</filter-name>
        <display-name>Character Encoding Filter</display-name>
        <filter-class>com.zyeeda.framework.web.CharacterEncodingFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>CharacterEncodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    -->

    <filter>
        <filter-name>OSiVFilter</filter-name>
        <filter-class>com.zyeeda.framework.web.OpenSessionInViewFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>OSiVFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
   
    <filter>
        <filter-name>SecurityFilter</filter-name>
        <filter-class>com.zyeeda.framework.web.OpenIdConsumerSecurityFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>SecurityFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <!--
    <servlet>
        <servlet-name>OpenIdConsumer</servlet-name>
        <servlet-class>
            com.zyeeda.framework.web.demo.DemoOpenIdConsumerServlet
        </servlet-class>
        <init-param>
            <param-name>redirect.to.url</param-name>
            <param-value>/openid_redirect.jsp</param-value>
        </init-param>
        <init-param>
            <param-name>return.to.url</param-name>
            <param-value>http://localhost:8080/accounts/openid/verify</param-value>
        </init-param>
        <init-param>
            <param-name>public.identifier</param-name>
            <param-value>http://yahoo.com</param-value>
            <param-value>https://www.google.com/accounts/o8/id</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>OpenIdConsumer</servlet-name>
        <url-pattern>/accounts/openid/*</url-pattern>
    </servlet-mapping>
    -->
    
    <servlet>
        <servlet-name>CXFServlet</servlet-name>
        <servlet-class>
            org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
        </servlet-class>
        <init-param>
            <param-name>jaxrs.serviceClasses</param-name>
            <param-value>
                com.zyeeda.framework.ws.DictionaryService 
                com.zyeeda.framework.ws.DocumentService 
                com.zyeeda.framework.ws.DepartmentService 
                com.zyeeda.framework.ws.UserService
                com.zyeeda.framework.ws.DefaultUserService
            </param-value>
        </init-param>
        <init-param>
            <param-name>jaxrs.providers</param-name>
            <param-value>
                com.zyeeda.framework.cxf.JacksonJsonProvider 
                com.zyeeda.framework.cxf.DateParameterHandler
            </param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <!--
    <servlet>
        <servlet-name>CXFServlet</servlet-name>
        <servlet-class>
            org.apache.cxf.transport.servlet.CXFServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    -->
    <servlet-mapping>
        <servlet-name>CXFServlet</servlet-name>
        <url-pattern>/rest/*</url-pattern>
        <!-- <url-pattern>/sync/*</url-pattern> -->
    </servlet-mapping>

    <!-- 
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>security</web-resource-name>
            <url-pattern>/security/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    -->

</web-app>
<commit_msg>exchange the order of the filters<commit_after><?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

    <display-name>Zyeeda Framework Web Application</display-name>

    <resource-ref>
        <description>Default Data Source</description>
        <res-ref-name>jdbc/defaultDS</res-ref-name>
        <res-type>javax.sql.XADataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>Drools Task Data Source</description>
        <res-ref-name>jdbc/droolsTaskDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>User Transaction</description>
        <res-ref-name>UserTransaction</res-ref-name>
        <res-type>javax.transaction.UserTransaction</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>Transaction Manager</description>
        <res-ref-name>TransactionManager</res-ref-name>
        <res-type>javax.transaction.TransactionManager</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
        <description>Transaction Synchronization Registry</description>
        <res-ref-name>TransactionSynchronizationRegistry</res-ref-name>
        <res-type>javax.transaction.TransactionSynchronizationRegistry</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

    <listener>
        <listener-class>
            com.zyeeda.framework.web.ContextListener
        </listener-class>
    </listener>

    <!-- 
    <filter>
        <filter-name>CharacterEncodingFilter</filter-name>
        <display-name>Character Encoding Filter</display-name>
        <filter-class>com.zyeeda.framework.web.CharacterEncodingFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>CharacterEncodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    -->

    <filter>
        <filter-name>SecurityFilter</filter-name>
        <filter-class>com.zyeeda.framework.web.OpenIdConsumerSecurityFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>SecurityFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <filter>
        <filter-name>OSiVFilter</filter-name>
        <filter-class>com.zyeeda.framework.web.OpenSessionInViewFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>OSiVFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <!--
    <servlet>
        <servlet-name>OpenIdConsumer</servlet-name>
        <servlet-class>
            com.zyeeda.framework.web.demo.DemoOpenIdConsumerServlet
        </servlet-class>
        <init-param>
            <param-name>redirect.to.url</param-name>
            <param-value>/openid_redirect.jsp</param-value>
        </init-param>
        <init-param>
            <param-name>return.to.url</param-name>
            <param-value>http://localhost:8080/accounts/openid/verify</param-value>
        </init-param>
        <init-param>
            <param-name>public.identifier</param-name>
            <param-value>http://yahoo.com</param-value>
            <param-value>https://www.google.com/accounts/o8/id</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>OpenIdConsumer</servlet-name>
        <url-pattern>/accounts/openid/*</url-pattern>
    </servlet-mapping>
    -->
    
    <servlet>
        <servlet-name>CXFServlet</servlet-name>
        <servlet-class>
            org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
        </servlet-class>
        <init-param>
            <param-name>jaxrs.serviceClasses</param-name>
            <param-value>
                com.zyeeda.framework.ws.DictionaryService 
                com.zyeeda.framework.ws.DocumentService 
                com.zyeeda.framework.ws.DepartmentService 
                com.zyeeda.framework.ws.UserService
                com.zyeeda.framework.ws.DefaultUserService
            </param-value>
        </init-param>
        <init-param>
            <param-name>jaxrs.providers</param-name>
            <param-value>
                com.zyeeda.framework.cxf.JacksonJsonProvider 
                com.zyeeda.framework.cxf.DateParameterHandler
            </param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <!--
    <servlet>
        <servlet-name>CXFServlet</servlet-name>
        <servlet-class>
            org.apache.cxf.transport.servlet.CXFServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    -->
    <servlet-mapping>
        <servlet-name>CXFServlet</servlet-name>
        <url-pattern>/rest/*</url-pattern>
        <!-- <url-pattern>/sync/*</url-pattern> -->
    </servlet-mapping>

    <!-- 
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>security</web-resource-name>
            <url-pattern>/security/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    -->

</web-app>

{'fraction_non_alphanumeric': 0.14720855984122874, 'fraction_numerical': 0.0034515488825610494, 'mean_word_length': 2.0767188744358904, 'pattern_counts': {'":': 0, '<': 379, '<?xml version=': 2, '>': 379, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 12}, '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': '118444', 'n_tokens_mistral': 3613, 'n_tokens_neox': 3506, 'n_words': 317}