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

<!--
  ~ ADAL - A set of Android libraries to help speed up Android development.
  ~
  ~ Copyright (c) 2017 ADAL
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining
  ~ a copy of this software and associated documentation files (the
  ~ "Software"), to deal in the Software without restriction, including
  ~ without limitation the rights to use, copy, modify, merge, publish,
  ~ distribute, sublicense, and/or sell copies of the Software, and to
  ~ permit persons to whom the Software is furnished to do so, subject to
  ~ the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be
  ~ included in all copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  ~ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  ~ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  ~ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  ~ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  ~ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  -->

<!--
PMD Configuration
Severity: HARD
-->
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ruleset"
         xmlns="http://pmd.sf.net/ruleset/1.0.0"
         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">

    <description>POM rule set file</description>

    <rule ref="rulesets/java/android.xml"/>

    <rule ref="rulesets/java/basic.xml"/>

    <rule ref="rulesets/java/braces.xml"/>

    <rule ref="rulesets/java/clone.xml"/>

    <rule ref="rulesets/java/codesize.xml">
        <exclude name="ModifiedCyclomaticComplexity"/>
        <exclude name="StdCyclomaticComplexity"/>
    </rule>
    <rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
        <properties>
            <property name="reportLevel" value="20"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/codesize.xml/TooManyMethods">
        <properties>
            <property name="maxmethods" value="25"/>
        </properties>
    </rule>

    <rule ref="rulesets/java/comments.xml">
        <exclude name="CommentRequired"/>
        <exclude name="CommentSize"/>
        <exclude name="CommentDefaultAccessModifier"/>
    </rule>

    <rule ref="rulesets/java/controversial.xml">
        <!-- while ((x = update()) != null) { process(x); } -->
        <exclude name="AssignmentInOperand"/>
        <exclude name="AtLeastOneConstructor"/>
        <exclude name="AvoidLiteralsInIfCondition"/>
        <exclude name="AvoidPrefixingMethodParameters"/>
        <exclude name="DataflowAnomalyAnalysis"/>
        <exclude name="NullAssignment"/>
        <exclude name="OnlyOneReturn"/>
        <exclude name="AvoidFinalLocalVariable"/>
        <exclude name="UseConcurrentHashMap"/>
    </rule>

    <rule ref="rulesets/java/coupling.xml">
        <exclude name="ExcessiveImports"/>
        <exclude name="LawOfDemeter"/>
        <exclude name="LoosePackageCoupling"/>
    </rule>

    <rule ref="rulesets/java/design.xml">
        <exclude name="AvoidReassigningParameters"/>
        <!-- if (x != y) { short code block } else { long code block } -->
        <exclude name="ConfusingTernary"/>
        <exclude name="SwitchStmtsShouldHaveDefault"/>
        <!-- Android listeners contain a lot of such switch statements -->
        <exclude name="TooFewBranchesForASwitchStatement"/>
    </rule>

    <rule ref="rulesets/java/empty.xml"/>

    <rule ref="rulesets/java/finalizers.xml"/>

    <rule ref="rulesets/java/imports.xml"/>

    <rule ref="rulesets/java/junit.xml"/>

    <rule ref="rulesets/java/logging-jakarta-commons.xml" />

    <rule ref="rulesets/java/logging-java.xml" />

    <rule ref="rulesets/java/migrating.xml"/>

    <rule ref="rulesets/java/naming.xml">
        <exclude name="AbstractNaming"/>
        <exclude name="LongVariable"/>
        <exclude name="ShortClassName"/>
        <exclude name="ShortVariable"/>
    </rule>

    <rule ref="rulesets/java/optimizations.xml">
        <exclude name="AvoidInstantiatingObjectsInLoops"/>
        <exclude name="LocalVariableCouldBeFinal"/>
        <exclude name="MethodArgumentCouldBeFinal"/>
    </rule>

    <rule ref="rulesets/java/strictexception.xml"/>

    <rule ref="rulesets/java/strings.xml"/>

    <rule ref="rulesets/java/typeresolution.xml">
        <exclude name="LooseCoupling"/>
    </rule>

    <rule ref="rulesets/java/unnecessary.xml">
        <exclude name="UselessOverridingMethod"/>
        <exclude name="UselessParentheses"/>
        <exclude name="UnnecessaryModifier"/>
    </rule>

    <rule ref="rulesets/java/unusedcode.xml"/>

</ruleset><commit_msg>[support] Updated config from pmd.<commit_after><?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!--
  ~ ADAL - A set of Android libraries to help speed up Android development.
  ~
  ~ Copyright (c) 2017 ADAL
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining
  ~ a copy of this software and associated documentation files (the
  ~ "Software"), to deal in the Software without restriction, including
  ~ without limitation the rights to use, copy, modify, merge, publish,
  ~ distribute, sublicense, and/or sell copies of the Software, and to
  ~ permit persons to whom the Software is furnished to do so, subject to
  ~ the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be
  ~ included in all copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  ~ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  ~ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  ~ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  ~ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  ~ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  ~ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  -->
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ruleset" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
    <description>POM rule set file</description>
    <rule ref="category/java/bestpractices.xml">
        <exclude name="AvoidReassigningParameters"/>
        <exclude name="GuardLogStatement"/>
        <exclude name="LooseCoupling"/>
        <exclude name="SwitchStmtsShouldHaveDefault"/>
    </rule>
    <rule ref="category/java/codestyle.xml">
        <exclude name="AbstractNaming"/>
        <exclude name="AtLeastOneConstructor"/>
        <exclude name="AvoidFinalLocalVariable"/>
        <exclude name="AvoidPrefixingMethodParameters"/>
        <exclude name="CommentDefaultAccessModifier"/>
        <exclude name="ConfusingTernary"/>
        <exclude name="LocalVariableCouldBeFinal"/>
        <exclude name="LongVariable"/>
        <exclude name="MethodArgumentCouldBeFinal"/>
        <exclude name="OnlyOneReturn"/>
        <exclude name="ShortClassName"/>
        <exclude name="ShortVariable"/>
        <exclude name="UnnecessaryModifier"/>
        <exclude name="UselessParentheses"/>
    </rule>
    <rule ref="category/java/design.xml">
        <exclude name="ExcessiveImports"/>
        <exclude name="LawOfDemeter"/>
        <exclude name="LoosePackageCoupling"/>
        <exclude name="UselessOverridingMethod"/>
    </rule>
    <rule ref="category/java/design.xml/CyclomaticComplexity">
        <properties>
            <property name="reportLevel" value="20"/>
        </properties>
    </rule>
    <rule ref="category/java/design.xml/TooManyMethods">
        <properties>
            <property name="maxmethods" value="25"/>
        </properties>
    </rule>
    <rule ref="category/java/documentation.xml">
        <exclude name="CommentRequired"/>
        <exclude name="CommentSize"/>
    </rule>
    <rule ref="category/java/errorprone.xml">
        <exclude name="AssignmentInOperand"/>
        <exclude name="AvoidLiteralsInIfCondition"/>
        <exclude name="DataflowAnomalyAnalysis"/>
        <exclude name="NullAssignment"/>
    </rule>
    <rule ref="category/java/multithreading.xml">
        <exclude name="UseConcurrentHashMap"/>
    </rule>
    <rule ref="category/java/performance.xml">
        <exclude name="AvoidInstantiatingObjectsInLoops"/>
        <exclude name="TooFewBranchesForASwitchStatement"/>
    </rule>
</ruleset>
{'fraction_non_alphanumeric': 0.1287758346581876, 'fraction_numerical': 0.0053372700431523964, 'mean_word_length': 3.2669573643410854, 'pattern_counts': {'":': 0, '<': 148, '<?xml version=': 2, '>': 148, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 42}, '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': '3705705', 'n_tokens_mistral': 2628, 'n_tokens_neox': 2463, 'n_words': 652}