<commit_before><?xml version="1.0" encoding="UTF-8"?>
<#macro processEnvRef environmentRef>
    <#switch environmentRef.referenceTagType>
        <#case "RESOURCE_ENV_REF">
            <resource-env-ref>
                <resource-env-ref-name>${environmentRef.name}</resource-env-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </resource-env-ref>
            <#break>
        <#case "RESOURCE_REF">
            <resource-ref>
                <res-ref-name>${environmentRef.name}</res-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </resource-ref>
            <#break>
        <#case "EJB_LOCAL_REF">
            <ejb-local-ref>
                <ejb-ref-name>${environmentRef.name}</ejb-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </ejb-local-ref>
            <#break>
        <#case "EJB_REF">
            <ejb-ref>
                <ejb-ref-name>${environmentRef.name}</ejb-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </ejb-ref>
            <#break>
        <#case "MSG_DESTINATION_REF">
            <message-destination-ref>
                <message-destination-ref-name>${environmentRef.name}</message-destination-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </message-destination-ref>
            <#break>
        <#default>
        <!-- Unhandled type: ${environmentRef.referenceTagType} -->
    </#switch>
    </#macro>

    <#macro processPool bean>
    <#if bean.threadPool??>
        <p:pool>
            <ejb-name>${bean.beanName}</ejb-name>
            <p:bean-instance-pool-ref>${bean.threadPool.poolName}</p:bean-instance-pool-ref>
        </p:pool>
    </#if>
    </#macro>

    <#macro processTxTimeout bean>
    <#if bean.txTimeouts??>
        <#list bean.txTimeouts?keys as txMethodPattern>
            <container-transaction>
                <method>
                    <ejb-name>${bean.beanName}</ejb-name>
                    <method-name>${txMethodPattern}</method-name>
                    <method-intf>Local</method-intf>
                </method>
                <tx:trans-timeout>
                    <tx:timeout>${bean.txTimeouts[txMethodPattern]}</tx:timeout>
                    <tx:unit>Seconds</tx:unit>
                </tx:trans-timeout>
            </container-transaction>
        </#list>
    </#if>
    </#macro>

    <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:s="urn:security:1.1"
               xmlns:tx="urn:trans-timeout"
               xmlns:c="urn:clustering:1.0"
               xmlns:p="urn:ejb-pool:1.0"
               xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd
               urn:trans-timeout http://www.jboss.org/j2ee/schema/trans-timeout-1_0.xsd"
               version="3.1"
               impl-version="2.1">

    <enterprise-beans>

        <#if iterableHasContent(reportModel.relatedResources.sessionBeans)>
        <#list reportModel.relatedResources.sessionBeans.list.iterator() as sessionBean>
        <session>
            <ejb-name>${sessionBean.beanName}</ejb-name>
            <session-type>${sessionBean.sessionType}</session-type>

            <#if iterableHasContent(sessionBean.environmentReferences)>
                <#list sessionBean.environmentReferences.iterator() as environmentRef>
                    <@processEnvRef environmentRef />
                </#list>
            </#if>
        </session>
        </#list><commit_msg>WINDUP-881: FreeMarker template error on an ejb-jar.xml that doesn't contain <session-type><commit_after><?xml version="1.0" encoding="UTF-8"?>
<#macro processEnvRef environmentRef>
    <#switch environmentRef.referenceTagType>
        <#case "RESOURCE_ENV_REF">
            <resource-env-ref>
                <resource-env-ref-name>${environmentRef.name}</resource-env-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </resource-env-ref>
            <#break>
        <#case "RESOURCE_REF">
            <resource-ref>
                <res-ref-name>${environmentRef.name}</res-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </resource-ref>
            <#break>
        <#case "EJB_LOCAL_REF">
            <ejb-local-ref>
                <ejb-ref-name>${environmentRef.name}</ejb-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </ejb-local-ref>
            <#break>
        <#case "EJB_REF">
            <ejb-ref>
                <ejb-ref-name>${environmentRef.name}</ejb-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </ejb-ref>
            <#break>
        <#case "MSG_DESTINATION_REF">
            <message-destination-ref>
                <message-destination-ref-name>${environmentRef.name}</message-destination-ref-name>
                <#if environmentRef.jndiReference??><jndi-name>${environmentRef.jndiReference.jndiLocation}</jndi-name></#if>
            </message-destination-ref>
            <#break>
        <#default>
        <!-- Unhandled type: ${environmentRef.referenceTagType} -->
    </#switch>
    </#macro>

    <#macro processPool bean>
    <#if bean.threadPool??>
        <p:pool>
            <ejb-name>${bean.beanName}</ejb-name>
            <p:bean-instance-pool-ref>${bean.threadPool.poolName}</p:bean-instance-pool-ref>
        </p:pool>
    </#if>
    </#macro>

    <#macro processTxTimeout bean>
    <#if bean.txTimeouts??>
        <#list bean.txTimeouts?keys as txMethodPattern>
            <container-transaction>
                <method>
                    <ejb-name>${bean.beanName}</ejb-name>
                    <method-name>${txMethodPattern}</method-name>
                    <method-intf>Local</method-intf>
                </method>
                <tx:trans-timeout>
                    <tx:timeout>${bean.txTimeouts[txMethodPattern]}</tx:timeout>
                    <tx:unit>Seconds</tx:unit>
                </tx:trans-timeout>
            </container-transaction>
        </#list>
    </#if>
    </#macro>

    <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:s="urn:security:1.1"
               xmlns:tx="urn:trans-timeout"
               xmlns:c="urn:clustering:1.0"
               xmlns:p="urn:ejb-pool:1.0"
               xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd
               urn:trans-timeout http://www.jboss.org/j2ee/schema/trans-timeout-1_0.xsd"
               version="3.1"
               impl-version="2.1">

    <enterprise-beans>

        <#if iterableHasContent(reportModel.relatedResources.sessionBeans)>
        <#list reportModel.relatedResources.sessionBeans.list.iterator() as sessionBean>
        <session>
            <ejb-name>${sessionBean.beanName}</ejb-name>
            <#if sessionBean.sessionType??><session-type>${sessionBean.sessionType}</session-type></#if>

            <#if iterableHasContent(sessionBean.environmentReferences)>
                <#list sessionBean.environmentReferences.iterator() as environmentRef>
                    <@processEnvRef environmentRef />
                </#list>
            </#if>
        </session>
        </#list>
{'fraction_non_alphanumeric': 0.15967491335006573, 'fraction_numerical': 0.006812477590534241, 'mean_word_length': 2.0652014652014654, 'pattern_counts': {'":': 0, '<': 216, '<?xml version=': 2, '>': 216, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 27}, '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': '378678', 'n_tokens_mistral': 2764, 'n_tokens_neox': 2647, 'n_words': 262}