PMD Results

The following document contains the results of PMD 6.29.0.

Violations By Priority

Priority 1

com/varmateo/yawg/cli/BakerCliRunOptions.java

Rule Violation Line FieldNamingConventions The final field name 'argv0' doesn't match '_[a-z][a-zA-Z0-9]*' 24 FieldNamingConventions The final field name 'args' doesn't match '_[a-z][a-zA-Z0-9]*' 25 FieldNamingConventions The final field name 'output' doesn't match '_[a-z][a-zA-Z0-9]*' 26

Priority 3

com/varmateo/yawg/cli/BakerCli.java

Rule Violation Line ProperLogger Logger should be defined private static final and have the correct class 38 UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'exitStatus' 72 CloseResource Ensure that resources like this Writer object are closed after use 85

com/varmateo/yawg/cli/BakerCliAction.java

Rule Violation Line AtLeastOneConstructor Each class should declare at least one constructor 20224 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 29 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 40 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 42 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 73 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 82 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 91

com/varmateo/yawg/cli/BakerCliBakeOptions.java

Rule Violation Line AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 34

com/varmateo/yawg/cli/BakerCliRunOptions.java

Rule Violation Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 34 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 35 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 36 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 48 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 115

com/varmateo/yawg/cli/CliInfoPrinter.java

Rule Violation Line ImportFromSamePackage No need to import a type that lives in the same package 16 RedundantFieldInitializer Avoid using redundant field initializer for '_argv0' 36 ImmutableField Private field '_argv0' could be made final; it is only initialized in the declaration or constructor. 36 UnusedAssignment The field initializer for '_argv0' is never used (overwritten on line 48) 36 RedundantFieldInitializer Avoid using redundant field initializer for '_versionMessage' 37 ImmutableField Private field '_versionMessage' could be made final; it is only initialized in the declaration or constructor. 37 UnusedAssignment The field initializer for '_versionMessage' is never used (overwritten on line 49) 37 ImmutableField Private field '_usageMessageHeader' could be made final; it is only initialized in the declaration or constructor. 38 RedundantFieldInitializer Avoid using redundant field initializer for '_usageMessageHeader' 38 UnusedAssignment The field initializer for '_usageMessageHeader' is never used (overwritten on line 50) 38 RedundantFieldInitializer Avoid using redundant field initializer for '_usageMessageFooter' 39 UnusedAssignment The field initializer for '_usageMessageFooter' is never used (overwritten on line 51) 39 ImmutableField Private field '_usageMessageFooter' could be made final; it is only initialized in the declaration or constructor. 39 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 62 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 198

com/varmateo/yawg/cli/CliParameter.java

Rule Violation Line DataClass The class 'CliParameter' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=6, WMC=18) 16245 ImmutableField Private field '_shortName' could be made final; it is only initialized in the declaration or constructor. 19 UnusedAssignment The field initializer for '_shortName' is never used (overwritten on line 37) 19 RedundantFieldInitializer Avoid using redundant field initializer for '_shortName' 19 ImmutableField Private field '_longName' could be made final; it is only initialized in the declaration or constructor. 20 UnusedAssignment The field initializer for '_longName' is never used (overwritten on line 38) 20 RedundantFieldInitializer Avoid using redundant field initializer for '_longName' 20 UnusedAssignment The field initializer for '_description' is never used (overwritten on line 39) 21 ImmutableField Private field '_description' could be made final; it is only initialized in the declaration or constructor. 21 RedundantFieldInitializer Avoid using redundant field initializer for '_description' 21 UnusedAssignment The field initializer for '_argName' is never used (overwritten on line 40) 22 ImmutableField Private field '_argName' could be made final; it is only initialized in the declaration or constructor. 22 RedundantFieldInitializer Avoid using redundant field initializer for '_argName' 22 UnusedAssignment The field initializer for '_name' is never used (overwritten on line 42) 25 ImmutableField Private field '_name' could be made final; it is only initialized in the declaration or constructor. 25 RedundantFieldInitializer Avoid using redundant field initializer for '_name' 25 ImmutableField Private field '_literal' could be made final; it is only initialized in the declaration or constructor. 26 UnusedAssignment The field initializer for '_literal' is never used (overwritten on line 43) 26 RedundantFieldInitializer Avoid using redundant field initializer for '_literal' 26 RedundantFieldInitializer Avoid using redundant field initializer for '_isWithArg' 27 UnusedAssignment The field initializer for '_isWithArg' is never used (overwritten on line 44) 27 ImmutableField Private field '_isWithArg' could be made final; it is only initialized in the declaration or constructor. 27 RedundantFieldInitializer Avoid using redundant field initializer for '_apacheOption' 29 ImmutableField Private field '_apacheOption' could be made final; it is only initialized in the declaration or constructor. 29 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 57 DefaultPackage Use explicit scoping instead of the default package private level 160163 RedundantFieldInitializer Avoid using redundant field initializer for '_shortName' 172 RedundantFieldInitializer Avoid using redundant field initializer for '_longName' 173 RedundantFieldInitializer Avoid using redundant field initializer for '_description' 174 RedundantFieldInitializer Avoid using redundant field initializer for '_argName' 175 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 238

com/varmateo/yawg/cli/CliParameterSet.java

Rule Violation Line LocalVariableCouldBeFinal Local variable 'apacheOptions' could be declared final 60 LocalVariableCouldBeFinal Local variable 'cliParser' could be declared final 61 LocalVariableCouldBeFinal Local variable 'argList' could be declared final 71 LocalVariableCouldBeFinal Local variable 'longName' could be declared final 136 LocalVariableCouldBeFinal Local variable 'shortName' could be declared final 140 LocalVariableCouldBeFinal Local variable 'pathStr' could be declared final 258 LocalVariableCouldBeFinal Local variable 'pathStr' could be declared final 272 PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 291 LocalVariableCouldBeFinal Local variable 'value' could be declared final 304

com/varmateo/yawg/cli/InfoPrinter.java

Rule Violation Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 57 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 76 RedundantFieldInitializer Avoid using redundant field initializer for '_argv0' 113 RedundantFieldInitializer Avoid using redundant field initializer for '_output' 114 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 152

com/varmateo/yawg/cli/Main.java

Rule Violation Line UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'input': resource specifications are implicitly final 60

Priority 4

com/varmateo/yawg/cli/BakerCli.java

Rule Violation Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 99

com/varmateo/yawg/cli/BakerCliAction.java

Rule Violation Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 26 ShortClassName Avoid short class names like Bake 176222

com/varmateo/yawg/cli/BakerCliBakeOptionsParser.java

Rule Violation Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 33

com/varmateo/yawg/cli/BakerCliParameters.java

Rule Violation Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 95

com/varmateo/yawg/cli/CliParameter.java

Rule Violation Line UselessParentheses Useless parentheses. 43 UselessParentheses Useless parentheses. 43 UselessParentheses Useless parentheses. 44

com/varmateo/yawg/cli/CliParameterSet.java

Rule Violation Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 57 UselessParentheses Useless parentheses. 72

com/varmateo/yawg/cli/Main.java

Rule Violation Line ShortClassName Avoid short class names like Main 1766

Files

com/varmateo/yawg/cli/BakerCli.java

Rule Violation Priority Line ProperLogger Logger should be defined private static final and have the correct class 3 38 UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'exitStatus' 3 72 CloseResource Ensure that resources like this Writer object are closed after use 3 85 UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 99

com/varmateo/yawg/cli/BakerCliAction.java

Rule Violation Priority Line AtLeastOneConstructor Each class should declare at least one constructor 3 20224 UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 26 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 29 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 40 OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 42 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 73 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 82 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 91 ShortClassName Avoid short class names like Bake 4 176222

com/varmateo/yawg/cli/BakerCliBakeOptions.java

Rule Violation Priority Line AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 34

com/varmateo/yawg/cli/BakerCliBakeOptionsParser.java

Rule Violation Priority Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 33

com/varmateo/yawg/cli/BakerCliParameters.java

Rule Violation Priority Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 95

com/varmateo/yawg/cli/BakerCliRunOptions.java

Rule Violation Priority Line FieldNamingConventions The final field name 'argv0' doesn't match '_[a-z][a-zA-Z0-9]*' 1 24 FieldNamingConventions The final field name 'args' doesn't match '_[a-z][a-zA-Z0-9]*' 1 25 FieldNamingConventions The final field name 'output' doesn't match '_[a-z][a-zA-Z0-9]*' 1 26 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 34 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 35 AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 36 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 48 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 115

com/varmateo/yawg/cli/CliInfoPrinter.java

Rule Violation Priority Line ImportFromSamePackage No need to import a type that lives in the same package 3 16 RedundantFieldInitializer Avoid using redundant field initializer for '_argv0' 3 36 ImmutableField Private field '_argv0' could be made final; it is only initialized in the declaration or constructor. 3 36 UnusedAssignment The field initializer for '_argv0' is never used (overwritten on line 48) 3 36 RedundantFieldInitializer Avoid using redundant field initializer for '_versionMessage' 3 37 ImmutableField Private field '_versionMessage' could be made final; it is only initialized in the declaration or constructor. 3 37 UnusedAssignment The field initializer for '_versionMessage' is never used (overwritten on line 49) 3 37 ImmutableField Private field '_usageMessageHeader' could be made final; it is only initialized in the declaration or constructor. 3 38 RedundantFieldInitializer Avoid using redundant field initializer for '_usageMessageHeader' 3 38 UnusedAssignment The field initializer for '_usageMessageHeader' is never used (overwritten on line 50) 3 38 RedundantFieldInitializer Avoid using redundant field initializer for '_usageMessageFooter' 3 39 UnusedAssignment The field initializer for '_usageMessageFooter' is never used (overwritten on line 51) 3 39 ImmutableField Private field '_usageMessageFooter' could be made final; it is only initialized in the declaration or constructor. 3 39 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 62 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 198

com/varmateo/yawg/cli/CliParameter.java

Rule Violation Priority Line DataClass The class 'CliParameter' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=6, WMC=18) 3 16245 ImmutableField Private field '_shortName' could be made final; it is only initialized in the declaration or constructor. 3 19 UnusedAssignment The field initializer for '_shortName' is never used (overwritten on line 37) 3 19 RedundantFieldInitializer Avoid using redundant field initializer for '_shortName' 3 19 ImmutableField Private field '_longName' could be made final; it is only initialized in the declaration or constructor. 3 20 UnusedAssignment The field initializer for '_longName' is never used (overwritten on line 38) 3 20 RedundantFieldInitializer Avoid using redundant field initializer for '_longName' 3 20 UnusedAssignment The field initializer for '_description' is never used (overwritten on line 39) 3 21 ImmutableField Private field '_description' could be made final; it is only initialized in the declaration or constructor. 3 21 RedundantFieldInitializer Avoid using redundant field initializer for '_description' 3 21 UnusedAssignment The field initializer for '_argName' is never used (overwritten on line 40) 3 22 ImmutableField Private field '_argName' could be made final; it is only initialized in the declaration or constructor. 3 22 RedundantFieldInitializer Avoid using redundant field initializer for '_argName' 3 22 UnusedAssignment The field initializer for '_name' is never used (overwritten on line 42) 3 25 ImmutableField Private field '_name' could be made final; it is only initialized in the declaration or constructor. 3 25 RedundantFieldInitializer Avoid using redundant field initializer for '_name' 3 25 ImmutableField Private field '_literal' could be made final; it is only initialized in the declaration or constructor. 3 26 UnusedAssignment The field initializer for '_literal' is never used (overwritten on line 43) 3 26 RedundantFieldInitializer Avoid using redundant field initializer for '_literal' 3 26 RedundantFieldInitializer Avoid using redundant field initializer for '_isWithArg' 3 27 UnusedAssignment The field initializer for '_isWithArg' is never used (overwritten on line 44) 3 27 ImmutableField Private field '_isWithArg' could be made final; it is only initialized in the declaration or constructor. 3 27 RedundantFieldInitializer Avoid using redundant field initializer for '_apacheOption' 3 29 ImmutableField Private field '_apacheOption' could be made final; it is only initialized in the declaration or constructor. 3 29 UselessParentheses Useless parentheses. 4 43 UselessParentheses Useless parentheses. 4 43 UselessParentheses Useless parentheses. 4 44 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 57 DefaultPackage Use explicit scoping instead of the default package private level 3 160163 RedundantFieldInitializer Avoid using redundant field initializer for '_shortName' 3 172 RedundantFieldInitializer Avoid using redundant field initializer for '_longName' 3 173 RedundantFieldInitializer Avoid using redundant field initializer for '_description' 3 174 RedundantFieldInitializer Avoid using redundant field initializer for '_argName' 3 175 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 238

com/varmateo/yawg/cli/CliParameterSet.java

Rule Violation Priority Line UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 57 LocalVariableCouldBeFinal Local variable 'apacheOptions' could be declared final 3 60 LocalVariableCouldBeFinal Local variable 'cliParser' could be declared final 3 61 LocalVariableCouldBeFinal Local variable 'argList' could be declared final 3 71 UselessParentheses Useless parentheses. 4 72 LocalVariableCouldBeFinal Local variable 'longName' could be declared final 3 136 LocalVariableCouldBeFinal Local variable 'shortName' could be declared final 3 140 LocalVariableCouldBeFinal Local variable 'pathStr' could be declared final 3 258 LocalVariableCouldBeFinal Local variable 'pathStr' could be declared final 3 272 PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 291 LocalVariableCouldBeFinal Local variable 'value' could be declared final 3 304

com/varmateo/yawg/cli/InfoPrinter.java

Rule Violation Priority Line AccessorMethodGeneration Avoid autogenerated methods to access private fields and methods of inner / outer classes 3 57 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 76 RedundantFieldInitializer Avoid using redundant field initializer for '_argv0' 3 113 RedundantFieldInitializer Avoid using redundant field initializer for '_output' 3 114 AccessorClassGeneration Avoid instantiation through private constructors from outside of the constructors class. 3 152

com/varmateo/yawg/cli/Main.java

Rule Violation Priority Line ShortClassName Avoid short class names like Main 4 1766 UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'input': resource specifications are implicitly final 3 60