<commit_before><?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="eap6"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">

    <metadata>
        <description>
            This ruleset provides analysis of JBoss EAP 6 xml files that may require
            individual attention when migrating to JBoss EAP 7+.
        </description>
        <dependencies>
            <addon id="org.jboss.windup.rules,windup-rules-javaee,2.3.0.Final" />
            <addon id="org.jboss.windup.rules,windup-rules-java,2.3.0.Final" />
        </dependencies>
        <sourceTechnology id="eap" versionRange="[6,7)" />
        <targetTechnology id="eap" versionRange="[7,)" />
    </metadata>

    <rules>
        <rule id="eap6-08000">
            <when>
                <filecontent pattern="remote://{node}:{port}" filename="{*}.{extension}" />
            </when>
            <perform>
                <hint title="Remote JNDI Provider URL has changed in EAP 7" effort="1" category-id="mandatory">
                    <message>
                        Default Remote JNDI Provider URL has changed in EAP 7. External applications using JNDI to lookup remote resources, for instance an EJB or a JMS Queue,
                        may need to change the value for the JNDI InitialContext environment's property named `java.naming.provider.url`.
                        The default URL scheme is now **http-remoting** instead of **remote**, and the default URL port is now **8080** instead of **4447**.

                        As an example, consider the application server host is localhost, then clients previously accessing EAP 6 would use

                        ```
                        java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
                        java.naming.provider.url=remote://localhost:4447
                        ```

                        while clients now accessing EAP 7 should use instead

                        ```
                        java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
                        java.naming.provider.url=http-remoting://localhost:8080
                        ```

                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#migrate_default_remote_url_connector_and_port_changes" title="Remote JNDI URL in EAP 7" />
                    <tag>jndi</tag>
                    <tag>configuration</tag>
                    <tag>ejb</tag>
                </hint>
            </perform>
            <where param="node">
                <matches pattern=".*"/>
            </where>
            <where param="port">
               <matches pattern="\d*"/>
            </where>
            <where param="extension">
                <matches pattern="(java|properties|xml)"/>
            </where>
        </rule>
        <rule id="eap6-08001">
            <when>
                    <filecontent pattern="remote.connection.{*}.port{portnumber}" filename="jboss-ejb-client.properties" />
            </when>
            <perform>
                <hint title="jboss-ejb-client.properties - Default Remote Connection Port changes" effort="1" category-id="mandatory">
                    <message>
                        The default remote connection port has changed in **jboss-ejb-client.properties** from '4447' to '8080'.

                        In EAP 6, the jboss-ejb-client.properties file looked similar to the following:

                        ```
                        remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
                        remote.connections=default
                        remote.connection.default.host=localhost
                        remote.connection.default.port=4447
                        remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
                        ```

                        In EAP 7, the properties file looks like this:

                        ```
                        remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
                        remote.connections=default
                        remote.connection.default.host=localhost
                        remote.connection.default.port=8080
                        remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
                        ```

                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#update_the_default_remote_connection_port" title="Remote JNDI URL in EAP 7" />
                    <tag>jndi</tag>
                    <tag>configuration</tag>
                    <tag>ejb</tag>
                </hint>
            </perform>
            <where param="portnumber">
               <matches pattern='(.*(?!8080)\d{4})'/>
            </where>
        </rule>
        <rule id="eap6-08002">
            <when>
                    <filecontent pattern="remote.connection.{*}.port{portnumber}" filename="{*}.java" />
            </when>
            <perform>
                <hint title="Java - Default Remote Connection Port has changed in EAP 7" effort="1" category-id="mandatory">
                    <message>
                        The default remote connection port has changed from '4447' to '8080'.

                        In EAP 6, Remote EJB client Java code looks like the following:

                        ```java
                        Properties properties = new Properties();
                        properties.put("remote.connection.default.port", "4447");
                        ```

                        In EAP 7, the Java client code looks like this:

                        ```java
                        Properties properties = new Properties();
                        properties.put("remote.connection.default.port", "8080");
                        ```

                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#update_the_default_remote_connection_port" title="Remote JNDI URL in EAP 7" />
                    <tag>jndi</tag>
                    <tag>configuration</tag>
                    <tag>ejb</tag>
                </hint>
            </perform>
            <where param="portnumber">
               <matches pattern='(.*(?!8080)\d{4})'/>
            </where>
        </rule>
        <rule id="eap6-11000">
            <when>
                <or>
                    <!-- when analyzing compiled classes -->
                    <filecontent filename="{*}.java" pattern="com.sun.faces.facelets.FACELET_CONTEXT"/>
                    <!-- when analyzing Java sources -->
                    <filecontent filename="{*}.java" pattern="FaceletContext.FACELET_CONTEXT_KEY"/>
                </or>
            </when>
            <perform>
                <hint title="Value of JSF FaceletContext.FACELET_CONTEXT_KEY has changed" effort="1" category-id="mandatory">
                    <message>
                        The value of JSF constant `FaceletContext.FACELET_CONTEXT_KEY` has changed between JSF 2.1 and 2.2.
                        The variable is a compile-time constant expression, so when the program was originally compiled,
                        the reference to `FACELET_CONTEXT_KEY` was replaced by its value during compilation.
                        The application must be recompiled so that the reference to `FACELET_CONTEXT_KEY` is replaced by its new value.
                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#compatibility_issue_between_jsf_2_1_and_jsf_2_2" title="Compatibility Issue Between JSF 2.1 and JSF 2.2"/>
                    <link href="https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1257" title="JAVASERVERFACES_SPEC_PUBLIC-1257"/>
                    <tag>jsf</tag>
                </hint>
            </perform>
        </rule>
    </rules>
</ruleset><commit_msg>Updated title for JSF rule<commit_after><?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="eap6"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">

    <metadata>
        <description>
            This ruleset provides analysis of JBoss EAP 6 xml files that may require
            individual attention when migrating to JBoss EAP 7+.
        </description>
        <dependencies>
            <addon id="org.jboss.windup.rules,windup-rules-javaee,2.3.0.Final" />
            <addon id="org.jboss.windup.rules,windup-rules-java,2.3.0.Final" />
        </dependencies>
        <sourceTechnology id="eap" versionRange="[6,7)" />
        <targetTechnology id="eap" versionRange="[7,)" />
    </metadata>

    <rules>
        <rule id="eap6-08000">
            <when>
                <filecontent pattern="remote://{node}:{port}" filename="{*}.{extension}" />
            </when>
            <perform>
                <hint title="Remote JNDI Provider URL has changed in EAP 7" effort="1" category-id="mandatory">
                    <message>
                        Default Remote JNDI Provider URL has changed in EAP 7. External applications using JNDI to lookup remote resources, for instance an EJB or a JMS Queue,
                        may need to change the value for the JNDI InitialContext environment's property named `java.naming.provider.url`.
                        The default URL scheme is now **http-remoting** instead of **remote**, and the default URL port is now **8080** instead of **4447**.

                        As an example, consider the application server host is localhost, then clients previously accessing EAP 6 would use

                        ```
                        java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
                        java.naming.provider.url=remote://localhost:4447
                        ```

                        while clients now accessing EAP 7 should use instead

                        ```
                        java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
                        java.naming.provider.url=http-remoting://localhost:8080
                        ```

                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#migrate_default_remote_url_connector_and_port_changes" title="Remote JNDI URL in EAP 7" />
                    <tag>jndi</tag>
                    <tag>configuration</tag>
                    <tag>ejb</tag>
                </hint>
            </perform>
            <where param="node">
                <matches pattern=".*"/>
            </where>
            <where param="port">
               <matches pattern="\d*"/>
            </where>
            <where param="extension">
                <matches pattern="(java|properties|xml)"/>
            </where>
        </rule>
        <rule id="eap6-08001">
            <when>
                    <filecontent pattern="remote.connection.{*}.port{portnumber}" filename="jboss-ejb-client.properties" />
            </when>
            <perform>
                <hint title="jboss-ejb-client.properties - Default Remote Connection Port changes" effort="1" category-id="mandatory">
                    <message>
                        The default remote connection port has changed in **jboss-ejb-client.properties** from '4447' to '8080'.

                        In EAP 6, the jboss-ejb-client.properties file looked similar to the following:

                        ```
                        remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
                        remote.connections=default
                        remote.connection.default.host=localhost
                        remote.connection.default.port=4447
                        remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
                        ```

                        In EAP 7, the properties file looks like this:

                        ```
                        remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
                        remote.connections=default
                        remote.connection.default.host=localhost
                        remote.connection.default.port=8080
                        remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
                        ```

                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#update_the_default_remote_connection_port" title="Remote JNDI URL in EAP 7" />
                    <tag>jndi</tag>
                    <tag>configuration</tag>
                    <tag>ejb</tag>
                </hint>
            </perform>
            <where param="portnumber">
               <matches pattern='(.*(?!8080)\d{4})'/>
            </where>
        </rule>
        <rule id="eap6-08002">
            <when>
                    <filecontent pattern="remote.connection.{*}.port{portnumber}" filename="{*}.java" />
            </when>
            <perform>
                <hint title="Java - Default Remote Connection Port has changed in EAP 7" effort="1" category-id="mandatory">
                    <message>
                        The default remote connection port has changed from '4447' to '8080'.

                        In EAP 6, Remote EJB client Java code looks like the following:

                        ```java
                        Properties properties = new Properties();
                        properties.put("remote.connection.default.port", "4447");
                        ```

                        In EAP 7, the Java client code looks like this:

                        ```java
                        Properties properties = new Properties();
                        properties.put("remote.connection.default.port", "8080");
                        ```

                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#update_the_default_remote_connection_port" title="Remote JNDI URL in EAP 7" />
                    <tag>jndi</tag>
                    <tag>configuration</tag>
                    <tag>ejb</tag>
                </hint>
            </perform>
            <where param="portnumber">
               <matches pattern='(.*(?!8080)\d{4})'/>
            </where>
        </rule>
        <rule id="eap6-11000">
            <when>
                <or>
                    <!-- when analyzing compiled classes -->
                    <filecontent filename="{*}.java" pattern="com.sun.faces.facelets.FACELET_CONTEXT"/>
                    <!-- when analyzing Java sources -->
                    <filecontent filename="{*}.java" pattern="FaceletContext.FACELET_CONTEXT_KEY"/>
                </or>
            </when>
            <perform>
                <hint title="JSF FaceletContext.FACELET_CONTEXT_KEY changed value" effort="1" category-id="mandatory">
                    <message>
                        The value of JSF constant `FaceletContext.FACELET_CONTEXT_KEY` has changed between JSF 2.1 and 2.2.
                        The variable is a compile-time constant expression, so when the program was originally compiled,
                        the reference to `FACELET_CONTEXT_KEY` was replaced by its value during compilation.
                        The application must be recompiled so that the reference to `FACELET_CONTEXT_KEY` is replaced by its new value.
                    </message>
                    <link href="https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/migration-guide/#compatibility_issue_between_jsf_2_1_and_jsf_2_2" title="Compatibility Issue Between JSF 2.1 and JSF 2.2"/>
                    <link href="https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1257" title="JAVASERVERFACES_SPEC_PUBLIC-1257"/>
                    <tag>jsf</tag>
                </hint>
            </perform>
        </rule>
    </rules>
</ruleset>
{'fraction_non_alphanumeric': 0.11019640127013995, 'fraction_numerical': 0.01705280489239092, 'mean_word_length': 1.6080355773654347, 'pattern_counts': {'":': 0, '<': 211, '<?xml version=': 2, '>': 211, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 10}, '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': '6600477', 'n_tokens_mistral': 4677, 'n_tokens_neox': 4220, 'n_words': 931}