<?xml version="1.0" encoding="utf-8"?>

<ruleset name="net.ranides.assira.standard"
    xmlns="http://pmd.sf.net/ruleset/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">

    <description>
    Assira Quality Policy - Default Inherited Rules
    </description>
    
    <rule ref="rulesets/java/basic.xml/JumbledIncrementer"/>
    <rule ref="rulesets/java/basic.xml/ForLoopShouldBeWhileLoop"/>
    <rule ref="rulesets/java/basic.xml/OverrideBothEqualsAndHashcode"/>
    <rule ref="rulesets/java/basic.xml/DoubleCheckedLocking"/>
    <rule ref="rulesets/java/basic.xml/ReturnFromFinallyBlock"/>
    <rule ref="rulesets/java/basic.xml/UnconditionalIfStatement"/>
    <rule ref="rulesets/java/basic.xml/BooleanInstantiation"/>
    <rule ref="rulesets/java/basic.xml/CollapsibleIfStatements"/>
    <rule ref="rulesets/java/basic.xml/ClassCastExceptionWithToArray"/>
    <rule ref="rulesets/java/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
    <rule ref="rulesets/java/basic.xml/MisplacedNullCheck"/>
    <rule ref="rulesets/java/basic.xml/BrokenNullCheck"/>
    <rule ref="rulesets/java/basic.xml/AvoidThreadGroup"/>
    <rule ref="rulesets/java/basic.xml/AvoidUsingOctalValues"/>
    <rule ref="rulesets/java/basic.xml/AvoidUsingHardCodedIP"/>
    <rule ref="rulesets/java/basic.xml/CheckResultSet"/>
    <rule ref="rulesets/java/basic.xml/AvoidMultipleUnaryOperators"/>
    <rule ref="rulesets/java/basic.xml/BigIntegerInstantiation"/>
    <rule ref="rulesets/java/basic.xml/AvoidUsingHardCodedIP"/>
    <rule ref="rulesets/java/basic.xml/CheckResultSet"/>
    <rule ref="rulesets/java/basic.xml/ExtendsObject"/>
    <rule ref="rulesets/java/basic.xml/CheckSkipResult"/>
    <rule ref="rulesets/java/basic.xml/AvoidBranchingStatementAsLastInLoop"/>
    <rule ref="rulesets/java/basic.xml/DontCallThreadRun"/>
    
    <rule ref="rulesets/java/braces.xml"/>
    
    <rule ref="rulesets/java/clone.xml"/>  
    
    <rule ref="rulesets/java/codesize.xml/NPathComplexity" />
    <rule ref="rulesets/java/codesize.xml/ExcessiveMethodLength" />
    <rule ref="rulesets/java/codesize.xml/ExcessiveClassLength">
        <properties>
            <property name="minimum" value="2000"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/codesize.xml/ExcessiveParameterList">
        <properties>
            <property name="minimum" value="7"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/codesize.xml/StdCyclomaticComplexity" name="CyclomaticComplexity">
        <properties>
            <property name="showClassesComplexity" value="false"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/codesize.xml/NcssMethodCount">
        <properties>
            <property name="minimum" value="50"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/codesize.xml/NcssTypeCount">
        <properties>
            <property name="minimum" value="2000"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/codesize.xml/NcssConstructorCount">
        <properties>
            <property name="minimum" value="50"/>
        </properties>
    </rule>
    
    <rule ref="rulesets/java/controversial.xml/DontImportSun"/>
    <rule ref="rulesets/java/controversial.xml/UnnecessaryParentheses"/>
    <rule ref="rulesets/java/controversial.xml/DoNotCallGarbageCollectionExplicitly"/>
    <rule ref="rulesets/java/controversial.xml/AvoidFinalLocalVariable"/>

    <rule ref="rulesets/java/coupling.xml/CouplingBetweenObjects">
        <properties>
            <property name="threshold" value="15"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/coupling.xml/ExcessiveImports">
        <properties>
            <property name="minimum" value="30"/>
        </properties>
    </rule>
    
    <rule ref="rulesets/java/design.xml/AccessorClassGeneration" />
    <rule ref="rulesets/java/design.xml/AssignmentToNonFinalStatic" />
    <rule ref="rulesets/java/design.xml/AvoidDeeplyNestedIfStmts" />
    <rule ref="rulesets/java/design.xml/AvoidSynchronizedAtMethodLevel" />
<!--<rule ref="rulesets/java/design.xml/AvoidReassigningParameters" />-->
    <rule ref="rulesets/java/design.xml/BadComparison" />
    <rule ref="rulesets/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" />
    <rule ref="rulesets/java/design.xml/CloseResource" />
    <rule ref="rulesets/java/design.xml/CompareObjectsWithEquals" />
    <rule ref="rulesets/java/design.xml/ConstructorCallsOverridableMethod" />
    <rule ref="rulesets/java/design.xml/DefaultLabelNotLastInSwitchStmt" />
    <rule ref="rulesets/java/design.xml/EqualsNull" />
    <rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic" />
<!--<rule ref="rulesets/java/design.xml/GodClass" />-->
    <rule ref="rulesets/java/design.xml/IdempotentOperations" />
    <rule ref="rulesets/java/design.xml/ImmutableField" />
    <rule ref="rulesets/java/design.xml/InstantiationToGetClass" />
    <rule ref="rulesets/java/design.xml/MissingBreakInSwitch" />
    <rule ref="rulesets/java/design.xml/MissingStaticMethodInNonInstantiatableClass" name="PackageClass" />
    <rule ref="rulesets/java/design.xml/NonCaseLabelInSwitchStatement" />
    <rule ref="rulesets/java/design.xml/NonThreadSafeSingleton" />
    <rule ref="rulesets/java/design.xml/NonStaticInitializer" />
    <rule ref="rulesets/java/design.xml/OptimizableToArrayCall" />
    <rule ref="rulesets/java/design.xml/PositionLiteralsFirstInComparisons" />
    <rule ref="rulesets/java/design.xml/PositionLiteralsFirstInCaseInsensitiveComparisons" />
    <rule ref="rulesets/java/design.xml/ReturnEmptyArrayRatherThanNull" />
    <rule ref="rulesets/java/design.xml/SimpleDateFormatNeedsLocale" />
    <rule ref="rulesets/java/design.xml/SimplifyBooleanReturns" />
    <rule ref="rulesets/java/design.xml/SimplifyBooleanExpressions" />
    <rule ref="rulesets/java/design.xml/SimplifyConditional" />
    <rule ref="rulesets/java/design.xml/SingularField" />
    <rule ref="rulesets/java/design.xml/SwitchDensity">
        <properties>
            <property name="minimum" value="5"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/design.xml/SwitchStmtsShouldHaveDefault"/>
    <rule ref="rulesets/java/design.xml/TooFewBranchesForASwitchStatement">
        <properties>
            <property name="minimumNumberCaseForASwitch" value="3"/>
        </properties>
    </rule>
<!--<rule ref="rulesets/java/design.xml/UncommentedEmptyMethodBody" />-->
    <rule ref="rulesets/java/design.xml/UnnecessaryLocalBeforeReturn" />
    <rule ref="rulesets/java/design.xml/UnsynchronizedStaticDateFormatter" />
    <rule ref="rulesets/java/design.xml/UseCollectionIsEmpty" />
    <rule ref="rulesets/java/design.xml/UseLocaleWithCaseConversions" />
    <rule ref="rulesets/java/design.xml/UseNotifyAllInsteadOfNotify" />
    <rule ref="rulesets/java/design.xml/UseUtilityClass" />
    
    
    
    
    
    
    <rule ref="rulesets/java/empty.xml/EmptyCatchBlock"/>
    <rule ref="rulesets/java/empty.xml/EmptyIfStmt"/>
    <rule ref="rulesets/java/empty.xml/EmptyWhileStmt"/>
    <rule ref="rulesets/java/empty.xml/EmptyTryBlock"/>
    <rule ref="rulesets/java/empty.xml/EmptyFinallyBlock"/>
    <rule ref="rulesets/java/empty.xml/EmptySwitchStatements"/>
    <rule ref="rulesets/java/empty.xml/EmptySynchronizedBlock"/>
    <rule ref="rulesets/java/empty.xml/EmptyStaticInitializer"/>
    <rule ref="rulesets/java/empty.xml/EmptyStatementNotInLoop"/>
    <rule ref="rulesets/java/empty.xml/EmptyInitializer"/>
    
    <rule ref="rulesets/java/finalizers.xml" />
    
    <rule ref="rulesets/java/imports.xml/DuplicateImports" />
    <rule ref="rulesets/java/imports.xml/DontImportJavaLang" />
    <rule ref="rulesets/java/imports.xml/UnusedImports" />
    <rule ref="rulesets/java/imports.xml/ImportFromSamePackage" />
    <rule ref="rulesets/java/imports.xml/TooManyStaticImports">
        <properties>
            <property name="maximumStaticImports" value="3"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/imports.xml/UnnecessaryFullyQualifiedName" />

    <rule ref="rulesets/java/javabeans.xml/MissingSerialVersionUID" />

    <rule ref="rulesets/java/junit.xml/JUnitStaticSuite" />
    <rule ref="rulesets/java/junit.xml/JUnitSpelling" />
    <rule ref="rulesets/java/junit.xml/JUnitTestsShouldIncludeAssert" />
    <rule ref="rulesets/java/junit.xml/TestClassWithoutTestCases" />
    <rule ref="rulesets/java/junit.xml/SimplifyBooleanAssertion" />
    <rule ref="rulesets/java/junit.xml/JUnitTestContainsTooManyAsserts" >
        <properties>
            <property name="maximumAsserts" value="20"/>
        </properties>
    </rule>

    <rule ref="rulesets/java/logging-java.xml/LoggerIsNotStaticFinal" />
    <rule ref="rulesets/java/logging-java.xml/SystemPrintln" />
    <rule ref="rulesets/java/logging-jakarta-commons.xml/ProperLogger">
        <properties>
            <property name="staticLoggerName" value="LOGGER"/>
        </properties>
    </rule>

    <rule ref="rulesets/java/migrating.xml/ReplaceVectorWithList" />
    <rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap" />
    <rule ref="rulesets/java/migrating.xml/ReplaceEnumerationWithIterator" />
    <rule ref="rulesets/java/migrating.xml/AvoidEnumAsIdentifier" />
    <rule ref="rulesets/java/migrating.xml/AvoidAssertAsIdentifier" />
    <rule ref="rulesets/java/migrating.xml/IntegerInstantiation" />
    <rule ref="rulesets/java/migrating.xml/ByteInstantiation" />
    <rule ref="rulesets/java/migrating.xml/ShortInstantiation" />
    <rule ref="rulesets/java/migrating.xml/LongInstantiation" />
    <rule ref="rulesets/java/migrating.xml/JUnit4TestShouldUseBeforeAnnotation" />
    <rule ref="rulesets/java/migrating.xml/JUnit4TestShouldUseAfterAnnotation" />
    <rule ref="rulesets/java/migrating.xml/JUnit4TestShouldUseTestAnnotation" />
    <rule ref="rulesets/java/migrating.xml/JUnit4SuitesShouldUseSuiteAnnotation" />
    

    <rule ref="rulesets/java/naming.xml/ClassNamingConventions" />
    <rule ref="rulesets/java/naming.xml/MethodWithSameNameAsEnclosingClass" />
    <rule ref="rulesets/java/naming.xml/SuspiciousHashcodeMethodName" />
    <rule ref="rulesets/java/naming.xml/SuspiciousConstantFieldName" />
    <rule ref="rulesets/java/naming.xml/SuspiciousEqualsMethodName" />
    <rule ref="rulesets/java/naming.xml/AvoidFieldNameMatchingTypeName" />
    <rule ref="rulesets/java/naming.xml/NoPackage" />
    <rule ref="rulesets/java/naming.xml/PackageCase" />


    <rule ref="rulesets/java/optimizations.xml/AddEmptyString" />
    <rule ref="rulesets/java/optimizations.xml/AvoidArrayLoops" />
    <rule ref="rulesets/java/optimizations.xml/PrematureDeclaration" />
    <rule ref="rulesets/java/optimizations.xml/UnnecessaryWrapperObjectCreation" />
    <rule ref="rulesets/java/optimizations.xml/UseArraysAsList" />
    <rule ref="rulesets/java/optimizations.xml/UseArrayListInsteadOfVector" />
    <rule ref="rulesets/java/optimizations.xml/UseStringBufferForStringAppends" />
    



    <rule ref="rulesets/java/strictexception.xml/AvoidCatchingThrowable" />
    <rule ref="rulesets/java/strictexception.xml/ExceptionAsFlowControl" />
    <rule ref="rulesets/java/strictexception.xml/AvoidCatchingNPE" />
    <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNullPointerException" />
    <rule ref="rulesets/java/strictexception.xml/AvoidThrowingRawExceptionTypes" />
    <rule ref="rulesets/java/strictexception.xml/DoNotThrowExceptionInFinally" />
    <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNewInstanceOfSameException" />
    <rule ref="rulesets/java/strictexception.xml/AvoidRethrowingException" />

    
    <rule ref="rulesets/java/strings.xml/AvoidDuplicateLiterals">
        <properties>
            <property name="skipAnnotations" value="true"/>
            <property name="minimumLength" value="8"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/strings.xml/StringInstantiation" />
    <rule ref="rulesets/java/strings.xml/StringToString" />
    <rule ref="rulesets/java/strings.xml/InefficientStringBuffering" />
    <rule ref="rulesets/java/strings.xml/UnnecessaryCaseChange" />
    <rule ref="rulesets/java/strings.xml/UseStringBufferLength" />
    <rule ref="rulesets/java/strings.xml/AppendCharacterWithChar" />
    <rule ref="rulesets/java/strings.xml/ConsecutiveLiteralAppends" />
    <rule ref="rulesets/java/strings.xml/InefficientEmptyStringCheck" />
    <rule ref="rulesets/java/strings.xml/UselessStringValueOf" />
    <rule ref="rulesets/java/strings.xml/StringBufferInstantiationWithChar" />
    <rule ref="rulesets/java/strings.xml/UseEqualsToCompareStrings" />
    <rule ref="rulesets/java/strings.xml/AvoidStringBufferField" />

    <rule ref="rulesets/java/sunsecure.xml" />
    
    <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField" />
    <rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable" />
    <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod" />
    <rule ref="rulesets/java/unusedcode.xml/UnusedModifier" />
    
    <rule ref="rulesets/java/unnecessary.xml/UnnecessaryConversionTemporary"/>
    <rule ref="rulesets/java/unnecessary.xml/UnnecessaryFinalModifier"/>
    <rule ref="rulesets/java/unnecessary.xml/UselessOperationOnImmutable"/>
    <rule ref="rulesets/java/unnecessary.xml/UnusedNullCheckInEquals"/>
    
    <rule ref="rulesets/java/assira.custom.xml/TooManyDifferentMethods">
        <properties>
            <property name="maximum" value="15"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/assira.custom.xml/TooManyPublicMethods">
        <properties>
            <property name="maximum" value="40"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/assira.custom.xml/LongVar"/>
    <rule ref="rulesets/java/assira.custom.xml/FieldNameRules"/>
    <rule ref="rulesets/java/assira.custom.xml/MethodNameRules"/>
    <rule ref="rulesets/java/assira.custom.xml/InvalidUtilityClass"/>
    <rule ref="rulesets/java/assira.custom.xml/TooManyParams">
        <properties>
            <property name="maximum" value="5"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/assira.custom.xml/AvoidThreadGroup"/>
    <rule ref="rulesets/java/assira.custom.xml/UseSingleton"/>
    <rule ref="rulesets/java/assira.custom.xml/TooManyFields">
        <properties>
            <property name="maximum" value="15"/>
        </properties>
    </rule>
    <rule ref="rulesets/java/assira.custom.xml/UnusedParameter"/>

</ruleset>