]> iEval git - unical.git/commitdiff
Clean up
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 13 Jun 2013 14:34:40 +0000 (17:34 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 13 Jun 2013 14:34:40 +0000 (17:34 +0300)
.pmd
src/ro/ieval/unical/AddEventActivity.java
src/ro/ieval/unical/TrivialFragment.java
src/ro/ieval/unical/Utils.java

diff --git a/.pmd b/.pmd
index 9794d09dba6031302ac50e607752038696265845..6a82507be493841d7d23f918bfef691f7a735dc0 100644 (file)
--- a/.pmd
+++ b/.pmd
     <ruleSetFile>.ruleset</ruleSetFile>
     <rules>
         <rule>
-            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidMultipleUnaryOperators</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThreadGroup</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AbstractNaming</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingHardCodedIP</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingOctalValues</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>BigIntegerInstantiation</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>BooleanInstantiation</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
         </rule>
         <rule>
-            <name>BrokenNullCheck</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>CheckResultSet</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AssignmentToNonFinalStatic</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ClassCastExceptionWithToArray</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>CollapsibleIfStatements</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>DoubleCheckedLocking</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyCatchBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyFinallyBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyIfStmt</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyInitializer</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyStatementNotInLoop</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidConstantsInterface</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyStaticInitializer</name>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
             <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptySwitchStatements</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidDeeplyNestedIfStmts</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptySynchronizedBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyTryBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyWhileStmt</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>ForLoopShouldBeWhileLoop</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>JumbledIncrementer</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>MisplacedNullCheck</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidFinalLocalVariable</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>OverrideBothEqualsAndHashcode</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidInstanceofChecksInCatchClause</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ReturnFromFinallyBlock</name>
+            <name>AvoidMultipleUnaryOperators</name>
             <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UnconditionalIfStatement</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryConversionTemporary</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidProtectedFieldInFinalClass</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryFinalModifier</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidReassigningParameters</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryReturn</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedNullCheckInEquals</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>UselessOperationOnImmutable</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>AvoidSynchronizedAtMethodLevel</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UselessOverridingMethod</name>
+            <name>AvoidThreadGroup</name>
             <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>CloneThrowsCloneNotSupportedException</name>
-            <ruleset>Clone Implementation Rules</ruleset>
-        </rule>
-        <rule>
-            <name>ProperCloneImplementation</name>
-            <ruleset>Clone Implementation Rules</ruleset>
-        </rule>
-        <rule>
-            <name>CyclomaticComplexity</name>
-            <ruleset>Code Size Rules</ruleset>
-        </rule>
-        <rule>
-            <name>ExcessiveClassLength</name>
-            <ruleset>Code Size Rules</ruleset>
-        </rule>
-        <rule>
-            <name>ExcessiveMethodLength</name>
-            <ruleset>Code Size Rules</ruleset>
-        </rule>
-        <rule>
-            <name>ExcessiveParameterList</name>
-            <ruleset>Code Size Rules</ruleset>
-        </rule>
-        <rule>
-            <name>ExcessivePublicCount</name>
-            <ruleset>Code Size Rules</ruleset>
-        </rule>
-        <rule>
-            <name>NcssConstructorCount</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>AvoidThrowingNewInstanceOfSameException</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>NcssMethodCount</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>NcssTypeCount</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>TooManyFields</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>TooManyMethods</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AssignmentInOperand</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AtLeastOneConstructor</name>
+            <name>AvoidUsingShortType</name>
             <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidAccessibilityAlteration</name>
+            <name>AvoidUsingVolatile</name>
             <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidFinalLocalVariable</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>BadComparison</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingNativeCode</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingShortType</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingVolatile</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
             <name>BooleanInversion</name>
             <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>CallSuperInConstructor</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>DefaultPackage</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <name>CallSuperInConstructor</name>
             <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>DontImportSun</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>NullAssignment</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>SuspiciousOctalEscape</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryConstructor</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryParentheses</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedModifier</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
         </rule>
         <rule>
-            <name>CouplingBetweenObjects</name>
-            <ruleset>Coupling Rules</ruleset>
+            <name>CloseResource</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ExcessiveImports</name>
-            <ruleset>Coupling Rules</ruleset>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AbstractClassWithoutAbstractMethod</name>
+            <name>CompareObjectsWithEquals</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AbstractClassWithoutAnyMethod</name>
+            <name>ConfusingTernary</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AccessorClassGeneration</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>AssignmentToNonFinalStatic</name>
+            <name>ConstructorCallsOverridableMethod</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidConstantsInterface</name>
-            <ruleset>Design Rules</ruleset>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidDeeplyNestedIfStmts</name>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidInstanceofChecksInCatchClause</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidProtectedFieldInFinalClass</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidReassigningParameters</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DoNotCallSystemExit</name>
+            <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidSynchronizedAtMethodLevel</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DoNotExtendJavaLangError</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>BadComparison</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DoNotThrowExceptionInFinally</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DoNotUseThreads</name>
+            <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
-            <name>CloseResource</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>CompareObjectsWithEquals</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>ConfusingTernary</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>ConstructorCallsOverridableMethod</name>
-            <ruleset>Design Rules</ruleset>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>DefaultLabelNotLastInSwitchStmt</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>EqualsNull</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalFieldCouldBeStatic</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>IdempotentOperations</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyInitializer</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>ImmutableField</name>
+            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>InstantiationToGetClass</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>MissingBreakInSwitch</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>MissingStaticMethodInNonInstantiatableClass</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>NonCaseLabelInSwitchStatement</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>NonStaticInitializer</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>NonThreadSafeSingleton</name>
-            <ruleset>Design Rules</ruleset>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>OptimizableToArrayCall</name>
+            <name>EqualsNull</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>PositionLiteralsFirstInComparisons</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>PreserveStackTrace</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>ReturnEmptyArrayRatherThanNull</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
         </rule>
         <rule>
-            <name>SimpleDateFormatNeedsLocale</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyBooleanExpressions</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyBooleanReturns</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyConditional</name>
+            <name>FinalFieldCouldBeStatic</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>SingularField</name>
-            <ruleset>Design Rules</ruleset>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>SwitchDensity</name>
-            <ruleset>Design Rules</ruleset>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>SwitchStmtsShouldHaveDefault</name>
-            <ruleset>Design Rules</ruleset>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>UncommentedEmptyConstructor</name>
-            <ruleset>Design Rules</ruleset>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>UncommentedEmptyMethod</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryLocalBeforeReturn</name>
+            <name>IdempotentOperations</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UnsynchronizedStaticDateFormatter</name>
+            <name>ImmutableField</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseCollectionIsEmpty</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>UseLocaleWithCaseConversions</name>
-            <ruleset>Design Rules</ruleset>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>UseNotifyAllInsteadOfNotify</name>
-            <ruleset>Design Rules</ruleset>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>UseSingleton</name>
+            <name>InstantiationToGetClass</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidCallingFinalize</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyFinalizer</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>IntegerInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeDoesNotCallSuperFinalize</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeOnlyCallsSuperFinalize</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeOverloaded</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>JUnit4TestShouldUseAfterAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeShouldBeProtected</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>DontImportJavaLang</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>DuplicateImports</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>ImportFromSamePackage</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>TooManyStaticImports</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>DoNotCallSystemExit</name>
-            <ruleset>J2EE Rules</ruleset>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>DoNotUseThreads</name>
-            <ruleset>J2EE Rules</ruleset>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
             <name>LocalHomeNamingConvention</name>
             <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
-            <name>MDBAndSessionBeanNamingConvention</name>
-            <ruleset>J2EE Rules</ruleset>
+            <name>LocalVariableCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>RemoteInterfaceNamingConvention</name>
-            <ruleset>J2EE Rules</ruleset>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>RemoteSessionInterfaceNamingConvention</name>
-            <ruleset>J2EE Rules</ruleset>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>StaticEJBFieldShouldBeFinal</name>
-            <ruleset>J2EE Rules</ruleset>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
         </rule>
         <rule>
-            <name>UseProperClassLoader</name>
+            <name>MDBAndSessionBeanNamingConvention</name>
             <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
-            <name>ProperLogger</name>
-            <ruleset>Jakarta Commons Logging Rules</ruleset>
+            <name>MethodArgumentCouldBeFinal</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>UseCorrectExceptionLogging</name>
-            <ruleset>Jakarta Commons Logging Rules</ruleset>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidPrintStackTrace</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
         </rule>
         <rule>
-            <name>LoggerIsNotStaticFinal</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>MoreThanOneLogger</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>SystemPrintln</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>MisplacedNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>MissingSerialVersionUID</name>
-            <ruleset>JavaBean Rules</ruleset>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitAssertionsShouldIncludeMessage</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitSpelling</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitStaticSuite</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitTestsShouldIncludeAssert</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyBooleanAssertion</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>TestClassWithoutTestCases</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryBooleanAssertion</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseAssertEqualsInsteadOfAssertTrue</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseAssertNullInsteadOfAssertTrue</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseAssertSameInsteadOfAssertTrue</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidAssertAsIdentifier</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidEnumAsIdentifier</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ByteInstantiation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>OverrideBothEqualsAndHashcode</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>IntegerInstantiation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnit4TestShouldUseAfterAnnotation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnit4TestShouldUseBeforeAnnotation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnit4TestShouldUseTestAnnotation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitUseExpected</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>RemoteInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
-            <name>LongInstantiation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>RemoteSessionInterfaceNamingConvention</name>
+            <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
             <name>ReplaceEnumerationWithIterator</name>
             <name>ReplaceVectorWithList</name>
             <ruleset>Migration Rules</ruleset>
         </rule>
+        <rule>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ReturnFromFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
         <rule>
             <name>ShortInstantiation</name>
             <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>AbstractNaming</name>
+            <name>ShortMethodName</name>
             <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidDollarSigns</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidFieldNameMatchingMethodName</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidFieldNameMatchingTypeName</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>BooleanGetMethodName</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ClassNamingConventions</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>MethodNamingConventions</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>MethodWithSameNameAsEnclosingClass</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>MisleadingVariableName</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>NoPackage</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>StaticEJBFieldShouldBeFinal</name>
+            <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
-            <name>PackageCase</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>ShortMethodName</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
             <name>SuspiciousConstantFieldName</name>
             <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>VariableNamingConventions</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AddEmptyString</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidArrayLoops</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>SwitchStmtsShouldHaveDefault</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>LocalVariableCouldBeFinal</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>MethodArgumentCouldBeFinal</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>TestClassWithoutTestCases</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyStartsWith</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>TooManyFields</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryWrapperObjectCreation</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>TooManyMethods</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>UseArrayListInsteadOfVector</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>UseArraysAsList</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseStringBufferForStringAppends</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ArrayIsStoredDirectly</name>
-            <ruleset>Security Code Guidelines</ruleset>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>MethodReturnsInternalArray</name>
-            <ruleset>Security Code Guidelines</ruleset>
+            <name>UnnecessaryBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidCatchingNPE</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidCatchingThrowable</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidRethrowingException</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThrowingNewInstanceOfSameException</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThrowingNullPointerException</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThrowingRawExceptionTypes</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryParentheses</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>DoNotExtendJavaLangError</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>DoNotThrowExceptionInFinally</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>ExceptionAsFlowControl</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AppendCharacterWithChar</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidDuplicateLiterals</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UnusedImports</name>
+            <ruleset>Type Resolution Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidStringBufferField</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>ConsecutiveLiteralAppends</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UnusedModifier</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>InefficientEmptyStringCheck</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>InefficientStringBuffering</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>InsufficientStringBufferDeclaration</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>StringBufferInstantiationWithChar</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>StringInstantiation</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>StringToString</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryCaseChange</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
         </rule>
         <rule>
             <name>UseEqualsToCompareStrings</name>
             <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>UselessStringValueOf</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UseStringBufferLength</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>CloneMethodMustImplementCloneable</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>LooseCoupling</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>SignatureDeclareThrowsException</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedImports</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>UseProperClassLoader</name>
+            <ruleset>J2EE Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedFormalParameter</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedLocalVariable</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedPrivateField</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedPrivateMethod</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
     </rules>
     <includeDerivedFiles>false</includeDerivedFiles>
index 17c86d4bdb9102d3761604d13e7e5f8afa8550b0..9219640ce93b53bdc79351012aa605e3eb15cc25 100644 (file)
@@ -90,9 +90,9 @@ public final class AddEventActivity extends Activity implements OnDateSetListene
        @Override
        public void onDateSet(final DatePicker picker, final int year, final int monthOfYear, final int dayOfMonth) {
                final Calendar calendar=new GregorianCalendar(year, monthOfYear, dayOfMonth);
-               dateTimeTextView.setText(String.format("%4d-%02d-%02d", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)));
+               dateTimeTextView.setText(Utils.formatDate(year, monthOfYear, dayOfMonth));
                calendar.add(Calendar.DAY_OF_MONTH, 1);
                if(dateTimeTextView.getId() == R.id.date_start)
-                       ((TextView)findViewById(R.id.date_end)).setText(String.format("%4d-%2d-%2d", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)));
+                       ((TextView)findViewById(R.id.date_end)).setText(Utils.formatDate(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)));
        }
 }
index 55e5da177b9c56cf58347120738d9d70b5169d13..23086ab0a43d3e45680f072dd885c8115c0d282e 100644 (file)
@@ -2,68 +2,74 @@ package ro.ieval.unical;
 
 import android.app.Fragment;
 import android.os.Bundle;
-import android.text.InputType;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemSelectedListener;
 import android.widget.CompoundButton;
-import android.widget.EditText;
 import android.widget.LinearLayout;
 import android.widget.Spinner;
 import android.widget.Switch;
-import android.widget.CompoundButton.OnCheckedChangeListener;
 
 public final class TrivialFragment extends Fragment {
+       private static class OnItemSelectedListener implements android.widget.AdapterView.OnItemSelectedListener{
+               final View repeatCount;
+               public OnItemSelectedListener(final View repeatCount) {
+                       this.repeatCount=repeatCount;
+               }
+
+               @Override
+               public void onItemSelected(final AdapterView<?> whatever, final View ignored, final int pos, final long id) {
+                       switch(pos){
+                       case 0:
+                               repeatCount.setVisibility(View.GONE);
+                               break;
+                       case 1:
+                               repeatCount.setVisibility(View.GONE);
+                               break;
+                       case 2:
+                               repeatCount.setVisibility(View.VISIBLE);
+                               break;
+                       default:
+                       }
+               }
+
+               @Override public void onNothingSelected(final AdapterView<?> arg0) { /* do nothing */   }
+       }
+
+       private static class OnCheckedChangeListener implements android.widget.CompoundButton.OnCheckedChangeListener{
+               private final LinearLayout layout;
+               private final View root;
+               public OnCheckedChangeListener(final LinearLayout layout, final View root){
+                       this.layout=layout;
+                       this.root=root;
+               }
+
+               @Override
+               public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
+                       if(isChecked) {
+                               Utils.setEnabledRecursively(layout, true);
+                               final Spinner repeatType = (Spinner) root.findViewById(R.id.repeat_type);
+                               repeatType.setOnItemSelectedListener(new OnItemSelectedListener(root.findViewById(R.id.repeat_count)));
+                       }else {
+                               Utils.setEnabledRecursively(layout, false);
+                       }
+               }
+       }
+
        public static final String ARGUMENT_LAYOUT="layout";
 
        @Override
     public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
                
                final View view=inflater.inflate(getArguments().getInt(ARGUMENT_LAYOUT), container, false);
-               final LinearLayout ll = (LinearLayout) view.findViewById(R.id.repeat_layout);
+               final LinearLayout layout = (LinearLayout) view.findViewById(R.id.repeat_layout);
                
-               if(ll != null){
+               if(layout != null){
                        final Switch repeatSwitch = (Switch) view.findViewById(R.id.repeat_switch);
-                       Utils.setEnabledRecursively(ll, false);
+                       Utils.setEnabledRecursively(layout, false);
                        
-                       repeatSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener() {
-                               @Override
-                               public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
-                                       if(isChecked) {
-                                               Utils.setEnabledRecursively(ll, true);
-                                               Spinner repeatType = (Spinner) view.findViewById(R.id.repeat_type);
-                                               final EditText repeatCount = (EditText) view.findViewById(R.id.repeat_count);
-                                               
-                                               repeatType.setOnItemSelectedListener(new OnItemSelectedListener() {
-
-                                                       @Override
-                                                       public void onItemSelected(AdapterView<?> arg0,
-                                                                       View arg1, int arg2, long arg3) {
-                                                               if(arg2==1) {
-                                                                       //TODO adauga un date picker
-                                                                       //TODO sterge repeatCount
-                                                                       repeatCount.setVisibility(EditText.GONE);
-                                                               }else if(arg2==2) {
-                                                                       repeatCount.setVisibility(EditText.VISIBLE);
-                                                               }else {
-                                                                       //TODO sterge repeatCount
-                                                                       repeatCount.setVisibility(EditText.GONE);
-                                                               }
-                                                               
-                                                       }
-
-                                                       @Override
-                                                       public void onNothingSelected(AdapterView<?> arg0) {
-                                                               
-                                                       }
-                                               });
-                                       }else {
-                                               Utils.setEnabledRecursively(ll, false);
-                                       }
-                               }
-                       });
+                       repeatSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener(layout, view));
                }
                return view;
        }
index 74fa1a2371cacea31bc46ff632928aac24e1a046..703c8ddc2061bb6769e3643e593e4c205f4f86dd 100644 (file)
@@ -1,9 +1,13 @@
 package ro.ieval.unical;
 
+import java.util.Locale;
+
 import android.view.View;
 import android.view.ViewGroup;
 
 final class Utils {
+       private Utils(){ /* do nothing */ }
+
        public static void setEnabledRecursively(final View view, final boolean enabled){
                view.setEnabled(enabled);
                if(view instanceof ViewGroup){
@@ -12,4 +16,8 @@ final class Utils {
                                setEnabledRecursively(group.getChildAt(i), enabled);
                }
        }
+
+       public static String formatDate(final int year, final int month, final int day){
+               return String.format(Locale.ENGLISH, "%4d-%02d-%02d", year, month, day);
+       }
 }
This page took 0.106073 seconds and 4 git commands to generate.