Fork me on GitHub

Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
2737 0 0 7 99.744% 31.172

Note: failures are anticipated and checked for with assertions while errors are unanticipated.


Package List

[Summary] [Package List] [Test Cases]


Package Tests Errors Failures Skipped Success Rate Time
net.sourceforge.pmd.lang.java.rule.codesize 72 0 0 0 100% 0.173
net.sourceforge.pmd.lang.java.rule.comments 23 0 0 0 100% 0.035
net.sourceforge.pmd.lang.java.rule.unnecessary 132 0 0 1 99.242% 0.278
net.sourceforge.pmd.lang.java.ast 171 0 0 1 99.415% 0.21
net.sourceforge.pmd.lang.java 17 0 0 0 100% 0.018
net.sourceforge.pmd.lang.java.rule.junit 120 0 0 0 100% 0.309
net.sourceforge.pmd.lang.java.rule.basic 167 0 0 0 100% 0.593
net.sourceforge.pmd.lang.java.rule.design 476 0 0 1 99.79% 5.005
net.sourceforge.pmd.lang.java.rule.unusedcode 141 0 0 1 99.291% 0.346
net.sourceforge.pmd.typeresolution 34 0 0 1 97.059% 0.116
net.sourceforge.pmd.lang.java.rule.typeresolution.xml 1 0 0 1 0% 0
net.sourceforge.pmd.cpd 26 0 0 0 100% 0.075
net.sourceforge.pmd.lang.java.rule.javabeans 23 0 0 0 100% 0.033
net.sourceforge.pmd.lang.java.rule.empty 45 0 0 0 100% 0.065
net.sourceforge.pmd 38 0 0 0 100% 1.452
net.sourceforge.pmd.lang.java.rule.metrics 16 0 0 0 100% 0.09
net.sourceforge.pmd.lang.java.rule.coupling 44 0 0 0 100% 0.103
net.sourceforge.pmd.lang.java.rule.imports 76 0 0 0 100% 0.161
net.sourceforge.pmd.lang.java.rule.optimizations 101 0 0 0 100% 0.256
net.sourceforge.pmd.lang.java.dfa 47 0 0 0 100% 0.035
net.sourceforge.pmd.lang.java.rule.controversial 112 0 0 0 100% 3.324
net.sourceforge.pmd.lang.java.rule.clone 29 0 0 0 100% 0.041
net.sourceforge.pmd.lang.java.rule.loggingjakartacommons 23 0 0 0 100% 0.065
net.sourceforge.pmd.lang.java.rule 10 0 0 0 100% 0.009
net.sourceforge.pmd.lang.java.rule.typeresolution 60 0 0 0 100% 0.089
net.sourceforge.pmd.lang.java.rule.strictexception 47 0 0 0 100% 0.079
net.sourceforge.pmd.lang.java.rule.sunsecure 30 0 0 0 100% 0.04
net.sourceforge.pmd.lang.java.symboltable 99 0 0 0 100% 0.017
net.sourceforge.pmd.lang.java.rule.migrating 39 0 0 0 100% 0.12
net.sourceforge.pmd.lang.java.rule.loggingjava 34 0 0 0 100% 0.062
net.sourceforge.pmd.ant 12 0 0 0 100% 2.08
net.sourceforge.pmd.lang.java.rule.naming 118 0 0 0 100% 0.267
net.sourceforge.pmd.lang.java.rule.finalizers 20 0 0 0 100% 0.025
net.sourceforge.pmd.lang.java.oom 23 0 0 0 100% 0.074
net.sourceforge.pmd.cli 10 0 0 0 100% 0.418
net.sourceforge.pmd.jaxen 12 0 0 0 100% 0.033
net.sourceforge.pmd.lang.java.rule.j2ee 25 0 0 0 100% 0.041
net.sourceforge.pmd.coverage 2 0 0 0 100% 14.477
net.sourceforge.pmd.lang.java.rule.strings 237 0 0 1 99.578% 0.506
net.sourceforge.pmd.lang.java.rule.android 8 0 0 0 100% 0.028
net.sourceforge.pmd.lang.java.rule.braces 17 0 0 0 100% 0.024

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

net.sourceforge.pmd.lang.java.rule.codesize

Class Tests Errors Failures Skipped Success Rate Time
CodesizeRulesTest 71 0 0 0 100% 0.173
StdCyclomaticComplexityRuleTest 1 0 0 0 100% 0

net.sourceforge.pmd.lang.java.rule.comments

Class Tests Errors Failures Skipped Success Rate Time
AbstractCommentRuleTest 2 0 0 0 100% 0
CommentRulesTest 21 0 0 0 100% 0.035

net.sourceforge.pmd.lang.java.rule.unnecessary

Class Tests Errors Failures Skipped Success Rate Time
UnnecessaryRulesTest 132 0 0 1 99.242% 0.278

net.sourceforge.pmd.lang.java.ast

Class Tests Errors Failures Skipped Success Rate Time
ASTAnnotationTest 3 0 0 0 100% 0.028
ASTAssignmentOperatorTest 3 0 0 0 100% 0.005
ASTBlockStatementTest 2 0 0 0 100% 0
ASTBooleanLiteralTest 2 0 0 0 100% 0.001
ASTFieldDeclarationTest 6 0 0 0 100% 0.004
ASTFormalParameterTest 1 0 0 0 100% 0.001
ASTImportDeclarationTest 4 0 0 0 100% 0
ASTInitializerTest 1 0 0 0 100% 0
ASTLiteralTest 11 0 0 0 100% 0.003
ASTLocalVariableDeclarationTest 3 0 0 0 100% 0
ASTMethodDeclarationTest 1 0 0 0 100% 0
ASTPackageDeclarationTest 1 0 0 0 100% 0
ASTPrimarySuffixTest 2 0 0 0 100% 0.001
ASTSwitchLabelTest 2 0 0 0 100% 0.001
ASTThrowStatementTest 2 0 0 0 100% 0.001
ASTVariableDeclaratorIdTest 5 0 0 0 100% 0.009
AccessNodeTest 13 0 0 0 100% 0.003
ClassDeclTest 5 0 0 0 100% 0.001
EncodingTest 1 0 0 0 100% 0
FieldDeclTest 7 0 0 0 100% 0.003
JDKVersionTest 33 0 0 0 100% 0.056
MethodDeclTest 8 0 0 0 100% 0.003
ParserCornersTest 20 0 0 0 100% 0.076
QualifiedNameTest 13 0 0 0 100% 0.006
SimpleNodeTest 22 0 0 1 95.455% 0.008

net.sourceforge.pmd.lang.java

Class Tests Errors Failures Skipped Success Rate Time
SuppressWarningsTest 17 0 0 0 100% 0.018

net.sourceforge.pmd.lang.java.rule.junit

Class Tests Errors Failures Skipped Success Rate Time
JunitRulesTest 120 0 0 0 100% 0.309

net.sourceforge.pmd.lang.java.rule.basic

Class Tests Errors Failures Skipped Success Rate Time
BasicRulesTest 167 0 0 0 100% 0.593

net.sourceforge.pmd.lang.java.rule.design

Class Tests Errors Failures Skipped Success Rate Time
DesignRulesTest 476 0 0 1 99.79% 5.005

net.sourceforge.pmd.lang.java.rule.unusedcode

Class Tests Errors Failures Skipped Success Rate Time
UnusedCodeRulesTest 141 0 0 1 99.291% 0.346

net.sourceforge.pmd.typeresolution

Class Tests Errors Failures Skipped Success Rate Time
ClassTypeResolverTest 30 0 0 0 100% 0.115
PMDASMClassLoaderTest 4 0 0 1 75% 0.001

net.sourceforge.pmd.lang.java.rule.typeresolution.xml

Class Tests Errors Failures Skipped Success Rate Time
MyTestCase 1 0 0 1 0% 0

net.sourceforge.pmd.cpd

Class Tests Errors Failures Skipped Success Rate Time
CPDCommandLineInterfaceTest 7 0 0 0 100% 0.07
JavaTokensTokenizerTest 17 0 0 0 100% 0.003
MatchAlgorithmTest 2 0 0 0 100% 0.002

net.sourceforge.pmd.lang.java.rule.javabeans

Class Tests Errors Failures Skipped Success Rate Time
JavabeansRulesTest 23 0 0 0 100% 0.033

net.sourceforge.pmd.lang.java.rule.empty

Class Tests Errors Failures Skipped Success Rate Time
EmptyRulesTest 45 0 0 0 100% 0.065

net.sourceforge.pmd

Class Tests Errors Failures Skipped Success Rate Time
ExcludeLinesTest 2 0 0 0 100% 0.149
LanguageVersionDiscovererTest 3 0 0 0 100% 0.001
LanguageVersionTest 21 0 0 0 100% 0.185
ReportTest 6 0 0 0 100% 0.063
RuleSetFactoryTest 6 0 0 0 100% 1.054

net.sourceforge.pmd.lang.java.rule.metrics

Class Tests Errors Failures Skipped Success Rate Time
MetricsRulesTest 16 0 0 0 100% 0.09

net.sourceforge.pmd.lang.java.rule.coupling

Class Tests Errors Failures Skipped Success Rate Time
CouplingRulesTest 44 0 0 0 100% 0.103

net.sourceforge.pmd.lang.java.rule.imports

Class Tests Errors Failures Skipped Success Rate Time
ImportsRulesTest 76 0 0 0 100% 0.161

net.sourceforge.pmd.lang.java.rule.optimizations

Class Tests Errors Failures Skipped Success Rate Time
OptimizationsRulesTest 101 0 0 0 100% 0.256

net.sourceforge.pmd.lang.java.dfa

Class Tests Errors Failures Skipped Success Rate Time
AcceptanceTest 31 0 0 0 100% 0.032
DAAPathFinderTest 1 0 0 0 100% 0
DataFlowNodeTest 5 0 0 0 100% 0.001
GeneralFiddlingTest 2 0 0 0 100% 0
StatementAndBraceFinderTest 6 0 0 0 100% 0.002
StructureTest 1 0 0 0 100% 0
VariableAccessTest 1 0 0 0 100% 0

net.sourceforge.pmd.lang.java.rule.controversial

Class Tests Errors Failures Skipped Success Rate Time
ControversialRulesTest 112 0 0 0 100% 3.324

net.sourceforge.pmd.lang.java.rule.clone

Class Tests Errors Failures Skipped Success Rate Time
CloneRulesTest 29 0 0 0 100% 0.041

net.sourceforge.pmd.lang.java.rule.loggingjakartacommons

Class Tests Errors Failures Skipped Success Rate Time
LoggingJakartaCommonsRulesTest 23 0 0 0 100% 0.065

net.sourceforge.pmd.lang.java.rule

Class Tests Errors Failures Skipped Success Rate Time
JavaRuleViolationTest 6 0 0 0 100% 0
XPathRuleTest 4 0 0 0 100% 0.009

net.sourceforge.pmd.lang.java.rule.typeresolution

Class Tests Errors Failures Skipped Success Rate Time
CloneMethodMustImplementCloneableTest 16 0 0 0 100% 0.02
LooseCouplingTest 12 0 0 0 100% 0.016
SignatureDeclareThrowsExceptionTest 14 0 0 0 100% 0.023
UnusedImportsTest 18 0 0 0 100% 0.03

net.sourceforge.pmd.lang.java.rule.strictexception

Class Tests Errors Failures Skipped Success Rate Time
StrictExceptionRulesTest 47 0 0 0 100% 0.079

net.sourceforge.pmd.lang.java.rule.sunsecure

Class Tests Errors Failures Skipped Success Rate Time
SunSecureRulesTest 30 0 0 0 100% 0.04

net.sourceforge.pmd.lang.java.symboltable

Class Tests Errors Failures Skipped Success Rate Time
AcceptanceTest 9 0 0 0 100% 0.001
ClassScopeTest 25 0 0 0 100% 0.007
GlobalScopeTest 2 0 0 0 100% 0
ImageFinderFunctionTest 2 0 0 0 100% 0
LocalScopeTest 8 0 0 0 100% 0.001
MethodNameDeclarationTest 1 0 0 0 100% 0
MethodScopeTest 3 0 0 0 100% 0
NameOccurrencesTest 7 0 0 0 100% 0.002
ScopeAndDeclarationFinderTest 2 0 0 0 100% 0.001
ScopeCreationVisitorTest 1 0 0 0 100% 0
SimpleTypedNameDeclarationTest 1 0 0 0 100% 0
SourceFileScopeTest 4 0 0 0 100% 0
TypeSetTest 26 0 0 0 100% 0.004
VariableNameDeclarationTest 8 0 0 0 100% 0.001

net.sourceforge.pmd.lang.java.rule.migrating

Class Tests Errors Failures Skipped Success Rate Time
MigratingRulesTest 39 0 0 0 100% 0.12

net.sourceforge.pmd.lang.java.rule.loggingjava

Class Tests Errors Failures Skipped Success Rate Time
LoggingJavaRulesTest 34 0 0 0 100% 0.062

net.sourceforge.pmd.ant

Class Tests Errors Failures Skipped Success Rate Time
PMDTaskTest 12 0 0 0 100% 2.08

net.sourceforge.pmd.lang.java.rule.naming

Class Tests Errors Failures Skipped Success Rate Time
NamingRulesTest 118 0 0 0 100% 0.267

net.sourceforge.pmd.lang.java.rule.finalizers

Class Tests Errors Failures Skipped Success Rate Time
FinalizersRulesTest 20 0 0 0 100% 0.025

net.sourceforge.pmd.lang.java.oom

Class Tests Errors Failures Skipped Success Rate Time
DataStructureTest 3 0 0 0 100% 0.003
MetricsVisitorTest 4 0 0 0 100% 0.038
SigMaskTest 7 0 0 0 100% 0.019
SignatureTest 9 0 0 0 100% 0.014

net.sourceforge.pmd.cli

Class Tests Errors Failures Skipped Success Rate Time
CLITest 10 0 0 0 100% 0.418

net.sourceforge.pmd.jaxen

Class Tests Errors Failures Skipped Success Rate Time
DocumentNavigatorTest 11 0 0 0 100% 0.031
RegexpAcceptanceTest 1 0 0 0 100% 0.002

net.sourceforge.pmd.lang.java.rule.j2ee

Class Tests Errors Failures Skipped Success Rate Time
J2EERulesTest 25 0 0 0 100% 0.041

net.sourceforge.pmd.coverage

Class Tests Errors Failures Skipped Success Rate Time
PMDCoverageTest 2 0 0 0 100% 14.477

net.sourceforge.pmd.lang.java.rule.strings

Class Tests Errors Failures Skipped Success Rate Time
AvoidDuplicateLiteralsRuleTest 4 0 0 0 100% 0
StringsRulesTest 233 0 0 1 99.571% 0.506

net.sourceforge.pmd.lang.java.rule.android

Class Tests Errors Failures Skipped Success Rate Time
AndroidRulesTest 8 0 0 0 100% 0.028

net.sourceforge.pmd.lang.java.rule.braces

Class Tests Errors Failures Skipped Success Rate Time
BracesRulesTest 17 0 0 0 100% 0.024

Test Cases

[Summary] [Package List] [Test Cases]

ExcludeLinesTest

testAcceptance 0.147
testAlternateMarker 0.002

LanguageVersionDiscovererTest

testLanguageVersionDiscoverer 0
testJavaFileUsingDefaults 0.001
testJavaFileUsing14 0

LanguageVersionTest

testRegisteredRulesets[0] 0.044
testFindVersionsForLanguageNameAndVersion[0] 0.002
testGetLanguageVersionForTerseName[0] 0
testRegisteredRulesets[1] 0.029
testFindVersionsForLanguageNameAndVersion[1] 0
testGetLanguageVersionForTerseName[1] 0
testRegisteredRulesets[2] 0.028
testFindVersionsForLanguageNameAndVersion[2] 0
testGetLanguageVersionForTerseName[2] 0
testRegisteredRulesets[3] 0.029
testFindVersionsForLanguageNameAndVersion[3] 0
testGetLanguageVersionForTerseName[3] 0
testRegisteredRulesets[4] 0.027
testFindVersionsForLanguageNameAndVersion[4] 0
testGetLanguageVersionForTerseName[4] 0
testRegisteredRulesets[5] 0.026
testFindVersionsForLanguageNameAndVersion[5] 0
testGetLanguageVersionForTerseName[5] 0
testRegisteredRulesets[6] 0
testFindVersionsForLanguageNameAndVersion[6] 0
testGetLanguageVersionForTerseName[6] 0

ReportTest

testBasic 0.004
testExclusionsInReportWithAnnotationsFullName 0.009
testExclusionsInReportWithNOPMD 0.004
testExclusionsInReportWithRuleViolationSuppressRegex 0.002
testExclusionsInReportWithRuleViolationSuppressXPath 0.043
testExclusionsInReportWithAnnotations 0.001

RuleSetFactoryTest

testExclusionOfUselessParantheses 0.003
testDogfoodRuleset 0.045
testDtd 0.167
testXmlSchema 0.13
testReadWriteRoundTrip 0.66
testAllPMDBuiltInRulesMeetConventions 0.049

PMDTaskTest

testFormatterEncodingWithXML 0.545
testFormatterEncodingWithXMLConsole 0.065
testExplicitRuleInRuleSet 0.095
testAbstractNames 0.248
testAbstractNamesInNestedRuleset 0.159
testRelativeRulesetsInRulesetfiles 0.146
testNoFormattersValidation 0.16
testCommaInRulesetfiles 0.231
testClasspath 0.057
testRelativeRulesets 0.124
testNestedRuleset 0.105
testFormatterWithProperties 0.145

CLITest

changeJavaVersion 0.121
exitStatusWithViolationsAndWithoutFailOnViolations 0.017
exitStatusNoViolations 0.044
minimalArgs 0.07
testWrongRulename 0.014
testWrongRulesetWithRulename 0.006
usingDebug 0.081
testWrongRuleset 0.006
exitStatusWithViolations 0.018
minimumPriority 0.041

PMDCoverageTest

testPmdOptions 2.222
testResourceFileCommands 12.255

CPDCommandLineInterfaceTest

testEncodingOption 0.049
testExcludes 0.002
testIgnoreIdentifiers 0.003
testIgnoreIdentifiersFailOnViolationFalse 0.003
testFormatXmlWithoutEncoding 0.007
testBrokenAndValidFile 0.004
testCSVFormat 0.002

JavaTokensTokenizerTest

testIgnoreBetweenSpecialCommentsMultiple 0.001
testIgnoreIdentifiersHandlesEnums 0
testDiscardImports 0
testCommentsIgnored 0
testIgnoreIdentifiersWithClassKeyword 0
testIgnoreBetweenSpecialCommentsMultiline 0
testIgnoreBetweenSpecialComments 0
testDiscardSimpleOneLineAnnotation 0
test1 0
test2 0.001
testDiscardPkgStmts 0
testIgnoreComments 0
testIgnoreIdentifiersDontAffectConstructors 0
testIgnoreBetweenSpecialAnnotation 0.001
testIgnoreBetweenSpecialAnnotationAndIgnoreAnnotations 0
testDiscardSemicolons 0
testDiscardOneLineAnnotationWithParams 0

MatchAlgorithmTest

testIgnore 0.001
testSimple 0.001

DocumentNavigatorTest

testPrecedingSiblingAxisIterator2 0.005
testFollowingSiblingAxisIterator2 0.003
testXPath 0.003
testDescendantAxisIterator2 0.002
testFollowingSiblingAxisIterator 0.003
testPrecedingSiblingAxisIterator 0.002
testParentAxisIterator2 0.003
testParentAxisIterator 0.002
testXPath2 0.003
testDescendantAxisIterator 0.003
testChildAxisIterator 0.002

RegexpAcceptanceTest

testSimple 0.002

SuppressWarningsTest

testConstructorLevelSuppression 0.001
testNoSuppressionSomethingElseS 0.001
testMethodLevelSuppression 0.001
testParameterLevelSuppression 0.001
testSuppressAll 0.001
testInheritedSuppression 0.001
testSpecificSuppressionMulitpleValues1 0.001
testSpecificSuppressionMulitpleValues2 0.001
testSpecificSuppressionValue1 0.001
testSpecificSuppressionValue2 0.001
testSpecificSuppressionValue3 0.001
testFieldLevelSuppression 0.001
testSpecificSuppression 0.001
testNoSuppressionBlank 0.001
testLocalVariableLevelSuppression 0
testSpecificSuppressionAtTopLevel 0.001
testClassLevelSuppression 0.003

ASTAnnotationTest

testAnnotationFailsWithJDK14 0.003
testAnnotationSucceedsWithJDK15 0.024
testAnnotationSucceedsWithDefaultMode 0.001

ASTAssignmentOperatorTest

testSimpleAssignmentRecognized 0.001
testCompoundAssignmentPlusRecognized 0.001
testCompoundAssignmentMultRecognized 0.003

ASTBlockStatementTest

testIsAllocation 0
testIsAllocation2 0

ASTBooleanLiteralTest

testFalse 0.001
testTrue 0

ASTFieldDeclarationTest

testWithAnnotation 0.001
testWithEnum 0.001
testGetVariableName 0
testMultiDimensionalArray 0.001
testIsArray 0
testIsSyntacticallyPublic 0.001

ASTFormalParameterTest

testVarargs 0.001

ASTImportDeclarationTest

testStaticImportFailsWithJDK14 0
testGetImportedNameNode 0
testImportOnDemand 0
testStaticImport 0

ASTInitializerTest

testDontCrashOnBlockStatement 0

ASTLiteralTest

testIsStringLiteral 0
testIsFloatFloatLiteral 0.001
testIsNotStringLiteral 0
testIsCharLiteral 0.001
testIsIntIntLiteral 0
testStringUnicodeEscapesInvalid 0
testIsIntLongLiteral 0.001
testStringUnicodeEscapesNotEscaped 0
testCharacterUnicodeEscapesValid 0
testIsFloatDoubleLiteral 0
testStringUnicodeEscapesValid 0

ASTLocalVariableDeclarationTest

testMultDimArraySplitBraces 0
testSingleDimArray 0
testMultDimArray 0

ASTMethodDeclarationTest

testGetVariableName 0

ASTPackageDeclarationTest

testPackageName 0

ASTPrimarySuffixTest

testArrayDereference 0
testArguments 0.001

ASTSwitchLabelTest

testDefaultOff 0
testDefaultSet 0.001

ASTThrowStatementTest

testGetFirstASTNameImageNull 0
testGetFirstASTNameImageNew 0.001

ASTVariableDeclaratorIdTest

testAnnotations 0.001
testLambdaWithoutType 0.007
testIsExceptionBlockParameter 0
testTypeNameNode 0.001
testLambdaWithType 0

AccessNodeTest

testAbstract 0.001
testPackagePrivate 0
testFinal 0
testVolatile 0
testPrivate 0
testSynchronized 0.001
testProtected 0
testModifiersOnClassDecl 0
testNative 0
testPublic 0
testTransient 0.001
testStatic 0
testStrict 0

ClassDeclTest

testAbstract 0
testPublicFinal 0
testFinal 0.001
testPublic 0
testStrict 0

EncodingTest

testDecodingOfUTF8 0

FieldDeclTest

testFinal 0
testVolatile 0.001
testPrivate 0
testProtected 0
testPublic 0.001
testTransient 0
testStatic 0.001

JDKVersionTest

testMultipleGenerics 0
testGenericsInMethodCall 0
testAssertAsIdentifierSucceedsWith13Test2 0.001
testTryWithResourcesWithAnnotations 0.001
testMulticatchWithAnnotations 0.001
testAssertAsMethodNameIdentifierFailsWith14 0
testTryWithResourcesMulti 0.001
testTryWithResources 0
testJDK15GenericsSyntaxShouldPassWith15 0.001
testJDK15ForLoopSyntaxShouldPassWith15 0
testJDK15ForLoopSyntaxWithModifiers 0.001
testVariousParserBugs 0.001
testNestedClassInMethodBug 0.001
testTryWithResourcesSemi 0
testAssertAsKeywordVariantsSucceedWith14 0.002
testVarargsShouldFailWith14 0
testEnumAsKeywordShouldFailWith14 0.001
testBinaryAndUnderscoresInNumericalLiterals 0.002
testVarargsShouldPassWith15 0.033
testEnumAsKeywordShouldPassWith15 0.001
testJDK15ForLoopShouldFailWith14 0
testAssertAsVariableDeclIdentifierFailsWith14 0.001
testAssertAsIdentifierSucceedsWith13 0
testGenericINAnnotation 0.001
testMulticatch 0
testAssertAsKeywordFailsWith13 0.002
testAnnotatedLocals 0.001
testGenericDiamond 0.001
testAnnotatedParams 0
testStringInSwitch 0.002
testGenericReturnType 0.001
testEnumAsIdentifierShouldFailWith15 0
testEnumAsIdentifierShouldPassWith14 0

MethodDeclTest

testAbstract 0
testFinal 0
testPrivate 0
testSynchronized 0.001
testProtected 0
testNative 0.001
testPublic 0
testStrict 0.001

ParserCornersTest

testInnerOuterClass 0
testGenericsProblem 0.001
testLambdaBug1333 0.003
testLambdaBug1470 0.002
testGetFirstASTNameImageNull 0.001
testGitHubBug257NonExistingCast 0.001
testParseEmptyStatements 0.001
testGitHubBug208ParseError 0.001
testParsersCases15 0.023
testParsersCases17 0.01
testParsersCases18 0.023
stringConcatentationShouldNotBeCast 0.001
testBug1530ParseError 0.001
emptyFileJustComment 0
testGitHubBug207 0.002
testGitHubBug309 0.001
testBug1429ParseError 0.003
testMultipleExceptionCatching 0.001
testBug206 0.001
testCastLookaheadProblem 0

QualifiedNameTest

testParseMalformed 0.001
testParseClass 0
testPackage 0
testMethodOverload 0.002
testEmptyPackage 0
testNestedEmptyPackage 0.001
testConstructorWithParams 0
testConstructorOverload 0.001
testMethod 0
testNestedClass 0
testParsePackages 0
testParseOperation 0
testConstructor 0.001

SimpleNodeTest

testLineNumbersAreSetOnAllSiblings 0.002
testHasExplicitExtends 0.001
testFindDescendantsOfType 0
testLineNumbersForNameSplitOverTwoLines 0
testColumnsOnQualifiedName 0
testXPathNodeSelect 0.001
testGetFirstChildNestedDeeper 0
testParentMethods 0.001
testContainsChildOfType 0
testFindDescendantsOfTypeRecurse 0
testUserData 0.001
testNoExplicitExtends 0
testContainsNoInnerWithAnonInner 0.001
testGetFirstChildNested 0
testMethodSameLine 0.001
testMethodDiffLines 0
testGetFirstChild 0
testHasExplicitImplements 0
testContainsNoInner 0
skipped
testNoLookahead 0
testFindDescendantsOfTypeMultiple 0
testNoExplicitImplements 0

AcceptanceTest

testLabelledBreakLockup 0.002
testbook 0.001
test10 0
test11 0
test12 0.001
test13 0.001
test14 0.001
test15 0.001
test16 0.001
test17 0.001
test18 0.002
test19 0.002
test20 0.001
test21 0.002
test22 0.001
test23 0.001
test24 0.002
test25 0.001
test26 0.001
test27 0.001
test28 0.002
test29 0.001
test30 0.001
test1 0.001
test2 0.001
test3 0.001
test4 0
test6 0.001
test7 0
test8 0
test9 0.001

DAAPathFinderTest

testTwoUpdateDefs 0

DataFlowNodeTest

testRemovePathWithNonChild 0
testAddPathToChild 0.001
testRemovePathToChild 0
testSetType 0
testReverseParentPathsTo 0

GeneralFiddlingTest

test1 0
innerClassShouldWork 0

StatementAndBraceFinderTest

testWhileStmtHasCorrectTypes 0
testForStmtHasCorrectTypes 0.001
testOnlyWorksForMethodsAndConstructors 0
testStatementExpressionParentChildLinks 0
testVariableDeclaratorParentChildLinks 0.001
testIfStmtHasCorrectTypes 0

StructureTest

testAddResultsinDFANodeContainingAddedNode 0

VariableAccessTest

testGetVariableName 0

DataStructureTest

testAddOperation 0.002
testAddClass 0.001
testAddField 0

MetricsVisitorTest

testOperationsAreThere 0.016
testPackageStatsNotNull 0
testFieldsAreThere 0.003
testStaticOperationsSig 0.019

SigMaskTest

testEmptyOperationMask 0.003
testFinalFields 0.002
testFieldvisibility 0.002
testOperationRoles 0.006
testEmptyFieldMask 0.002
testStaticFields 0.001
testOperationVisibility 0.003

SignatureTest

testSetterDetection 0.005
isAbstractOperationTest 0.002
isFinalFieldTest 0
isStaticFieldTest 0.001
fieldPoolTest 0.001
visibilityTest 0.001
operationRoleTest 0.001
testGetterDetection 0.002
operationPoolTest 0.001

JavaRuleViolationTest

testMethodName 0
testDefaultPackageAndClassName 0
testPackageAndEnumName 0
testPackageAndMultipleClassesName 0
testASTFormalParameterVariableName 0
testPackageAndClassName 0

XPathRuleTest

testFollowingSibling 0.002
testPluginname 0.001
testImageOfPrimarySuffix 0.005
testVariables 0.001

AndroidRulesTest

CallSuperFirst::0 Success 0.003
CallSuperFirst::1 Success 0.005
CallSuperFirst::2 Failure 0.004
CallSuperFirst::3 #1154 Call super onPause when there is no super 0.004
CallSuperLast::0 Success 0.003
CallSuperLast::1 Failure 0.004
CallSuperLast::2 #1154 Call super onPause when there is no super 0.003
DoNotHardCodeSDCard::0 basic /sdcard test 0.002

BasicRulesTest

AvoidBranchingStatementAsLastInLoop::0 ok: no violations 0.005
AvoidBranchingStatementAsLastInLoop::1 violations: break:for/do/while, continue:for/do/while and return:for/do/while 0.004
AvoidBranchingStatementAsLastInLoop::2 violations: break:for/do/while 0.005
AvoidBranchingStatementAsLastInLoop::3 violations: continue:for/do/while 0.004
AvoidBranchingStatementAsLastInLoop::4 violations: return:for/do/while 0.003
AvoidBranchingStatementAsLastInLoop::5 violations: break:for 0.004
AvoidBranchingStatementAsLastInLoop::6 violations: break:do 0.003
AvoidBranchingStatementAsLastInLoop::7 violations: break:while 0.004
AvoidBranchingStatementAsLastInLoop::8 violations: continue:for 0.004
AvoidBranchingStatementAsLastInLoop::9 violations: continue:do 0.004
AvoidBranchingStatementAsLastInLoop::10 violations: continue:while 0.003
AvoidBranchingStatementAsLastInLoop::11 violations: return:for 0.004
AvoidBranchingStatementAsLastInLoop::12 violations: return:do 0.003
AvoidBranchingStatementAsLastInLoop::13 violations: return:while 0.003
AvoidBranchingStatementAsLastInLoop::14 #1170 false positive with switch in loop 0.005
AvoidDecimalLiteralsInBigDecimalConstructor::0 bad, new BigDecimal(.1) 0.004
AvoidDecimalLiteralsInBigDecimalConstructor::1 ok, new BigDecimal(".1") 0.003
AvoidDecimalLiteralsInBigDecimalConstructor::2 ok, new BigDecimal(10) 0.003
AvoidDecimalLiteralsInBigDecimalConstructor::3 bad, same as #1 but outside an initializer context 0.002
AvoidDecimalLiteralsInBigDecimalConstructor::4 #1187 double variable with AvoidDecimalLiteralsInBigDecimalConstructor 0.004
AvoidMultipleUnaryOperators::0 Simple duplicate typos 0.003
AvoidMultipleUnaryOperators::1 Compound 0.003
AvoidMultipleUnaryOperators::2 Compound with parentheses 0.003
AvoidMultipleUnaryOperators::3 Compound with parentheses an mixed operators 0.003
AvoidMultipleUnaryOperators::4 Multiple levels of nested parentheses 0.003
AvoidThreadGroup::0 bad, using new ThreadGroup() 0.003
AvoidThreadGroup::1 bad, using fully qualified java.lang.ThreadGroup() 0.002
AvoidThreadGroup::2 bad, using Thread.getThreadGroup() 0.004
AvoidThreadGroup::3 bad, using System.getSecurityManager().getThreadGroup() 0.003
AvoidThreadGroup::4 ThreadGroup() but not java.lang.ThreadGroup 0.003
AvoidThreadGroup::5 MyThreadGroup() not java.lang.ThreadGroup 0.003
AvoidThreadGroup::6 false positive, bug #1018 0.004
AvoidUsingHardCodedIP::0 Comprehensive, check for IPv4 mapped IPv6 xxx 0.004
AvoidUsingHardCodedIP::1 Common basic case 0.002
AvoidUsingHardCodedIP::2 Not detected via string concatenation. 0.003
AvoidUsingHardCodedIP::3 Null literal does not puke. 0.002
AvoidUsingHardCodedIP::4 Non String literal does not puke. 0.003
AvoidUsingHardCodedIP::5 Not an ip address string 0.002
AvoidUsingHardCodedIP::6 Comprehensive, check IPv4, IPv6, and IPv4 mapped IPv6 0.003
AvoidUsingHardCodedIP::7 Comprehensive, check for nothing 0.004
AvoidUsingHardCodedIP::8 Comprehensive, check for IPv4 0.003
AvoidUsingHardCodedIP::9 Comprehensive, check for IPv6 0.004
AvoidUsingHardCodedIP::10 Comprehensive, check for IPv4 mapped IPv6 0.005
AvoidUsingHardCodedIP::11 Comprehensive, check for IPv6 and IPv4 mapped IPv6 0.005
AvoidUsingOctalValues::0 bad, 012 0.002
AvoidUsingOctalValues::1 OK, hex value 0.002
AvoidUsingOctalValues::2 OK, long value 0.003
AvoidUsingOctalValues::3 OK, double value 0.002
AvoidUsingOctalValues::4 OK, double value 0.003
AvoidUsingOctalValues::5 bad, 012L 0.002
AvoidUsingOctalValues::6 OK, 06 if strict is not set 0.002
AvoidUsingOctalValues::7 BAD, 06 if strict is set 0.003
BigIntegerInstantiation::0 Fail, BigInteger(1) 0.003
BigIntegerInstantiation::1 Pass, BigInteger(10) 0.003
BigIntegerInstantiation::2 Fail, BigInteger(0) 0.003
BigIntegerInstantiation::3 Pass, BigDecimal(i - 1) 0.003
BigIntegerInstantiation::4 Pass, BigInteger("10") and BigDecimal in 1.4 mode 0.003
BigIntegerInstantiation::5 Fail, BigInteger(10) 1.5 mode 0.003
BigIntegerInstantiation::6 Fail, BigDecimal(1) 0.003
BigIntegerInstantiation::7 Fail, BigDecimal(10) 0.003
BigIntegerInstantiation::8 Fail, BigDecimal(0) 0.003
BooleanInstantiation::0 simple failure case 0.002
BooleanInstantiation::1 new java.lang.Boolean 0.003
BooleanInstantiation::2 ok 0.002
BooleanInstantiation::3 don't use Boolean.valueOf() with literal 0.004
BooleanInstantiation::4 valueOf() with variable is fine 0.044
BooleanInstantiation::5 don't use Boolean.valueOf() with string literal 0.003
BooleanInstantiation::6 don't use Boolean.valueOf() in method call 0.002
BooleanInstantiation::7 don't use new Boolean() in method call 0.003
BooleanInstantiation::8 ok 0.003
BooleanInstantiation::9 ok 0.003
BooleanInstantiation::10 don't use new Boolean() in static block 0.003
BooleanInstantiation::11 Bug 1744065, should be ok 0.003
BooleanInstantiation::12 Test for failure after rule with custom Boolean, should report failure if rule reset done correctly 0.003
BooleanInstantiation::13 #1533 [java] BooleanInstantiation: ClassCastException with Annotation 0.004
BrokenNullCheck::0 should be && 0.004
BrokenNullCheck::1 Ok, is && 0.004
BrokenNullCheck::2 should be &&, but now with a longer expression 0.003
BrokenNullCheck::3 should be || 0.004
BrokenNullCheck::4 Ok, is || 0.004
BrokenNullCheck::5 Arrays are Ok 0.003
BrokenNullCheck::6 Different method is Ok 0.003
BrokenNullCheck::7 Using a shorter expression with the same variable in the second check should not crash the test 0.003
BrokenNullCheck::8 1633683, should be ||, but now with another compare 0.003
BrokenNullCheck::9 1633683, Arrays are Ok II 0.003
BrokenNullCheck::10 Different literals in variables should not match 0.003
BrokenNullCheck::11 Assignments in checks are OK 0.003
BrokenNullCheck::12 Similar method calls with different arguments are OK 0.004
CheckResultSet::0 The result set is appropriately tested before using it, no violation. 0.005
CheckResultSet::1 This most common violation case, not testing is done before a call to 'last()'. 0.005
CheckResultSet::2 This most common violation case, not testing is done before a call to 'first()'. 0.004
CheckResultSet::3 Using a 'while' instead of 'if' shouldn't result in a violation. 0.004
CheckResultSet::4 #942 CheckResultSet False Positive 0.008
CheckResultSet::5 #1135 CheckResultSet ignores results set declared outside of try/catch (good case) 0.007
CheckResultSet::6 #1135 CheckResultSet ignores results set declared outside of try/catch 0.007
CheckResultSet::7 #1135 CheckResultSet ignores results set declared outside of try/catch - prevent false positive 0.004
CheckResultSet::8 #1199 PMD CheckResultSet gives false positive in a do/while loop 0.005
CheckResultSet::9 #1273 CheckResultSet false positive in try-with-resources nested in if 0.004
CheckResultSet::10 #1263 PMD reports CheckResultSet violation in completely unrelated source files. 0.004
CheckResultSet::11 Allow the result of ResultSet navigation methods to be returned 0.002
CheckSkipResult::0 failure case 0.004
CheckSkipResult::1 failure case but obfuscated 0.003
CheckSkipResult::2 return value is assigned to a variable 0.004
CheckSkipResult::3 return value is used in a function 0.003
CheckSkipResult::4 return value is returned 0.003
ClassCastExceptionWithToArray::0 bad, toArray() with cast 0.003
ClassCastExceptionWithToArray::1 ok, no cast 0.003
ClassCastExceptionWithToArray::2 Ensuring we don't have a few specific false positives, see bug 1697397 0.003
ClassCastExceptionWithToArray::3 #975 false positive in ClassCastExceptionWithToArray 0.002
ClassCastExceptionWithToArray::4 #998 False positive ClassCastExceptionWithToArray with generics 0.003
CollapsibleIfStatements::0 failure case 0.003
CollapsibleIfStatements::1 ok, intervening statements 0.002
CollapsibleIfStatements::2 ok, different intervening statements 0.003
DontCallThreadRun::0 basic use case - calls to run() 0.002
DontCallThreadRun::1 basic use case - call to Thread().run() 0.002
DontUseFloatTypeForLoopIndices::0 basic test case 0.003
DontUseFloatTypeForLoopIndices::1 Should be all OK 0.003
DoubleCheckedLocking::0 simple ok 0.002
DoubleCheckedLocking::1 simple failure 0.004
DoubleCheckedLocking::2 skip interfaces 0.003
DoubleCheckedLocking::3 Generics 0.003
DoubleCheckedLocking::4 inversed null check see bug 2835074 False -: DoubleCheckedLocking with reversed null check (1) 0.003
DoubleCheckedLocking::5 inversed null check see bug 2835074 False -: DoubleCheckedLocking with reversed null check (2) 0.003
DoubleCheckedLocking::6 Use of volatile keyword see #884 False +: DoubleCheckedLocking warning with volatile field 0.003
DoubleCheckedLocking::7 #1471 False positives for DoubleCheckedLocking 0.004
ExtendsObject::0 failure case 0.002
ExtendsObject::1 extends nothing 0.003
ExtendsObject::2 extends not Object 0.002
ForLoopShouldBeWhileLoop::0 simple failure case 0.002
ForLoopShouldBeWhileLoop::1 ok 0.003
ForLoopShouldBeWhileLoop::2 for loop like this: for (;;) {} 0.003
ForLoopShouldBeWhileLoop::3 JDK 1.5 for loop 0.003
JumbledIncrementer::0 1 0.004
JumbledIncrementer::1 2 0.003
JumbledIncrementer::2 3 0.003
JumbledIncrementer::3 using outer loop incrementor as array index is OK 0.008
MisplacedNullCheck::0 null check after method invocation with conditional AND and != 0.004
MisplacedNullCheck::1 null check after nested method invocation 0.003
MisplacedNullCheck::2 null check before nested method invocation 0.003
MisplacedNullCheck::3 1610730: null check after method invocation with conditional OR and == 0.003
MisplacedNullCheck::4 3372128: False positive: ArrayIsStoredDirectly 0.003
MisplacedNullCheck::5 #977 MisplacedNullCheck makes false positives 0.004
OverrideBothEqualsAndHashcode::0 hash code only 0.002
OverrideBothEqualsAndHashcode::1 equals only 0.004
OverrideBothEqualsAndHashcode::2 overrides both 0.006
OverrideBothEqualsAndHashcode::3 overrides neither 0.004
OverrideBothEqualsAndHashcode::4 equals sig uses String, not Object 0.004
OverrideBothEqualsAndHashcode::5 interface 0.004
OverrideBothEqualsAndHashcode::6 java.lang.Object 0.004
OverrideBothEqualsAndHashcode::7 skip Comparable implementations 0.004
OverrideBothEqualsAndHashcode::8 implements equals but with 2 args 0.004
OverrideBothEqualsAndHashcode::9 overloaded hashCode 0.003
OverrideBothEqualsAndHashcode::10 overloaded both 0.003
OverrideBothEqualsAndHashcode::11 overloaded hashCode, should fail on equals 0.003
OverrideBothEqualsAndHashcode::12 implements hashCode but with args 0.003
OverrideBothEqualsAndHashcode::13 implements interface other than Comparable, not resolvable 0.003
OverrideBothEqualsAndHashcode::14 implements interface other than Comparable, resolvable (#1303 OverrideBothEqualsAndHashcodeRule does not work on class implements resolvable interfaces) 0.003
ReturnFromFinallyBlock::0 throw exception but return from finally 0.002
ReturnFromFinallyBlock::1 lots of returns 0.002
ReturnFromFinallyBlock::2 ok 0.002
SimplifiedTernary::0 condition ? true : foo 0.003
SimplifiedTernary::1 condition ? false : foo 0.002
SimplifiedTernary::2 condition ? foo : true 0.003
SimplifiedTernary::3 condition ? foo : false 0.003
SimplifiedTernary::4 condition ? true : false 0.004
SimplifiedTernary::5 #1424 False positive with ternary operator 0.003
SimplifiedTernary::6 #232 False positive with ternary operator using nullables 0.003

BracesRulesTest

ForLoopsMustUseBraces::0 simple failure case 0.002
ForLoopsMustUseBraces::1 ok 0.001
ForLoopsMustUseBraces::2 0.002
ForLoopsMustUseBraces::3 0.001
ForLoopsMustUseBraces::4 0.001
IfElseStmtsMustUseBraces::0 else without braces 0.001
IfElseStmtsMustUseBraces::1 ok 0.002
IfElseStmtsMustUseBraces::2 two sets of missing braces 0.001
IfElseStmtsMustUseBraces::3 elseif with missing braces 0.001
IfElseStmtsMustUseBraces::4 elseif with braces after else 0.002
IfElseStmtsMustUseBraces::5 elseif with missing braces, first braces on separate line 0.001
IfElseStmtsMustUseBraces::6 bug 976643 - nested ifs without braces 0.002
IfStmtsMustUseBraces::0 simple failure case 0.002
IfStmtsMustUseBraces::1 ok 0.001
IfStmtsMustUseBraces::2 nested ifs 0.001
WhileLoopsMustUseBraces::0 no braces 0.001
WhileLoopsMustUseBraces::1 with braces 0.002

CloneRulesTest

CloneMethodMustBePublic::0 protected method clone 0.002
CloneMethodMustBePublic::1 protected method clone 2 0.001
CloneMethodMustBePublic::2 public method clone 0.001
CloneMethodMustBePublic::3 public method clone 2 0.001
CloneMethodMustBePublic::4 final class with protected clone method 0.001
CloneMethodMustBePublic::5 final class with public method 0.001
CloneMethodMustImplementCloneable::0 ok, implements Cloneable 0.002
CloneMethodMustImplementCloneable::1 bad, doesn't implement Cloneable 0.001
CloneMethodMustImplementCloneable::2 ok, not Object.clone since method has a param 0.002
CloneMethodMustImplementCloneable::3 ok, doesn't implement Cloneable but only throw CloneNotSupportedException 0.001
CloneMethodMustImplementCloneable::4 ok, inner class implements Cloneable 0.002
CloneMethodMustImplementCloneable::5 Bug 1698550, nr 1 0.001
CloneMethodMustImplementCloneable::6 Bug 1698550, nr 2 0.002
CloneMethodMustImplementCloneable::7 #1534 [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8) 0.001
CloneMethodMustImplementCloneable::8 #1532 [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable - part 1: interface 0.002
CloneMethodReturnTypeMustMatchClassName::0 protected method clone with Object as return type 0.001
CloneMethodReturnTypeMustMatchClassName::1 public method clone with Object as return type 0.001
CloneMethodReturnTypeMustMatchClassName::2 final class with public method clone 0.002
CloneMethodReturnTypeMustMatchClassName::3 final class with public method clone with Object as return type 0.001
CloneMethodReturnTypeMustMatchClassName::4 protected method clone with return type as the class name 0.001
CloneMethodReturnTypeMustMatchClassName::5 public method clone with return type as the class name 0.002
CloneThrowsCloneNotSupportedException::0 ok, throws CloneNotSupportedException 0.001
CloneThrowsCloneNotSupportedException::1 bad 0.002
CloneThrowsCloneNotSupportedException::2 final class, rule does not apply 0.001
CloneThrowsCloneNotSupportedException::3 testing with multiple methods 0.003
ProperCloneImplementation::0 ok, calls super.clone 0.001
ProperCloneImplementation::1 bad, Foo.clone() calls new Foo(); 0.001
ProperCloneImplementation::2 clone([whatever]) is fine 0.002
ProperCloneImplementation::3 bad, Foo.clone() calls new Foo(); 0.001

CodesizeRulesTest

CyclomaticComplexity::0 Simple method 0.002
CyclomaticComplexity::1 testLessComplicatedThanReportLevel 0.001
CyclomaticComplexity::2 Complicated method 0.003
CyclomaticComplexity::3 Constructor 0.002
CyclomaticComplexity::4 Testing new parameter showClassMethods 0.003
CyclomaticComplexity::5 Testing new parameter showMethodsMethods 0.003
CyclomaticComplexity::6 Testing default value of showClassMethods and showClassesComplexity 0.003
CyclomaticComplexity::7 #984 Cyclomatic complexity should treat constructors like methods: 1 - showMethodsComplexity=true 0.003
CyclomaticComplexity::8 #984 Cyclomatic complexity should treat constructors like methods: 2 - showMethodsComplexity=false 0.002
CyclomaticComplexity::9 #985 Suppressed methods shouldn't affect avg CyclomaticComplexity 0.003
ExcessiveClassLength::0 short 0.002
ExcessiveClassLength::1 long 0.003
ExcessiveClassLength::2 long class - changed minimum 0.002
ExcessiveMethodLength::0 short 0.002
ExcessiveMethodLength::1 long, normal range 0.002
ExcessiveMethodLength::2 long, minimum with longer range 0.002
ExcessiveMethodLength::3 not quite long 0.002
ExcessiveMethodLength::4 long 0.003
ExcessiveParameterList::0 short 0.002
ExcessiveParameterList::1 long 0.001
ExcessivePublicCount::0 Few public fields 0.002
ExcessivePublicCount::1 Too many public fields 0.002
ExcessivePublicCount::2 Static final 0.001
ExcessivePublicCount::3 Some public methods 0.001
ExcessivePublicCount::4 Reduced minimum 0.002
ExcessivePublicCount::5 Private fields 0.002
ExcessivePublicCount::6 Private methods 0.002
ModifiedCyclomaticComplexity::0 Simple method 0.001
ModifiedCyclomaticComplexity::1 testLessComplicatedThanReportLevel 0.002
ModifiedCyclomaticComplexity::2 Complicated method 0.004
ModifiedCyclomaticComplexity::3 Constructor 0.002
NPathComplexity::0 ok 0.002
NPathComplexity::1 fail, with minimum 0.002
NPathComplexity::2 failure case 0.004
NPathComplexity::3 test case for bug 3484404 (Invalid NPath calculation in return statement) 0.003
NPathComplexity::4 test case for bug 3484404 (Invalid NPath calculation in return statement) with minimum 25 0.002
NcssConstructorCount::0 short 0.002
NcssConstructorCount::1 lots of comments 0.003
NcssConstructorCount::2 long method 0.002
NcssConstructorCount::3 long method - changed minimum 0.003
NcssMethodCount::0 short 0.002
NcssMethodCount::1 lots of comments 0.002
NcssMethodCount::2 long method 0.003
NcssMethodCount::3 long method - changed minimum 0.003
NcssTypeCount::0 short 0.004
NcssTypeCount::1 lots of comments 0.003
NcssTypeCount::2 long method 0.005
NcssTypeCount::3 long method - changed minimum 0.004
StdCyclomaticComplexity::0 Simple method 0.003
StdCyclomaticComplexity::1 Simple method 0.003
StdCyclomaticComplexity::2 Complicated method 0.004
StdCyclomaticComplexity::3 Constructor 0.003
StdCyclomaticComplexity::4 Testing new parameter showClassMethods 0.005
StdCyclomaticComplexity::5 Testing new parameter showMethodsMethods 0.003
StdCyclomaticComplexity::6 Testing default value of showClassMethods and showClassesComplexity 0.003
StdCyclomaticComplexity::7 #984 Cyclomatic complexity should treat constructors like methods: 1 - showMethodsComplexity=true 0.003
StdCyclomaticComplexity::8 #984 Cyclomatic complexity should treat constructors like methods: 2 - showMethodsComplexity=false 0.002
StdCyclomaticComplexity::9 #985 Suppressed methods shouldn't affect avg CyclomaticComplexity 0.003
TooManyFields::0 3 fields, max is 15 0.002
TooManyFields::1 3 fields, reduced max to 2 0.002
TooManyFields::2 16 fields, bad 0.001
TooManyFields::3 12 fields, but 6 in inner and 6 in outer 0.002
TooManyFields::4 outer class, inner interface, both OK 0.002
TooManyFields::5 interface with 10 fields 0.002
TooManyFields::6 2 inner classes, each with > 10 fields 0.002
TooManyFields::7 anonymous class with a field 0.002
TooManyFields::8 lots of static finals, those are ok 0.002
TooManyMethods::0 Less than 10 methods. 0.002
TooManyMethods::1 More than 10 methods. 0.002
TooManyMethods::2 Less than 10 methods, with getter/setter... 0.002
TooManyMethods::3 #1457 TooManyMethods counts inner class methods 0.002

StdCyclomaticComplexityRuleTest

entryStackMustBeEmpty 0

AbstractCommentRuleTest

testCommentAssignments 0
testFilteredCommentIn 0

CommentRulesTest

CommentContent::0 Includes bad words 0.001
CommentDefaultAccessModifier::0 Some methods and Fields with default access modifier in a class 0.002
CommentDefaultAccessModifier::1 All methods and Field with default access modifier in a class 0.001
CommentDefaultAccessModifier::2 All methods and Field without default access modifier in a class 0.001
CommentDefaultAccessModifier::3 Methods with default access modifier in an Interface 0.001
CommentDefaultAccessModifier::4 Nested classes with default access modifier 0.002
CommentDefaultAccessModifier::5 Test own regex to default access modifier rule 0.002
CommentDefaultAccessModifier::6 Declarations inside an enum 0.002
CommentDefaultAccessModifier::7 #1430 CommentDefaultAccessModifier triggers on field annotated with @VisibleForTesting 0.001
CommentRequired::0 Missing comments - all required (default). 0.001
CommentRequired::1 All elements have javadoc comments. 0.002
CommentRequired::2 Missing comments - only class level required. 0.002
CommentRequired::3 Too many comments - all comments are unwanted. 0.003
CommentRequired::4 #1115 commentRequiredRule in pmd 5.1 is not working properly 0.002
CommentRequired::5 #1115 commentRequiredRule in pmd 5.1 is not working properly - without new lines 0.001
CommentRequired::6 #1289 CommentRequired not ignored if javadoc {@inheritDoc} anon inner classes 0.002
CommentRequired::7 #1434 CommentRequired raises violation on serialVersionUID field 0.001
CommentRequired::8 comment required on serialVersionUID of wrong type 0.002
CommentRequired::9 serialVersionUID comment required 0.001
CommentRequired::10 #1522 [java] CommentRequired: false positive 0.003
CommentSize::0 Too many lines 0.002

ControversialRulesTest

AssignmentInOperand::0 bad 0.003
AssignmentInOperand::1 ok 0.002
AssignmentInOperand::2 assignment in if conditional expression 0.003
AssignmentInOperand::3 assignment in while conditional expression 0.002
AssignmentInOperand::4 ok 0.003
AssignmentInOperand::5 assignment in for conditional expression 0.002
AssignmentInOperand::6 increment in if conditional expression 0.003
AssignmentInOperand::7 assignment in while conditional expression, allowed 0.003
AssignmentInOperand::8 assignment in if conditional expression, allowed 0.003
AssignmentInOperand::9 assignment in for conditional expression, allowed 0.002
AssignmentInOperand::10 increment in if conditional expression, allowed 0.002
AtLeastOneConstructor::0 ok 0.003
AtLeastOneConstructor::1 simple failure case 0.002
AtLeastOneConstructor::2 inner bad, outer ok 0.002
AtLeastOneConstructor::3 inner ok, outer bad 0.002
AtLeastOneConstructor::4 inner and outer both bad 0.002
AtLeastOneConstructor::5 inner and outer both ok 0.003
AtLeastOneConstructor::6 skip interfaces 0.002
AtLeastOneConstructor::7 skip static classes 0.002
AtLeastOneConstructor::8 skip classes with only static methods 0.002
AtLeastOneConstructor::9 Don't skip classes with non-static methods; #1216 AtLeastOneConstructor ignores classes with *any* methods 0.003
AvoidFinalLocalVariable::0 Basic, common test case. 0.002
AvoidFinalLocalVariable::1 Other use of final should not raise violations. 0.002
AvoidFinalLocalVariable::2 Bug 2027626, False + : AvoidFinalLocalVariable 0.002
AvoidFinalLocalVariable::3 #1095 AvoidFinalLocalVariable false positive 0.003
AvoidLiteralsInIfCondition::0 basic test 0.005
AvoidLiteralsInIfCondition::1 basic test, part2 0.006
AvoidLiteralsInIfCondition::2 allow null literal 0.006
AvoidLiteralsInIfCondition::3 #1213 AvoidLiteralsInIfCondition -- switch for integer comparison with 0 0.009
AvoidLiteralsInIfCondition::4 #1213 AvoidLiteralsInIfCondition -- switch for integer comparison with 0.0 0.008
AvoidLiteralsInIfCondition::5 XPath error: An empty sequence is not allowed as the second argument of index-of() 0.008
AvoidPrefixingMethodParameters::0 AvoidPrefixingMethodParameters basic test case 0.004
AvoidPrefixingMethodParameters::1 AvoidPrefixingMethodParameters basic test case, no violation 0.004
AvoidPrefixingMethodParameters::2 AvoidPrefixingMethodParameters basic test case, only one parameter is prefixed 0.003
AvoidPrefixingMethodParameters::3 AvoidPrefixingMethodParameters limit: if parameters is named in or out, report a violation. 0.004
AvoidPrefixingMethodParameters::4 AvoidPrefixingMethodParameters basic test case: in is not a prefix, not using camel case in parameter name. 0.003
AvoidUsingNativeCode::0 Basic test case : using native code 0.004
AvoidUsingShortType::0 Short as field 0.003
AvoidUsingShortType::1 Short as local variable 0.002
AvoidUsingShortType::2 Short as method return type 0.003
AvoidUsingShortType::3 Short as method return type 0.002
AvoidUsingShortType::4 #1449 false positive when casting a variable to short 0.002
AvoidUsingVolatile::0 Basic test case 0.002
CallSuperInConstructor::0 TEST1 0.002
CallSuperInConstructor::1 TEST2 0.002
CallSuperInConstructor::2 don't flag classes w/o extends 0.002
CallSuperInConstructor::3 Enum 0.002
DataflowAnomalyAnalysis::0 ok 0.003
DataflowAnomalyAnalysis::1 DD anomaly 0.003
DataflowAnomalyAnalysis::2 DU anomaly 0.002
DataflowAnomalyAnalysis::3 UR anomaly 0.003
DataflowAnomalyAnalysis::4 more komplex anomalysis 0.002
DataflowAnomalyAnalysis::5 #1393 PMD hanging during DataflowAnomalyAnalysis 2.927
DefaultPackage::0 ok 0.003
DefaultPackage::1 bad 0.002
DefaultPackage::2 interface methods are always public 0.003
DefaultPackage::3 interface field are always public 0.002
DefaultPackage::4 bad 0.002
DefaultPackage::5 #1410 DefaultPackage triggers on field annotated with @VisibleForTesting 0.003
DoNotCallGarbageCollectionExplicitly::0 Basic test case 0.002
DoNotCallGarbageCollectionExplicitly::1 Alernate Basic test case 0.002
DoNotCallGarbageCollectionExplicitly::2 Call in a constructor 0.003
DontImportSun::0 bad, import from sun. 0.002
DontImportSun::1 ok, signal is ok 0.003
NullAssignment::0 initial assignment 0.002
NullAssignment::1 bad assignment 0.003
NullAssignment::2 check test 0.003
NullAssignment::3 null param on right hand sidel 0.002
NullAssignment::4 null assignment in ternary 0.003
NullAssignment::5 null assignment in ternary, part deux 0.003
NullAssignment::6 comparison is not assignment 0.002
NullAssignment::7 final fields must be assigned 0.003
NullAssignment::8 1556594 - Wonky detection of NullAssignment 0.003
OneDeclarationPerLine::0 OneDeclarationPerLine's basic test case 0.005
OneDeclarationPerLine::1 OneDeclarationPerLine's potential false+ 0.004
OneDeclarationPerLine::2 #1221 OneDeclarationPerLine really checks for one declaration each statement 0.005
OneDeclarationPerLine::3 #1221 OneDeclarationPerLine really checks for one declaration each statement 0.004
OnlyOneReturn::0 two returns 0.003
OnlyOneReturn::1 one 0.003
OnlyOneReturn::2 none 0.002
OnlyOneReturn::3 void 0.002
OnlyOneReturn::4 finally 0.003
OnlyOneReturn::5 return inside anonymous inner class 0.003
OnlyOneReturn::6 #1353 False positive "Only One Return" with lambda 0.013
SuspiciousOctalEscape::0 should be flagged 0.003
SuspiciousOctalEscape::1 should be flagged - different octal 0.003
SuspiciousOctalEscape::2 should be flagged - different octal 0.003
SuspiciousOctalEscape::3 [ 2050064 ] False + SuspiciousOctalEscape with backslash literal 0.002
SuspiciousOctalEscape::4 [ 2050064 ] False + SuspiciousOctalEscape with backslash literal, second test case 0.003
UnnecessaryConstructor::0 simple failure case 0.002
UnnecessaryConstructor::1 private constructor 0.002
UnnecessaryConstructor::2 constructor with arguments 0.002
UnnecessaryConstructor::3 constructor with contents 0.002
UnnecessaryConstructor::4 constructor throws exception 0.002
UnnecessaryConstructor::5 two constructors 0.002
UnnecessaryConstructor::6 inner class with unnecessary constructor 0.002
UnnecessaryConstructor::7 inner and outer both have unnecessary constructors 0.002
UnnecessaryConstructor::8 inner and outer, both ok 0.002
UnnecessaryConstructor::9 inner ok, outer bad 0.003
UnnecessaryConstructor::10 inner ok due to nonpublic constructor 0.002
UnnecessaryConstructor::11 constructor calls super 0.002
UnnecessaryConstructor::12 constructor calls super, no args 0.002
UnnecessaryParentheses::0 failure case, returning literal 0.002
UnnecessaryParentheses::1 ok, complex expression 0.003
UnnecessaryParentheses::2 bad, returning variable in parens 0.002
UnnecessaryParentheses::3 ok, returning comparison 0.002
UnnecessaryParentheses::4 typecast 0.077
UseConcurrentHashMap::0 Basic use case 0.003
UseConcurrentHashMap::1 #1034 UseConcurrentHashMap flags calls to methods that return Map 0.002
UseConcurrentHashMap::2 #1342 UseConcurrentHashMap false positive (with documentation example) 0.003
UseObjectForClearerAPI::0 No issues here 0.003
UseObjectForClearerAPI::1 0.002

CouplingRulesTest

CouplingBetweenObjects::0 lots of coupling 0.002
CouplingBetweenObjects::1 no coupling 0.001
CouplingBetweenObjects::2 skip interfaces 0.002
ExcessiveImports::0 bad 0.001
ExcessiveImports::1 ok 0.001
LawOfDemeter::0 Simple method 0.001
LawOfDemeter::1 Mixed local and foreign method calls 0.003
LawOfDemeter::2 Simple Method calls without chaining 0.003
LawOfDemeter::3 Simple Method calls with chaining 0.002
LawOfDemeter::4 Simple Method calls with local created object 0.002
LawOfDemeter::5 Simple Method calls with local created object and other variable assignment 0.002
LawOfDemeter::6 Simple Method calls with local created object and variables 0.002
LawOfDemeter::7 Simple Method call on local created object within nesting local scopes 0.002
LawOfDemeter::8 Example documentation 0.004
LawOfDemeter::9 Static methods 0.003
LawOfDemeter::10 Exclude iterator and list elements 0.006
LawOfDemeter::11 #999 false positives 0.003
LawOfDemeter::12 #999 false negatives 0.001
LawOfDemeter::13 #1245 False Positive for Law of Demeter 0.003
LawOfDemeter::14 #1427 False Positive for Law of Demeter 0.004
LooseCoupling::0 returning a HashSet, bad 0.001
LooseCoupling::1 returning a Map, OK 0.001
LooseCoupling::2 no problemo 0.002
LooseCoupling::3 returning a set 0.002
LooseCoupling::4 field declared of type HashSet 0.002
LooseCoupling::5 field, return type both HashSet 0.001
LooseCoupling::6 two fields 0.002
LooseCoupling::7 method param is HashMap 0.002
LooseCoupling::8 Vector could be List 0.001
LooseCoupling::9 ArrayList could be List 0.001
LooseCoupling::10 #938 False positive on LooseCoupling for overriding methods 0.002
LoosePackageCoupling::0 default package: nothing configured, ok 0.003
LoosePackageCoupling::1 default package: unused package, ok 0.002
LoosePackageCoupling::2 default package: single package w/ exception, ok 0.002
LoosePackageCoupling::3 default package: single package w/o exception, bad 0.003
LoosePackageCoupling::4 default package: nested package w/o exception, bad 0.003
LoosePackageCoupling::5 default package: nested package w/ exception, bad 0.002
LoosePackageCoupling::6 some package: nothing configured, ok 0.004
LoosePackageCoupling::7 some package: unused package, ok 0.004
LoosePackageCoupling::8 some package: single package w/ exception, ok 0.003
LoosePackageCoupling::9 some package: single package w/o exception, bad 0.004
LoosePackageCoupling::10 some package: nested package w/o exception, but in same package, ok 0.003
LoosePackageCoupling::11 some package: nested package and sub-package, with different exceptions, bad 0.004
LoosePackageCoupling::12 bug fix: annotation before package 0.001

DesignRulesTest

AbstractClassWithoutAbstractMethod::0 concrete class 0.012
AbstractClassWithoutAbstractMethod::1 failure case 0.009
AbstractClassWithoutAbstractMethod::2 failure case, 1 method 0.008
AbstractClassWithoutAbstractMethod::3 abstract class with abstract method 0.008
AbstractClassWithoutAbstractMethod::4 abstract class implements interface 0.008
AbstractClassWithoutAnyMethod::0 Empty abstract method should trigger the rule nonetheless 0.008
AbstractClassWithoutAnyMethod::1 An abstract method without any method at all (Basic test case) 0.008
AbstractClassWithoutAnyMethod::2 An abstract method with constructors 0.008
AbstractClassWithoutAnyMethod::3 An abstract class with method, no violation 0.008
AccessorClassGeneration::0 inner class has private constructor 0.009
AccessorClassGeneration::1 inner class has public constructor 0.009
AccessorClassGeneration::2 outer class has public constructor 0.025
AccessorClassGeneration::3 final inner class 0.011
AccessorClassGeneration::4 interface inner class has private constructor 0.01
AccessorClassGeneration::5 there's a check for int declaration - not sure right now why 0.012
AccessorClassGeneration::6 #1452 ArrayIndexOutOfBoundsException with Annotations for AccessorClassGenerationRule 0.009
AccessorClassGeneration::7 #291 - Private constructor called from anonymous class 0.012
AccessorClassGeneration::8 Array initializer is not a class body 0.009
AccessorMethodGeneration::0 inner class accesses private field from outer class 0.011
AccessorMethodGeneration::1 inner class accesses private field from outer class unqualified 0.009
AccessorMethodGeneration::2 outer class accesses private field from inner class 0.009
AccessorMethodGeneration::3 non private fields are ok 0.009
AccessorMethodGeneration::4 inner class accesses private method of outer class, unqualified 0.009
AccessorMethodGeneration::5 inner class accesses private method of outer class, qualified 0.009
AccessorMethodGeneration::6 outer class accesses private method of inner class 0.008
AccessorMethodGeneration::7 inner class accesses non-private methods of outer class 0.01
AccessorMethodGeneration::8 #274 - Method inside static inner class incorrectly reported as generating accessor methods 0.011
AssignmentToNonFinalStatic::0 clear rule violation 0.009
AssignmentToNonFinalStatic::1 ok 0.009
AvoidDeeplyNestedIfStmts::0 Bad, very deep 0.009
AvoidDeeplyNestedIfStmts::1 OK, not so deep 0.014
AvoidInstanceofChecksInCatchClause::0 bad, instanceof FooException 0.011
AvoidInstanceofChecksInCatchClause::1 ok, no instanceof 0.012
AvoidProtectedFieldInFinalClass::0 ok, protected field in non final class 0.011
AvoidProtectedFieldInFinalClass::1 bad, protected field in final class 0.01
AvoidProtectedFieldInFinalClass::2 ok, private field in final class 0.013
AvoidProtectedFieldInFinalClass::3 protected field in inner class is ok 0.013
AvoidProtectedMethodInFinalClassNotExtending::0 ok, protected method in non final class 0.011
AvoidProtectedMethodInFinalClassNotExtending::1 bad, protected method in final class that doesn't extend anything 0.009
AvoidProtectedMethodInFinalClassNotExtending::2 bad, protected method in final class that doesn't extend anything but implements interface 0.008
AvoidProtectedMethodInFinalClassNotExtending::3 ok, protected method in final class that does extend something 0.008
AvoidProtectedMethodInFinalClassNotExtending::4 ok, private method in final class 0.009
AvoidProtectedMethodInFinalClassNotExtending::5 protected method in non-final inner class is ok 0.008
AvoidProtectedMethodInFinalClassNotExtending::6 protected method in final inner class that extends something is ok 0.008
AvoidProtectedMethodInFinalClassNotExtending::7 protected method in final inner class that does not extend something is bad 0.008
AvoidProtectedMethodInFinalClassNotExtending::8 #1241 False+ AvoidProtectedMethodInFinalClassNotExtending 0.008
AvoidReassigningParameters::0 reassigned parameter, bad 0.009
AvoidReassigningParameters::1 one parameter, not reassigned, good 0.008
AvoidReassigningParameters::2 instance variable and parameter have same name 0.008
AvoidReassigningParameters::3 qualified instance variable same name as parameter 0.041
AvoidReassigningParameters::4 qualified name same as parameter 0.009
AvoidReassigningParameters::5 assignment to parameter public field 0.01
AvoidReassigningParameters::6 assignment to array parameter slot 0.009
AvoidReassigningParameters::7 throws a stacktrace 0.009
AvoidReassigningParameters::8 postfix increment in array dereference is bad 0.014
AvoidReassigningParameters::9 assignment to array slot 0.014
AvoidReassigningParameters::10 assignment to array 0.013
AvoidReassigningParameters::11 The rule should also detect parameter reassignment in constructors (at least to help young programmers still learning java basic) 0.015
AvoidReassigningParameters::12 The rule should take into account uses of field names, inherited or not, matching the method parameter name. 0.012
AvoidReassigningParameters::13 parameter name starting with "this" or "super" should still be flagged 0.008
AvoidReassigningParameters::14 local variables should not be flagged 0.008
AvoidReassigningParameters::15 2410201, False+ AvoidReassigningParameters 0.01
AvoidReassigningParameters::16 #1330 AvoidReassigningParameters does not work with varargs 0.008
AvoidSynchronizedAtMethodLevel::0 TEST1 0.008
AvoidSynchronizedAtMethodLevel::1 TEST2 0.008
AvoidSynchronizedAtMethodLevel::2 #991 AvoidSynchronizedAtMethodLevel for static methods - bad case 0.008
AvoidSynchronizedAtMethodLevel::3 #991 AvoidSynchronizedAtMethodLevel for static methods - good case 0.008
BadComparison::0 comparison to Double.NaN 0.008
BadComparison::1 ok equality comparison 0.009
BadComparison::2 comparison to Float.NaN 0.008
ClassWithOnlyPrivateConstructorsShouldBeFinal::0 Simple violation 0.008
ClassWithOnlyPrivateConstructorsShouldBeFinal::1 ok, class is final 0.008
ClassWithOnlyPrivateConstructorsShouldBeFinal::2 One public constructor, not required to be final 0.008
ClassWithOnlyPrivateConstructorsShouldBeFinal::3 Ok, subclass using the private constructor 0.008
ClassWithOnlyPrivateConstructorsShouldBeFinal::4 Ok, subclass using the private constructor of another subclass 0.008
ClassWithOnlyPrivateConstructorsShouldBeFinal::5 Ok, two classes 0.008
ClassWithOnlyPrivateConstructorsShouldBeFinal::6 One protected constructor, not required to be final 0.009
ClassWithOnlyPrivateConstructorsShouldBeFinal::7 One package private constructor, not required to be final 0.009
CloseResource::0 connection is closed, ok 0.01
CloseResource::1 connection not closed, should have failed 0.01
CloseResource::2 ResultSet not closed, should have failed 0.01
CloseResource::3 Statement not closed, should have failed 0.011
CloseResource::4 Bad, no closeTargets properties for statements 0.013
CloseResource::5 Ok, closeTargets properties for statements 0.011
CloseResource::6 Add type param 0.013
CloseResource::7 OK 0.012
CloseResource::8 New use case 0.012
CloseResource::9 [1964798] 3 bugs in CloseResourceRule : Case failing with complete name 0.01
CloseResource::10 [1964798] 3 bugs in CloseResourceRule : null object is passed to close conection method (1) 0.064
CloseResource::11 [1964798] 3 bugs in CloseResourceRule : null object is passed to close conection method (2) 0.011
CloseResource::12 [1964798] 3 bugs in CloseResourceRule : If connection is returned, we should not log a violation. 0.012
CloseResource::13 invoke an external method that close the resource bug 2920057 0.012
CloseResource::14 invoke an external method that closes the resource, but one is not the right method and an another is not the right variable see bug 2920057 0.014
CloseResource::15 #1011 CloseResource Rule ignores Constructors 0.011
CloseResource::16 #1011 CloseResource Rule ignores Constructors - closed in finally 0.011
CloseResource::17 #1011 CloseResource Rule ignores Constructors - not a problem - instance variable 0.01
CloseResource::18 #1029 No instance level check in the close resource rule 0.009
CloseResource::19 #947 CloseResource rule fails if field is marked with annotation 0.013
CloseResource::20 #992 Class java.beans.Statement triggered in CloseResource rule 0.012
CloseResource::21 Custom close method, should be ok 0.01
CloseResource::22 bug #1131 CloseResource should complain if code between declaration of resource and try: Code between declaration and try, should fail 0.011
CloseResource::23 bug #1131 CloseResource should complain if code between declaration of resource and try: Creation inside try, ok 0.011
CloseResource::24 bug #1131 CloseResource should complain if code between declaration of resource and try: No sentences between creation and try, ok 0.011
CloseResource::25 #1259 CloseResource rule ignores conditionals within finally blocks 0.011
CloseResource::26 #1375 CloseResource not detected properly - ok 0.012
CloseResource::27 #1375 CloseResource not detected properly - false negative 0.012
CloseResource::28 #1372 False Negative for CloseResource rule. 0.015
CloseResource::29 #1387 CloseResource has false positive for ResultSet 0.016
CloseResource::30 Verify closeAsDefaultTarget property 0.011
CloseResource::31 #1479 CloseResource false positive on Statement 0.008
CompareObjectsWithEquals::0 simple failure with method params 0.009
CompareObjectsWithEquals::1 primitives are ok 0.008
CompareObjectsWithEquals::2 skip nulls 0.009
CompareObjectsWithEquals::3 missed hit - qualified names. that's ok, we can't resolve the types yet, so better to skip this for now 0.008
CompareObjectsWithEquals::4 more qualified name skippage 0.009
CompareObjectsWithEquals::5 locals 0.008
CompareObjectsWithEquals::6 2 locals declared on one line 0.009
CompareObjectsWithEquals::7 array element comparison 0.009
CompareObjectsWithEquals::8 Comparing against new object should always return false 0.009
CompareObjectsWithEquals::9 qualified call in allocation 0.009
CompareObjectsWithEquals::10 #1028 False-positive: Compare objects with equals for Enums 0.009
CompareObjectsWithEquals::11 #1128 CompareObjectsWithEquals False Positive comparing boolean (primitive) values 0.012
CompareObjectsWithEquals::12 #1376 CompareObjectsWithEquals fails for type annotated method parameter 0.015
ConfusingTernary::0 !=, bad 0.011
ConfusingTernary::1 ==, good 0.01
ConfusingTernary::2 != inside if, bad 0.09
ConfusingTernary::3 match && match, not confusing, OK 0.01
ConfusingTernary::4 A couple of bad and good cases 0.022
ConfusingTernary::5 #1161 Confusing Ternary should skip else if statements (or have a property to do so) (ignoreElseIf=false) 0.011
ConfusingTernary::6 #1161 Confusing Ternary should skip else if statements (or have a property to do so) (ignoreElseIf=true) 0.009
ConfusingTernary::7 #1198 ConfusingTernary does not ignore else if blocks even when property is set 0.011
ConstantsInInterface::0 constants in interface, no methods 0.009
ConstantsInInterface::1 constants in interface, with methods, ignoreIfHasMethods is false 0.014
ConstantsInInterface::2 constants in interface, with methods, ignoreIfHasMethods is true 0.014
ConstantsInInterface::3 #1505 [java] ConstantsInInterface false negative 0.014
ConstantsInInterface::4 clear rule violation (from AvoidConstantsInInterface) 0.011
ConstantsInInterface::5 ok (from AvoidConstantsInInterface) 0.009
ConstructorCallsOverridableMethod::0 calling public method from constructor 0.009
ConstructorCallsOverridableMethod::1 calling protected method from constructor 0.009
ConstructorCallsOverridableMethod::2 calling package private method from constructor 0.009
ConstructorCallsOverridableMethod::3 calling private method, ok 0.01
ConstructorCallsOverridableMethod::4 overloaded constructors, calling public method 0.009
ConstructorCallsOverridableMethod::5 calling method on literal bug 0.01
ConstructorCallsOverridableMethod::6 method in anonymous inner class is ok 0.009
ConstructorCallsOverridableMethod::7 method in lambda expression is ok 0.01
ConstructorCallsOverridableMethod::8 bug report 975407 0.01
ConstructorCallsOverridableMethod::9 ignore abstract methods 0.009
ConstructorCallsOverridableMethod::10 Generics 0.008
ConstructorCallsOverridableMethod::11 985989, base line 0.01
ConstructorCallsOverridableMethod::12 985989, inner static class should be checked as well 0.01
ConstructorCallsOverridableMethod::13 bug #1005 False + for ConstructorCallsOverridableMethod - overloaded methods 0.013
ConstructorCallsOverridableMethod::14 bug #1127 False positive: Constructor Calls Overridable Method 0.008
ConstructorCallsOverridableMethod::15 NullPointer while analyzing ExcessiveLengthRule 0.015
ConstructorCallsOverridableMethod::16 #1388 ConstructorCallsOverridableMethodRule doesn't work with params? 0.009
DefaultLabelNotLastInSwitchStmt::0 ok 0.008
DefaultLabelNotLastInSwitchStmt::1 bad 0.009
DefaultLabelNotLastInSwitchStmt::2 ok, no default 0.009
EmptyMethodInAbstractClassShouldBeAbstract::0 void return method, with no return statement. 0.008
EmptyMethodInAbstractClassShouldBeAbstract::1 non-void return method, with just a, most likely, dummy return statement. 0.009
EmptyMethodInAbstractClassShouldBeAbstract::2 A method with just a return statement, but a meaningful one. 0.009
EmptyMethodInAbstractClassShouldBeAbstract::3 Other valid methods. 0.01
EmptyMethodInAbstractClassShouldBeAbstract::4 nested abstract class 0.009
EmptyMethodInAbstractClassShouldBeAbstract::5 nested class in abstract class 0.008
EmptyMethodInAbstractClassShouldBeAbstract::6 Bug 1888967 : Detection of dummy method 0.01
EmptyMethodInAbstractClassShouldBeAbstract::7 Bug 1888967 : Those methods should not be detected as a violation. 0.009
EmptyMethodInAbstractClassShouldBeAbstract::8 Bug 1888967 : This method should not be detected as a violation. 0.009
EmptyMethodInAbstractClassShouldBeAbstract::9 Bug 1932242 : False +, returning a String does not count as an Empty Method 0.01
EmptyMethodInAbstractClassShouldBeAbstract::10 #1147 EmptyMethodInAbstractClassShouldBeAbstract false positives 0.009
EmptyMethodInAbstractClassShouldBeAbstract::11 Detect empty statements 0.012
EqualsNull::0 object.equals(null), bad 0.014
EqualsNull::1 object == null, ok 0.014
EqualsNull::2 object.method().equals(null), bad 0.014
EqualsNull::3 object.equals(null, other), ok 0.009
EqualsNull::4 #1120 equalsnull false positive 0.009
FieldDeclarationsShouldBeAtStartOfClass::0 basic test 0.008
FieldDeclarationsShouldBeAtStartOfClass::1 basic test, not OK 0.009
FieldDeclarationsShouldBeAtStartOfClass::2 inner class, OK 0.009
FieldDeclarationsShouldBeAtStartOfClass::3 Initial report where rule was introduced, [ 2487971 ] False positive with field-level annotations 0.009
FieldDeclarationsShouldBeAtStartOfClass::4 #1126 False positive with FieldDeclarationsShouldBeAtStartOfClass for static enums 0.009
FieldDeclarationsShouldBeAtStartOfClass::5 #1126 Do not ignore enums 0.01
FieldDeclarationsShouldBeAtStartOfClass::6 #1244 FieldDeclarationsShouldBeAtStartOfClass and anonymous classes, ok 0.01
FieldDeclarationsShouldBeAtStartOfClass::7 #1244 FieldDeclarationsShouldBeAtStartOfClass and anonymous classes, fail 0.011
FieldDeclarationsShouldBeAtStartOfClass::8 #1354 Complex FieldDeclarationsShouldBeAtStartOfClass false positive with Spring annotations 0.009
FieldDeclarationsShouldBeAtStartOfClass::9 #1364 FieldDeclarationsShouldBeAtStartOfClass false positive using multiple annotations 0.01
FieldDeclarationsShouldBeAtStartOfClass::10 #345 [java] FieldDeclarationsShouldBeAtStartOfClass: Add ability to ignore interfaces - default case 0.009
FieldDeclarationsShouldBeAtStartOfClass::11 #345 [java] FieldDeclarationsShouldBeAtStartOfClass: Add ability to ignore interfaces - ignore interfaces 0.009
FinalFieldCouldBeStatic::0 simple failure case 0.008
FinalFieldCouldBeStatic::1 already static, OK 0.008
FinalFieldCouldBeStatic::2 non-final, OK 0.008
FinalFieldCouldBeStatic::3 non-primitive failure case - only works for String 0.009
FinalFieldCouldBeStatic::4 final field that's a thread, OK 0.008
FinalFieldCouldBeStatic::5 don't flag interfaces 0.008
FinalFieldCouldBeStatic::6 bug #1002 False +: FinalFieldCouldBeStatic on inner class 0.009
FinalFieldCouldBeStatic::7 #275 - False positive in @interface 0.009
GodClass::0 Simple god class 0.016
GodClass::1 #1085 NullPointerException by at net.sourceforge.pmd.lang.java.rule.design.GodClassRule.visit(GodClassRule.java:313) 0.009
IdempotentOperations::0 assignment of a variable (local or field) to itself 0.008
IdempotentOperations::1 assignment of one array element to another 0.009
IdempotentOperations::2 qualified names causing NPE troubleshooting 0.009
IdempotentOperations::3 check for method calls 0.008
IdempotentOperations::4 compound assignments are OK 0.009
IdempotentOperations::5 #1104 IdempotentOperation false positive 0.051
ImmutableField::0 could be immutable, only assigned in constructor 0.012
ImmutableField::1 could be immutable, only assigned in decl 0.01
ImmutableField::2 ok, assigned twice 0.014
ImmutableField::3 ok, static field 0.014
ImmutableField::4 ok, one constructor assigns, one doesn't 0.015
ImmutableField::5 ok, assignment via postfix expression 0.01
ImmutableField::6 postfix expressions imply mutability 0.009
ImmutableField::7 compound assignment 0.01
ImmutableField::8 preincrement 0.009
ImmutableField::9 predecrement 0.009
ImmutableField::10 compound assignment 2 0.014
ImmutableField::11 rhs 2 0.013
ImmutableField::12 assignment in constructor is in try block 0.009
ImmutableField::13 assignment in method is in try block 0.009
ImmutableField::14 assignment in constructor in loop is ok 0.009
ImmutableField::15 assignment in anonymous inner class method is OK 0.011
ImmutableField::16 assignment through this 0.009
ImmutableField::17 volatile variables can't be final 0.009
ImmutableField::18 Bug 1740480, optional override of default value based on constructor argument check 0.008
ImmutableField::19 Bug 1740480, assignment in single constructor based on constructor argument check 0.009
ImmutableField::20 3526212, pmd-5.0.0: ImmutableField false positive on self-inc/dec 0.009
ImmutableField::21 #946 ImmutableField false + 0.01
ImmutableField::22 #1032 ImmutableField Rule: Private field in inner class gives false positive 0.01
ImmutableField::23 #1448 [java] ImmutableField: Private field in inner class gives false positive with lambdas 0.01
ImmutableField::24 #410 [java] ImmutableField: False positive with lombok 0.009
InstantiationToGetClass::0 simple failure case 0.008
InstantiationToGetClass::1 ok 0.008
InstantiationToGetClass::2 should catch param to constructor 0.01
LogicInversion::0 failure case, inequality 0.008
LogicInversion::1 failure case, comparison 0.008
LogicInversion::2 correct inequality 0.008
LogicInversion::3 correct comparison 0.008
MissingBreakInSwitch::0 one case, which is not empty 0.009
MissingBreakInSwitch::1 just skip empty switch 0.009
MissingBreakInSwitch::2 one break, but two cases + one default case. But there is an intentional fall through - because there are no statemenets between case 1 and case 2. 0.008
MissingBreakInSwitch::3 each case stmt has a return 0.009
MissingBreakInSwitch::4 all cases have return or throw 0.009
MissingBreakInSwitch::5 3496028: False- 0.053
MissingBreakInSwitch::6 #1246 False positive from MissingBreakInSwitch 0.009
MissingBreakInSwitch::7 #550 False +: MissingBreakInSwitch 0.009
MissingBreakInSwitch::8 #1262 False positive for MissingBreakInSwitch 0.009
MissingBreakInSwitch::9 #1552 MissingBreakInSwitch - False positive for continue 0.009
MissingStaticMethodInNonInstantiatableClass::0 ok 0.013
MissingStaticMethodInNonInstantiatableClass::1 ok, default constructor 0.012
MissingStaticMethodInNonInstantiatableClass::2 simple failure 0.009
MissingStaticMethodInNonInstantiatableClass::3 failure with multiple constructors 0.009
MissingStaticMethodInNonInstantiatableClass::4 protected constructor is ok 0.009
MissingStaticMethodInNonInstantiatableClass::5 ok, one static method 0.009
MissingStaticMethodInNonInstantiatableClass::6 nested class 0.009
MissingStaticMethodInNonInstantiatableClass::7 ok, public static field 0.009
MissingStaticMethodInNonInstantiatableClass::8 not ok, non-public static field 0.009
MissingStaticMethodInNonInstantiatableClass::9 ok, protected static field 0.009
MissingStaticMethodInNonInstantiatableClass::10 ok, package private static field 0.009
MissingStaticMethodInNonInstantiatableClass::11 ok, checking for bug 1432595 0.01
MissingStaticMethodInNonInstantiatableClass::12 #1125 Missing Static Method In Non Instantiatable Class / Factory 0.014
MissingStaticMethodInNonInstantiatableClass::13 Check Builder pattern 0.015
NonCaseLabelInSwitchStatement::0 label inside switch 0.014
NonCaseLabelInSwitchStatement::1 ok 0.013
NonStaticInitializer::0 bad 0.009
NonStaticInitializer::1 static initializers are OK 0.008
NonThreadSafeSingleton::0 failure case 0.009
NonThreadSafeSingleton::1 OK, method is synchronized 0.01
NonThreadSafeSingleton::2 OK, in synchronized block 0.01
NonThreadSafeSingleton::3 OK, in returning non-static data 0.009
NonThreadSafeSingleton::4 failure case, two if statements 0.01
NonThreadSafeSingleton::5 failure case, compound if statement 0.01
NonThreadSafeSingleton::6 failure case 2 0.01
NonThreadSafeSingleton::7 From defect 1573591 0.008
NonThreadSafeSingleton::8 #997 Rule NonThreadSafeSingleton gives analysis problem 0.009
OptimizableToArrayCall::0 failure case 0.009
OptimizableToArrayCall::1 Array dimensioner uses method call, ok 0.01
OptimizableToArrayCall::2 Array dimensioner uses variable, ok 0.009
OptimizableToArrayCall::3 #937 OptimizableToArrayCall does not catch multilevel method chains 0.008
PositionLiteralsFirstInCaseInsensitiveComparisons::0 ok, literal comes first 0.008
PositionLiteralsFirstInCaseInsensitiveComparisons::1 bad, literal comes last 0.033
PositionLiteralsFirstInCaseInsensitiveComparisons::2 ok 0.01
PositionLiteralsFirstInCaseInsensitiveComparisons::3 Test case from bug [1472195] - PositionLiteralsFirstInComparisons give many false positives 0.009
PositionLiteralsFirstInCaseInsensitiveComparisons::4 Test case from bug [1472195] - PositionLiteralsFirstInComparisons give many false positives 0.009
PositionLiteralsFirstInComparisons::0 ok, literal comes first 0.009
PositionLiteralsFirstInComparisons::1 bad, literal comes last 0.009
PositionLiteralsFirstInComparisons::2 ok 0.009
PositionLiteralsFirstInComparisons::3 Test case from bug [1472195] - PositionLiteralsFirstInComparisons give many false positives 0.009
PositionLiteralsFirstInComparisons::4 Test case from bug [1472195] - PositionLiteralsFirstInComparisons give many false positives 0.009
PositionLiteralsFirstInComparisons::5 #1256 PositionLiteralsFirstInComparisons false positive with Characters 0.009
PreserveStackTrace::0 1, Exception thrown without preserving stack 0.01
PreserveStackTrace::1 2, Exception thrown, stack preserved 0.009
PreserveStackTrace::2 3, Exception thrown, stack preserved 0.01
PreserveStackTrace::3 4, No exception thrown, OK 0.009
PreserveStackTrace::4 5, No exception thrown, OK 0.009
PreserveStackTrace::5 6, No exception thrown, OK 0.009
PreserveStackTrace::6 7, No exception thrown, OK 0.01
PreserveStackTrace::7 8, No exception thrown, OK 0.009
PreserveStackTrace::8 9, Excetion is cast, OK 0.01
PreserveStackTrace::9 10, Throwing new Exception, OK 0.009
PreserveStackTrace::10 11, Throwing new Exception, OK 0.009
PreserveStackTrace::11 12, Catch and throw RuntimeException 0.009
PreserveStackTrace::12 13, Catch and throw RuntimeException, fail 0.009
PreserveStackTrace::13 14, Nested with same name catch and throw, fail on inner 0.009
PreserveStackTrace::14 15, IllegalStateException can take a cause exception in the constructor, too. 0.009
PreserveStackTrace::15 16, False -, No violations reported by PreserveStackTrace Rule 0.009
PreserveStackTrace::16 17, PreserveStackTrace Rule should exclude this as initCause is used. 0.009
PreserveStackTrace::17 18, side effects on rules 0.01
PreserveStackTrace::18 19, False positive 0.013
PreserveStackTrace::19 20, False positive 0.011
PreserveStackTrace::20 21, Java 7's multi-catch, NOK 0.01
PreserveStackTrace::21 22, Java 7's multi-catch, OK 0.01
PreserveStackTrace::22 #943 PreserveStackTrace false positive if a StringBuffer exists 0.01
PreserveStackTrace::23 #1087 PreserveStackTrace (still) ignores initCause() 0.012
PreserveStackTrace::24 #1087 PreserveStackTrace (still) ignores initCause() - negative test case 0.01
PreserveStackTrace::25 #794 False positive on PreserveStackTrace with anonymous inner 0.009
PreserveStackTrace::26 #422 False positive when using builder pattern 0.009
ReturnEmptyArrayRatherThanNull::0 Basic test case 0.009
ReturnEmptyArrayRatherThanNull::1 good behavior should not trigger violation 0.048
SimpleDateFormatNeedsLocale::0 ok, uses a two arg constructor 0.009
SimpleDateFormatNeedsLocale::1 bad, using the single-arg constructor 0.008
SimpleDateFormatNeedsLocale::2 all quiet 0.008
SimplifyBooleanExpressions::0 in field assignment 0.008
SimplifyBooleanExpressions::1 in method body 0.007
SimplifyBooleanExpressions::2 ok 0.009
SimplifyBooleanExpressions::3 two cases in an && expression 0.008
SimplifyBooleanExpressions::4 simple use of BooleanLiteral, should not be flagged 0.008
SimplifyBooleanReturns::0 1, bad 0.008
SimplifyBooleanReturns::1 2, bad 0.008
SimplifyBooleanReturns::2 3, ok 0.008
SimplifyBooleanReturns::3 4, ok 0.008
SimplifyBooleanReturns::4 #1320 Enhance SimplifyBooleanReturns checks 0.008
SimplifyBooleanReturns::5 #1320 Enhance SimplifyBooleanReturns checks - case 2 without block 0.008
SimplifyConditional::0 failure case 0.008
SimplifyConditional::1 ok 0.009
SimplifyConditional::2 transpose x and null, still bad 0.008
SimplifyConditional::3 conditional or and !(instanceof) 0.009
SimplifyConditional::4 indexing into array is ok 0.008
SimplifyConditional::5 test for null on unrelated object is ok 0.009
SimplifyConditional::6 Bug [1843273] False - 0.008
SimplifyConditional::7 Bug 2317099 : False + in SimplifyConditional 0.009
SimplifyConditional::8 #1165 SimplifyConditional false positive 0.01
SingleMethodSingleton::0 Not OK! Has overriden getInstance() methods 0.009
SingleMethodSingleton::1 OK! Has only one Singleton 0.009
SingletonClassReturningNewInstance::0 failure case 0.008
SingletonClassReturningNewInstance::1 failure case 0.01
SingletonClassReturningNewInstance::2 Works! Does not return locally created variable 0.009
SingularField::0 failure case 0.008
SingularField::1 Ok, used for control flow 0.008
SingularField::2 ok 0.009
SingularField::3 second method uses 'this' 0.008
SingularField::4 skip publics 0.009
SingularField::5 skip statics 0.009
SingularField::6 unused fields shouldn't show up 0.009
SingularField::7 inner class 0.009
SingularField::8 initialized in constructor 0.009
SingularField::9 ok case with Object 0.027
SingularField::10 ok, shouldn't catch unused variable 0.009
SingularField::11 ok case with self-instantiation 0.009
SingularField::12 Reuse variable name as params in method calls 0.009
SingularField::13 Ok, instantiates own self internally 0.009
SingularField::14 ok, variable accessed twice in same method 0.011
SingularField::15 failure, static 0.008
SingularField::16 failure, second method re-uses class level name 0.008
SingularField::17 initialized in static initialization block 0.009
SingularField::18 1409944, fields used to synchronize should not trigger 0.009
SingularField::19 1409944, fields not used to synchronize should trigger 0.009
SingularField::20 1409944, field is used to change the flow of different calls 0.009
SingularField::21 Ok, used in outer class 0.009
SingularField::22 Not ok, since inner classes are checked 0.009
SingularField::23 Not ok, violation with first usage = non-assignment 0.008
SingularField::24 Ok, field used to aggregate values 0.009
SingularField::25 Ok, setting values 0.009
SingularField::26 multiple fields on same line 0.008
SingularField::27 field in inner class 0.009
SingularField::28 bug 3574133 - false + with enums 0.01
SingularField::29 #1307 False positive: SingularField and lambda-expression 0.01
SingularField::30 #1494 [java] SingularField: lombok.Data false positive - part1 0.009
SingularField::31 #1494 [java] SingularField: lombok.Data false positive - part2 0.009
SingularField::32 #177 [java] SingularField with lambdas as final fields 0.01
SwitchDensity::0 Five stmts in one switch case, should be flagged 0.009
SwitchDensity::1 One stmt in one switch case, ok 0.01
SwitchDensity::2 Five stmts, 5 cases, OK 0.009
SwitchStmtsShouldHaveDefault::0 simple failure case 0.009
SwitchStmtsShouldHaveDefault::1 simple ok case 0.009
TooFewBranchesForASwitchStatement::0 Only one case, this is useless 0.008
TooFewBranchesForASwitchStatement::1 Even two branches is not enough for a switch statement 0.009
TooFewBranchesForASwitchStatement::2 Three branches in a switch statement is ok. 0.014
UncommentedEmptyConstructor::0 simple failure 0.014
UncommentedEmptyConstructor::1 only 'this(...)' is OK 0.013
UncommentedEmptyConstructor::2 only 'this(...)' is not OK, if ignoring explicit constructor calls 0.009
UncommentedEmptyConstructor::3 only 'super(...)' is OK 0.009
UncommentedEmptyConstructor::4 single-line comment is OK 0.009
UncommentedEmptyConstructor::5 multiple-line comment is OK 0.009
UncommentedEmptyConstructor::6 Javadoc comment is OK 0.009
UncommentedEmptyConstructor::7 ok 0.009
UncommentedEmptyConstructor::8 with 'this(...)' ok 0.014
UncommentedEmptyConstructor::9 with 'super(...)' ok 0.014
UncommentedEmptyConstructor::10 private is ok 0.013
UncommentedEmptyConstructor::11 Empty constructor with documenting javadoc still triggers 0.013
UncommentedEmptyMethodBody::0 simple failure 0.011
UncommentedEmptyMethodBody::1 single-line comment is OK 0.008
UncommentedEmptyMethodBody::2 multiple-line comment is OK 0.008
UncommentedEmptyMethodBody::3 Javadoc comment is OK 0.008
UncommentedEmptyMethodBody::4 ok 0.008
UnnecessaryLocalBeforeReturn::0 skip void/native/abstract methods 0.008
UnnecessaryLocalBeforeReturn::1 skip literal returns 0.009
UnnecessaryLocalBeforeReturn::2 simple failure case 0.009
UnnecessaryLocalBeforeReturn::3 skip complicated returns 0.009
UnnecessaryLocalBeforeReturn::4 skip method calls 0.009
UnnecessaryLocalBeforeReturn::5 #1495 [java] UnnecessaryLocalBeforeReturn with assert 0.008
UnnecessaryLocalBeforeReturn::6 #219 ClassCastException in switch case with local variable returned 0.008
UnnecessaryLocalBeforeReturn::7 Detect violation even if not on consecutive lines 0.009
UnnecessaryLocalBeforeReturn::8 No violations on multiple uses of the variable 0.009
UnnecessaryLocalBeforeReturn::9 No violations on multiple uses of the variable - statement order does not matter 0.008
UnnecessaryLocalBeforeReturn::10 #933 UnnecessaryLocalBeforeReturn false positive for SuppressWarnings annotation 0.012
UnnecessaryLocalBeforeReturn::11 #282 UnnecessaryLocalBeforeReturn false positive when cloning Maps 0.011
UnnecessaryLocalBeforeReturn::12 #310 UnnecessaryLocalBeforeReturn enhancement is overly restrictive -- method order matters 0.01
UnnecessaryLocalBeforeReturn::13 #310 UnnecessaryLocalBeforeReturn statement order does not matter 0.01
UnsynchronizedStaticDateFormatter::0 Format called from non-synchronized block 0.009
UnsynchronizedStaticDateFormatter::1 2, No call to format 0.009
UnsynchronizedStaticDateFormatter::2 3, Inside synchronized, OK 0.009
UnsynchronizedStaticDateFormatter::3 4, Inside synchronized, OK 0.009
UnsynchronizedStaticDateFormatter::4 5, Use DateFormat, ok 0.009
UnsynchronizedStaticDateFormatter::5 6, Use DateFormat, fail 0.009
UnsynchronizedStaticDateFormatter::6 #940 False positive on UnsynchronizedStaticDateFormatter 0.011
UseCollectionIsEmpty::0 fail, == 0 0.014
UseCollectionIsEmpty::1 ok, isEmpty 0.009
UseCollectionIsEmpty::2 fail, != 0 0.009
UseCollectionIsEmpty::3 ok, !isEmpty 0.009
UseCollectionIsEmpty::4 fail, != 0 0.009
UseCollectionIsEmpty::5 ok, !isEmpty 0.009
UseCollectionIsEmpty::6 fail, 0 == 0.009
UseCollectionIsEmpty::7 fail, > 0 0.01
UseCollectionIsEmpty::8 ok, in expression 0.039
UseCollectionIsEmpty::9 ok, in expression 0.011
UseCollectionIsEmpty::10 #1214 UseCollectionIsEmpty misses some usage 0.014
UseCollectionIsEmpty::11 #1230 UseCollectionIsEmpty gets false positives 0.012
UseCollectionIsEmpty::12 #1304 UseCollectionIsEmpty false positive comparing to 1 0.01
UseCollectionIsEmpty::13 #1345 UseCollectionIsEmpty throws NullPointerException 0.01
UseLocaleWithCaseConversions::0 toLowerCase() with no args 0.01
UseLocaleWithCaseConversions::1 toUpperCase() with no args 0.014
UseLocaleWithCaseConversions::2 both ok 0.016
UseLocaleWithCaseConversions::3 toHexString OK 0.017
UseLocaleWithCaseConversions::4 Compound method call 0.024
UseLocaleWithCaseConversions::5 #1556 [java] UseLocaleWithCaseConversions does not works with `ResultSet` (false negative) 0.021
UseNotifyAllInsteadOfNotify::0 TEST1 0.01
UseNotifyAllInsteadOfNotify::1 TEST2 0.009
UseNotifyAllInsteadOfNotify::2 TEST3 0.01
UseNotifyAllInsteadOfNotify::3 TEST4 0.009
UseNotifyAllInsteadOfNotify::4 TEST5 0.01
UseNotifyAllInsteadOfNotify::5 notify() with params is OK 0.01
UseNotifyAllInsteadOfNotify::6 #1438 UseNotifyAllInsteadOfNotify gives false positive 0.009
UseUtilityClass::0 should be utility class since all static, public constructor 0.01
UseUtilityClass::1 ok, uses non-static 0.008
UseUtilityClass::2 should be utility class, couple of statics, no constructor 0.008
UseUtilityClass::3 public constructor, no static - ok 0.008
UseUtilityClass::4 classic utility class - ok 0.009
UseUtilityClass::5 abstract, so ok 0.008
UseUtilityClass::6 has some private and no public static fields, so ok 0.008
UseUtilityClass::7 has public static field, so need to check 0.008
UseUtilityClass::8 junit 'suite' method is OK 0.008
UseUtilityClass::9 Reproducing bug [ 2315599 ] False +: UseSingleton with class containing constructor: Although there is a static method, the class also has a non-private constructor. This is a common design for custom exceptions which contain a private static method to format error message strings. 0.009
UseUtilityClass::10 inner should be utility class since all static, public constructor 0.008
UseUtilityClass::11 [ 2404700 ] UseSingleton should not act on enums 0.009
UseUtilityClass::12 NPE in incorrect implementation... 0.008
UseUtilityClass::13 OK, method annotations 0.003
UseUtilityClass::14 #1255 UseUtilityClass false positive with Exceptions 0.008
UseUtilityClass::15 #1467 UseUtilityClass can't correctly check functions with multiple annotations 0.011
UseVarargs::0 constructor, use varargs 0.008
UseVarargs::1 method, use varargs 0.009
UseVarargs::2 constructor, do not varargs 0.008
UseVarargs::3 method, do not varargs 0.009
UseVarargs::4 method, do not varargs as the signature is dictated by an interface // TODO Once this is implemented, perhaps it should be optional? The compiler will technically let you use varargs. 0
skipped
UseVarargs::4 method, do not varargs as the signature is dictated by an interface // TODO Once this is implemented, perhaps it should be optional? The compiler will technically let you use varargs. 0
UseVarargs::5 method, do not varargs, allow byte[] as not varargs 0.026
UseVarargs::6 method, do not varargs, allow Byte[] as not varargs 0.008
UseVarargs::7 method, do not varargs, allow @Override 0.008
UseVarargs::8 method, do not varargs, allow public static void main(String[]) as not varargs 0.013
UseVarargs::9 method, use varargs, deviation from exact main signature flagged 0.008

EmptyRulesTest

EmptyCatchBlock::0 simple failure 0.002
EmptyCatchBlock::1 ok 0.002
EmptyCatchBlock::2 no catch with nested catch in finally 0.001
EmptyCatchBlock::3 multiple catch blocks 0.002
EmptyCatchBlock::4 empty try with finally 0.001
EmptyCatchBlock::5 InterruptedException is OK 0.002
EmptyCatchBlock::6 CloneNotSupportedException is OK 0.002
EmptyCatchBlock::7 single-line comment is not OK 0.001
EmptyCatchBlock::8 single-line comment is OK 0.002
EmptyCatchBlock::9 multiple-line comment is not OK 0.001
EmptyCatchBlock::10 multiple-line comment is OK 0.002
EmptyCatchBlock::11 Javadoc comment is not OK 0.001
EmptyCatchBlock::12 Allow to ignore exceptions by name 0.002
EmptyFinallyBlock::0 empty try/catch/finally 0.001
EmptyFinallyBlock::1 try/finally, no catch 0.001
EmptyFinallyBlock::2 finally block with contents 0.002
EmptyFinallyBlock::3 multiple catch blocks with finally 0.001
EmptyIfStmt::0 one empty 0.002
EmptyIfStmt::1 one not empty 0.001
EmptyIfStmt::2 empty statement 0.001
EmptyIfStmt::3 empty if statement with comment 0.002
EmptyInitializer::0 failure case (non static) 0.001
EmptyInitializer::1 failure case (static) 0.001
EmptyInitializer::2 not an initializer 0.001
EmptyInitializer::3 initializer not empty 0.002
EmptyStatementBlock::0 failure case 0.001
EmptyStatementBlock::1 statement block not empty 0.001
EmptyStatementBlock::2 not a statement block 0.002
EmptyStatementNotInLoop::0 ok, semicolon after for 0.001
EmptyStatementNotInLoop::1 ok, semicolon after while 0.002
EmptyStatementNotInLoop::2 bad, random semicolon 0.001
EmptyStatementNotInLoop::3 bad, double semicolon 0.002
EmptyStatementNotInLoop::4 ok, nested class 0.001
EmptyStaticInitializer::0 bad 0.001
EmptyStaticInitializer::1 ok 0.002
EmptySwitchStatements::0 bad 0.001
EmptySwitchStatements::1 ok 0.002
EmptySynchronizedBlock::0 bad 0.001
EmptySynchronizedBlock::1 ok 0.002
EmptyTryBlock::0 bad 0.001
EmptyTryBlock::1 bad 0.002
EmptyTryBlock::2 ok 0.001
EmptyTryBlock::3 #432 false positive for empty try-with-resource 0.001
EmptyWhileStmt::0 bad 0.002
EmptyWhileStmt::1 while(true); 0.001

FinalizersRulesTest

AvoidCallingFinalize::0 simple failure case 0.002
AvoidCallingFinalize::1 calling finalize on an object 0.001
AvoidCallingFinalize::2 calling super.finalize 0.001
AvoidCallingFinalize::3 no call to finalize 0.001
AvoidCallingFinalize::4 it's ok in a finalizer 0.002
AvoidCallingFinalize::5 finalizer in anon inner class is OK too 0.002
AvoidCallingFinalize::6 #1440 NPE in AvoidCallingFinalize 0.001
EmptyFinalizer::0 simple failure 0.001
EmptyFinalizer::1 ok 0.001
FinalizeDoesNotCallSuperFinalize::0 bad 0.001
FinalizeDoesNotCallSuperFinalize::1 ok 0.002
FinalizeDoesNotCallSuperFinalize::2 ok, super.finalize called in try..finally 0.001
FinalizeDoesNotCallSuperFinalize::3 ok, super.finalize called in try..catch..finally 0.001
FinalizeOnlyCallsSuperFinalize::0 bad 0.001
FinalizeOnlyCallsSuperFinalize::1 ok 0.001
FinalizeOverloaded::0 bad 0.001
FinalizeOverloaded::1 ok 0.001
FinalizeShouldBeProtected::0 public finalize 0.001
FinalizeShouldBeProtected::1 finalize with some params 0.002
FinalizeShouldBeProtected::2 legitimate overriding 0.001

ImportsRulesTest

DontImportJavaLang::0 import java.lang.String 0.001
DontImportJavaLang::1 import java.lang.* 0.002
DontImportJavaLang::2 import java.lang.ref/reflect/annotation/instrument/management 0.005
DontImportJavaLang::3 Static Java imports are OK 0.001
DontImportJavaLang::4 Importing java.lang.Thread.UncaughtExceptionHandler 0.002
DontImportJavaLang::5 import java.lang.ProcessBuilder.Redirect: #1031 false DontImportJavaLang 0.001
DontImportJavaLang::6 import java.lang.invoke.MethodHandles: #339 false DontImportJavaLang 0.002
DuplicateImports::0 duplicate single type imports 0.002
DuplicateImports::1 duplicate wildcard imports 0.001
DuplicateImports::2 single type import after wildcard import 0.004
DuplicateImports::3 subpackage import, ok 0.002
DuplicateImports::4 674394, disambiguation import should be allowed 0.003
DuplicateImports::5 674394, disambiguation import because of conflict with java.lang 0.002
DuplicateImports::6 #1306 False positive on duplicate when using static imports 0.003
DuplicateImports::7 negative case - static on-demand imports 0.001
ImportFromSamePackage::0 simple failure 0.001
ImportFromSamePackage::1 class in default package importing from sub package 0.002
ImportFromSamePackage::2 class in default package importing from other package 0.001
ImportFromSamePackage::3 class not in default package importing from default package 0.001
ImportFromSamePackage::4 class in default package importing from default package 0.002
ImportFromSamePackage::5 importing from subpackage 0.002
ImportFromSamePackage::6 importing all from same package 0.001
TooManyStaticImports::0 simple violation 0.002
TooManyStaticImports::1 ok 0.001
TooManyStaticImports::2 ok, we allow five now 0.001
UnnecessaryFullyQualifiedName::0 1, nothing wrong 0.001
UnnecessaryFullyQualifiedName::1 2, valid implements 0.002
UnnecessaryFullyQualifiedName::2 3, invalid implements 0.001
UnnecessaryFullyQualifiedName::3 4, valid extends 0.001
UnnecessaryFullyQualifiedName::4 5, invalid extends 0.002
UnnecessaryFullyQualifiedName::5 6, valid field 0.001
UnnecessaryFullyQualifiedName::6 7, invalid field 0.002
UnnecessaryFullyQualifiedName::7 8, valid return type 0.001
UnnecessaryFullyQualifiedName::8 9, invalid return type 0.001
UnnecessaryFullyQualifiedName::9 10, valid formal parameter 0.002
UnnecessaryFullyQualifiedName::10 11, invalid formal parameter 0.001
UnnecessaryFullyQualifiedName::11 12, valid static method call 0.002
UnnecessaryFullyQualifiedName::12 13, invalid static method call 0.002
UnnecessaryFullyQualifiedName::13 14, valid static import method call 0.002
UnnecessaryFullyQualifiedName::14 15, invalid static import method call 0.002
UnnecessaryFullyQualifiedName::15 16, valid static import method call with class import 0.002
UnnecessaryFullyQualifiedName::16 17, invalid static import method call with class import 0.002
UnnecessaryFullyQualifiedName::17 18, on-demand, valid field 0.002
UnnecessaryFullyQualifiedName::18 19, on-demand, invalid field 0.001
UnnecessaryFullyQualifiedName::19 20, on-demand, valid static import method call 0.002
UnnecessaryFullyQualifiedName::20 21, on-demand, invalid static import method call 0.002
UnnecessaryFullyQualifiedName::21 22, valid on-demand static import method call with class import 0.003
UnnecessaryFullyQualifiedName::22 23, invalid on-demand static import method call with class import 0.002
UnnecessaryFullyQualifiedName::23 #1078 Package statement introduces false positive UnnecessaryFullyQualifiedName violation 0.002
UnnecessaryFullyQualifiedName::24 #1404 Java8 'Unnecessary use of fully qualified name' in Streams Collector 0.006
UnnecessaryFullyQualifiedName::25 #1436 UnnecessaryFullyQualifiedName false positive on clashing static imports with enums 0.006
UnnecessaryFullyQualifiedName::26 #1546 part 1 UnnecessaryFullyQualifiedName doesn't take into consideration conflict resolution 0.003
UnnecessaryFullyQualifiedName::27 #1546 part 2 UnnecessaryFullyQualifiedName doesn't take into consideration conflict resolution 0.003
UnnecessaryFullyQualifiedName::28 #1555 - UnnecessaryFullyQualifiedName for conflict resolution with inner class 0.011
UnusedImports::0 simple unused single type import 0.002
UnusedImports::1 one used single type import 0.002
UnusedImports::2 2 unused single-type imports 0.001
UnusedImports::3 1 used single type import 0.002
UnusedImports::4 1 import stmt, used only in throws clause 0.003
UnusedImports::5 for loop 0.002
UnusedImports::6 Generics 0.002
UnusedImports::7 Annotations 0.002
UnusedImports::8 Annotations 2 0.002
UnusedImports::9 import from default package 0.001
UnusedImports::10 import from default package 0.002
UnusedImports::11 Used static import 0.002
UnusedImports::12 Unused static import 0.001
UnusedImports::13 On demand import 0.002
UnusedImports::14 imports used in javadoc comment 0.002
UnusedImports::15 Bug 2606609 : False "UnusedImports" positive in package-info.java 0.001
UnusedImports::16 bug #254 False+ : UnusedImport with Javadoc @link 0.002
UnusedImports::17 #1181 unused import false positive if used as parameter in javadoc only. 0.002
UnusedImports::18 #1280 False Positive in UnusedImports when import used in javadoc 0.002
UnusedImports::19 #914 False +ve from UnusedImports with wildcard static imports 0.005
UnusedImports::20 #1465 False Positve UnusedImports with javadoc @link 0.003
UnusedImports::21 #1547 False Positve UnusedImports with javadoc for identifiers with underscores 0.002

J2EERulesTest

DoNotCallSystemExit::0 basic violations 0.002
DoNotCallSystemExit::1 ok 0.001
DoNotCallSystemExit::2 basic violations with Runtime 0.002
DoNotUseThreads::0 Having thread in a type name is doubtfull but allowed 0.002
DoNotUseThreads::1 extending threads is not allowed 0.001
DoNotUseThreads::2 implementing runnabel is not allowed 0.002
DoNotUseThreads::3 Use of runnable is also not allowed 0.002
LocalHomeNamingConvention::0 Bad suffix 0.001
LocalHomeNamingConvention::1 Good suffix 0.002
LocalInterfaceSessionNamingConvention::0 Bad suffix 0.001
LocalInterfaceSessionNamingConvention::1 Good suffix 0.001
MDBAndSessionBeanNamingConvention::0 Bad SessionBean name 0.002
MDBAndSessionBeanNamingConvention::1 Bad MessageDrivenBean name 0.002
MDBAndSessionBeanNamingConvention::2 Good SessionBean name 0.001
MDBAndSessionBeanNamingConvention::3 Good MessageDrivenBean name 0.002
RemoteInterfaceNamingConvention::0 Bad Session suffix 0.002
RemoteInterfaceNamingConvention::1 Bad EJB suffix 0.001
RemoteInterfaceNamingConvention::2 Bad Bean suffix 0.002
RemoteInterfaceNamingConvention::3 Good suffix 0.001
RemoteSessionInterfaceNamingConvention::0 Bad EJBHome name 0.002
RemoteSessionInterfaceNamingConvention::1 Good EJBHome name 0.002
StaticEJBFieldShouldBeFinal::0 Good practice 0.002
StaticEJBFieldShouldBeFinal::1 Bad example 0.001
UseProperClassLoader::0 failure case 0.002
UseProperClassLoader::1 correct way 0.002

JavabeansRulesTest

BeanMembersShouldSerialize::0 private String, no accessor 0.002
BeanMembersShouldSerialize::1 private static String 0.001
BeanMembersShouldSerialize::2 private transient String 0.001
BeanMembersShouldSerialize::3 getter, no setter 0.002
BeanMembersShouldSerialize::4 setter, no getter 0.002
BeanMembersShouldSerialize::5 both accessors, yay! 0.002
BeanMembersShouldSerialize::6 setFoo and isFoo is OK for booleans 0.001
BeanMembersShouldSerialize::7 setFoo and isFoo is not OK for Strings 0.002
BeanMembersShouldSerialize::8 prefix is off by default 0.001
BeanMembersShouldSerialize::9 valid prefix 0.001
BeanMembersShouldSerialize::10 invalid prefix 0.001
BeanMembersShouldSerialize::11 interface 0.001
BeanMembersShouldSerialize::12 @SuppressWarnings("serial") 0.002
BeanMembersShouldSerialize::13 ClassCastException on generic method 0.002
BeanMembersShouldSerialize::14 #881 private final without setter is flagged 0.001
MissingSerialVersionUID::0 Happy case 0.001
MissingSerialVersionUID::1 Simple failure case 0.002
MissingSerialVersionUID::2 failure using java.io.Serializable 0.001
MissingSerialVersionUID::3 implements Serializable and provides a serialVersionUID 0.001
MissingSerialVersionUID::4 TEST5 0.002
MissingSerialVersionUID::5 interface 0.001
MissingSerialVersionUID::6 abstract case 0.002
MissingSerialVersionUID::7 @SuppressWarnings("serial") 0.001

JunitRulesTest

JUnitAssertionsShouldIncludeMessage::0 assertArrayEquals ok 0.003
JUnitAssertionsShouldIncludeMessage::1 assertArrayEquals bad 0.002
JUnitAssertionsShouldIncludeMessage::2 assertEquals ok 0.002
JUnitAssertionsShouldIncludeMessage::3 assertEquals with string variable as message ok 0.002
JUnitAssertionsShouldIncludeMessage::4 assertEquals with delta ok 0.002
JUnitAssertionsShouldIncludeMessage::5 assertEquals bad 0.001
JUnitAssertionsShouldIncludeMessage::6 assertEquals with delta bad 0.002
JUnitAssertionsShouldIncludeMessage::7 assertEquals with delta but missing assertion message not ok 0.002
JUnitAssertionsShouldIncludeMessage::8 assertFalse ok 0.002
JUnitAssertionsShouldIncludeMessage::9 assertFalse bad 0.002
JUnitAssertionsShouldIncludeMessage::10 assertNotNull OK 0.002
JUnitAssertionsShouldIncludeMessage::11 assertNotNull bad 0.002
JUnitAssertionsShouldIncludeMessage::12 assertNotSame ok 0.002
JUnitAssertionsShouldIncludeMessage::13 assertNotSame bad 0.002
JUnitAssertionsShouldIncludeMessage::14 assertNull OK 0.001
JUnitAssertionsShouldIncludeMessage::15 assertNull bad 0.002
JUnitAssertionsShouldIncludeMessage::16 assertSame OK 0.002
JUnitAssertionsShouldIncludeMessage::17 assertSame bad 0.002
JUnitAssertionsShouldIncludeMessage::18 assertThat ok 0.002
JUnitAssertionsShouldIncludeMessage::19 assertThat bad 0.003
JUnitAssertionsShouldIncludeMessage::20 assertTrue ok 0.002
JUnitAssertionsShouldIncludeMessage::21 assertTrue bad 0.002
JUnitAssertionsShouldIncludeMessage::22 fail ok 0.002
JUnitAssertionsShouldIncludeMessage::23 fail bad 0.002
JUnitAssertionsShouldIncludeMessage::24 find that pesky bug 0.002
JUnitAssertionsShouldIncludeMessage::25 Not a JUnit test - assertEquals bad 0.002
JUnitAssertionsShouldIncludeMessage::26 JUnit 4 - assertEquals 0.001
JUnitAssertionsShouldIncludeMessage::27 #1374 JUnitAssertionsShouldIncludeMessage does not work 0.004
JUnitAssertionsShouldIncludeMessage::28 #1373 JUnitAssertionsShouldIncludeMessage is no longer compatible with TestNG 0.005
JUnitSpelling::0 setUp mispellings 0.003
JUnitSpelling::1 tearDown misspellings 0.002
JUnitSpelling::2 ok 0.001
JUnitSpelling::3 unrelated methods 0.002
JUnitSpelling::4 overloaded setUp 0.002
JUnitSpelling::5 No problem - not a JUnit test 0.002
JUnitStaticSuite::0 non-static is bad 0.002
JUnitStaticSuite::1 public static with no params is OK 0.002
JUnitStaticSuite::2 private suite() is bad 0.001
JUnitStaticSuite::3 if there are params, just skip it 0.002
JUnitStaticSuite::4 Not a JUnit test (nonstatic is bad) 0.002
JUnitTestContainsTooManyAsserts::0 JUnit 3 Test contains no assert 0.002
JUnitTestContainsTooManyAsserts::1 JUnit 4 Test contains no assert 0.001
JUnitTestContainsTooManyAsserts::2 JUnit 3 Test contains one assert 0.002
JUnitTestContainsTooManyAsserts::3 JUnit 4 Test contains one assert 0.002
JUnitTestContainsTooManyAsserts::4 JUnit 3 Test contains more than one assert 0.002
JUnitTestContainsTooManyAsserts::5 JUnit 4 Test contains more than one assert 0.001
JUnitTestContainsTooManyAsserts::6 JUnit 3 Test contains more than one assert, but allowed 0.002
JUnitTestContainsTooManyAsserts::7 JUnit 4 Test contains more than one assert, but allowed 0.002
JUnitTestsShouldIncludeAssert::0 Contains assert 0.003
JUnitTestsShouldIncludeAssert::1 Missing assert 0.004
JUnitTestsShouldIncludeAssert::2 All ok 0.003
JUnitTestsShouldIncludeAssert::3 Two wrong 0.002
JUnitTestsShouldIncludeAssert::4 Contains fail 0.002
JUnitTestsShouldIncludeAssert::5 One wrong 0.002
JUnitTestsShouldIncludeAssert::6 Skip interfaces 0.002
JUnitTestsShouldIncludeAssert::7 Skip abstract methods 0.002
JUnitTestsShouldIncludeAssert::8 Another fail() case 0.003
JUnitTestsShouldIncludeAssert::9 BUG 1105633 - False +: JUnit testcases could have fail() instead of assert 0.003
JUnitTestsShouldIncludeAssert::10 BUG 1146116 PMDException with inner interfaces 0.003
JUnitTestsShouldIncludeAssert::11 skip static test methods 0.001
JUnitTestsShouldIncludeAssert::12 exceptions shouldn't block it 0.003
JUnitTestsShouldIncludeAssert::13 Not a JUnit test (exceptions shouldn't block it) 0.003
JUnitTestsShouldIncludeAssert::14 JUnit 4 test (exceptions shouldn't block it) 0.003
JUnitTestsShouldIncludeAssert::15 Junit 4 static import 0.003
JUnitTestsShouldIncludeAssert::16 Junit 4 test using Assert.assert... 0.003
JUnitTestsShouldIncludeAssert::17 #968 Issues with JUnit4 @Test annotation with expected exception 0.004
JUnitTestsShouldIncludeAssert::18 #285 Issues with @Rule annotation and ExpectedException 0.009
JUnitTestsShouldIncludeAssert::19 #285 Follow-up for @org.junit.Rule 0.007
JUnitTestsShouldIncludeAssert::20 #330 Rule treats AllocationExpression correctly 0.026
JUnitTestsShouldIncludeAssert::21 #330 NPE accessing local field / method with this.XXX 0.002
JUnitTestsShouldIncludeAssert::22 #358 Treat Mockito's verify as assert expressions 0.004
JUnitTestsShouldIncludeAssert::23 #358 Treat Mockito's Mockito.verify as assert expressions 0.005
JUnitTestsShouldIncludeAssert::24 #465 NullPointerException when dealing with @SuppressWarnings 0.002
SimplifyBooleanAssertion::0 assertFalse(!) 0.003
SimplifyBooleanAssertion::1 assertTrue(!) 0.002
SimplifyBooleanAssertion::2 ok 0.002
SimplifyBooleanAssertion::3 not a JUnit test - assertFalse(!) 0.002
SimplifyBooleanAssertion::4 JUnit 4 - assertFalse(!) 0.002
TestClassWithoutTestCases::0 failure case 0.002
TestClassWithoutTestCases::1 test method should be public 0.002
TestClassWithoutTestCases::2 inner class should get checked 0.001
TestClassWithoutTestCases::3 test method in inner class not valid 0.002
TestClassWithoutTestCases::4 abstract classes are ok 0.002
TestClassWithoutTestCases::5 ditto interfaces 0.001
TestClassWithoutTestCases::6 ditto enum 0.002
TestClassWithoutTestCases::7 ditto annotation 0.001
TestClassWithoutTestCases::8 failure case does not extend TestCase 0.001
TestClassWithoutTestCases::9 #1453 False positive when the test class extends an other. 0.003
TestClassWithoutTestCases::10 #428 [java] PMD requires public modifier on JUnit 5 test 0.002
UnnecessaryBooleanAssertion::0 failure case 0.002
UnnecessaryBooleanAssertion::1 variations 0.002
UnnecessaryBooleanAssertion::2 nested boolean literal 0.004
UnnecessaryBooleanAssertion::3 asserting true a ! 0.003
UnnecessaryBooleanAssertion::4 asserting false a ! 0.002
UnnecessaryBooleanAssertion::5 buz 0.002
UnnecessaryBooleanAssertion::6 not a JUnit test - failure case 0.002
UnnecessaryBooleanAssertion::7 JUnit 4 - failure case 0.003
UseAssertEqualsInsteadOfAssertTrue::0 TEST1 0.002
UseAssertEqualsInsteadOfAssertTrue::1 TEST2 0.002
UseAssertEqualsInsteadOfAssertTrue::2 TEST3 0.002
UseAssertEqualsInsteadOfAssertTrue::3 Not a JUnit test - TEST2 0.003
UseAssertEqualsInsteadOfAssertTrue::4 JUnit4 - TEST2 0.003
UseAssertNullInsteadOfAssertTrue::0 assertTrue with null 0.003
UseAssertNullInsteadOfAssertTrue::1 assertFalse with != null 0.01
UseAssertNullInsteadOfAssertTrue::2 assertTrue with x == y 0.002
UseAssertNullInsteadOfAssertTrue::3 Not a JUnit test - assertTrue with null 0.003
UseAssertNullInsteadOfAssertTrue::4 JUnit 4 - assertTrue with null 0.001
UseAssertSameInsteadOfAssertTrue::0 assert true a == b 0.001
UseAssertSameInsteadOfAssertTrue::1 assert true a != b 0.002
UseAssertSameInsteadOfAssertTrue::2 assert false a == b 0.002
UseAssertSameInsteadOfAssertTrue::3 assert false a != b 0.002
UseAssertSameInsteadOfAssertTrue::4 skip assertTrue(x == null), UseAssertNullInsteadOfAssertTrue will pick those up 0.002
UseAssertSameInsteadOfAssertTrue::5 bug 1626715, the null check in the rule shouldn't match the null outside the assert method 0.001
UseAssertSameInsteadOfAssertTrue::6 assert true a == b BUT not a Junit test 0.002
UseAssertSameInsteadOfAssertTrue::7 JUnit 4 - assert true a == b 0.002
UseAssertTrueInsteadOfAssertEquals::0 JUnit Test contains assertEquals on other than boolean literal 0.003
UseAssertTrueInsteadOfAssertEquals::1 JUnit Test contains assertEquals on boolean literal 0.003
UseAssertTrueInsteadOfAssertEquals::2 #1323 False positive case of UseAssertTrueInsteadOfAssertEquals 0.003
UseAssertTrueInsteadOfAssertEquals::3 JUnit Test contains assertEquals with Boxed booleans 0.002
UseAssertTrueInsteadOfAssertEquals::4 JUnit Test contains assertEquals with Boxed booleans as param 0.002

LoggingJakartaCommonsRulesTest

GuardDebugLogging::0 ok, no error expected 0.003
GuardDebugLogging::1 Complex logging without guard 0.003
GuardDebugLogging::2 Complex logging wit misplaced guard 0.004
GuardDebugLogging::3 ok #1189 GuardLogStatementRule and GuardDebugLoggingRule broken for log4j2 0.006
GuardDebugLogging::4 violation - wrong guard #1189 GuardLogStatementRule and GuardDebugLoggingRule broken for log4j2 0.005
GuardDebugLogging::5 violation - no if #1189 GuardLogStatementRule and GuardDebugLoggingRule broken for log4j2 0.004
GuardDebugLogging::6 #1224 GuardDebugLogging broken in 5.1.1 - missing additive statement check in log statement 0.003
GuardDebugLogging::7 #1341 pmd:GuardDebugLogging violates LOGGER.debug with format "{}" 0.002
GuardLogStatement::0 OK, guard is here 0.003
GuardLogStatement::1 KO, missing guard 1 0.003
GuardLogStatement::2 KO, missing guard 2 0.003
GuardLogStatement::3 ok #1189 GuardLogStatementRule and GuardDebugLoggingRule broken for log4j2 0.004
GuardLogStatement::4 violation - wrong guard #1189 GuardLogStatementRule and GuardDebugLoggingRule broken for log4j2 0.005
ProperLogger::0 Ok 0.002
ProperLogger::1 Wrong class name 0.002
ProperLogger::2 Ok, special case 0.002
ProperLogger::3 bug 1626232, a separate variable initialization should not confuse the rule 0.002
ProperLogger::4 bug 1626232, extra loggers with different names are not allowed by default (use NOPMD if you want them) 0.002
UseCorrectExceptionLogging::0 ok 0.001
UseCorrectExceptionLogging::1 failure case - two calls 0.002
UseCorrectExceptionLogging::2 must be in a catch block 0.001
UseCorrectExceptionLogging::3 bug 1626232, the rule should not be confused by inner classes 0.002
UseCorrectExceptionLogging::4 bug 1626232, should work with a static block 0.001

LoggingJavaRulesTest

AvoidPrintStackTrace::0 simple failure 0.001
AvoidPrintStackTrace::1 ok 0.001
GuardLogStatementJavaUtil::0 Guarded call - OK 0.004
GuardLogStatementJavaUtil::1 Unguarded call - KO 0.003
GuardLogStatementJavaUtil::2 #1203 GuardLogStatementJavaUtil issues warning for severe level not being specified as property 0.002
GuardLogStatementJavaUtil::3 #1227 GuardLogStatementJavaUtil doesn't catch log(Level.FINE, "msg" + " msg") calls 0.003
GuardLogStatementJavaUtil::4 #1335 GuardLogStatementJavaUtil should not apply to SLF4J Logger 0.004
GuardLogStatementJavaUtil::5 #1347 False positive for GuardLogStatementJavaUtil 0.002
GuardLogStatementJavaUtil::6 #1398 False positive for GuardLogStatementJavaUtil with Log4j 0.002
InvalidSlf4jMessageFormat::0 missing argument 0.003
InvalidSlf4jMessageFormat::1 too many arguments 0.002
InvalidSlf4jMessageFormat::2 Logger without problems 0.001
InvalidSlf4jMessageFormat::3 ignore the exception param 0.002
InvalidSlf4jMessageFormat::4 Class cast exception with Method calls 0.002
InvalidSlf4jMessageFormat::5 Null pointer with VariableNameDeclaration / VariableDeclaratorId 0.001
InvalidSlf4jMessageFormat::6 #1509 [java] InvalidSlf4jMessageFormat NPE 0.002
InvalidSlf4jMessageFormat::7 #1500 [java] InvalidSlf4jMessageFormat: doesn't ignore exception param 0.004
InvalidSlf4jMessageFormat::8 #1541 [java] InvalidSlf4jMessageFormat: False positive with placeholder and exception 0.002
InvalidSlf4jMessageFormat::9 #1551 [java] InvalidSlf4jMessageFormat: fails with NPE 0.002
InvalidSlf4jMessageFormat::10 #365 [java] InvalidSlf4jMessageFormat: false positive with pre-incremented variable 0.002
LoggerIsNotStaticFinal::0 ok 0.001
LoggerIsNotStaticFinal::1 two bad loggers 0.001
LoggerIsNotStaticFinal::2 ok with internal class 0.001
LoggerIsNotStaticFinal::3 ok with local var 0.001
MoreThanOneLogger::0 ok 0.002
MoreThanOneLogger::1 two loggers 0.001
MoreThanOneLogger::2 different logger for inner class 0.002
MoreThanOneLogger::3 ok, fixing NPE bug 0.001
MoreThanOneLogger::4 https://github.com/pmd/pmd/pull/42: Add SLF4j Logger type 0.001
MoreThanOneLogger::5 https://github.com/pmd/pmd/pull/42: Add SLF4j Logger type: Two Loggers 0.001
SystemPrintln::0 one 0.002
SystemPrintln::1 many 0.001
SystemPrintln::2 none 0.001
SystemPrintln::3 #1217 SystemPrintln always says "System.out.print is used" 0.001

MetricsRulesTest

CyclomaticComplexity::0 Simple method 0.005
CyclomaticComplexity::1 testLessComplicatedThanReportLevel 0.001
CyclomaticComplexity::2 Complicated method 0.002
CyclomaticComplexity::3 Complicated method (ignoreBooleanPath) 0.003
CyclomaticComplexity::4 Constructor 0.001
CyclomaticComplexity::5 Testing new parameter showClassMethods 0.002
CyclomaticComplexity::6 Testing new parameter showMethodsMethods 0.002
CyclomaticComplexity::7 Testing default value of showClassMethods and showClassesComplexity 0.002
CyclomaticComplexity::8 #984 Cyclomatic complexity should treat constructors like methods: 1 - showMethodsComplexity=true 0.056
CyclomaticComplexity::9 #984 Cyclomatic complexity should treat constructors like methods: 2 - showMethodsComplexity=false 0.002
CyclomaticComplexity::10 #985 Suppressed methods shouldn't affect avg CyclomaticComplexity 0.002
CyclomaticComplexity::11 Standard Cyclo should count empty switch labels too 0.003
CyclomaticComplexity::12 IgnoreBooleanPaths Cyclo should not count empty switch labels 0.002
CyclomaticComplexity::13 Standard Cyclo should count boolean paths 0.002
CyclomaticComplexity::14 IgnoreBooleanPaths Cyclo should not count boolean paths 0.003
CyclomaticComplexity::15 Avoid division by 0 when averaging a metric over no operations 0.002

MigratingRulesTest

AvoidAssertAsIdentifier::0 assert as identifier 0.002
AvoidEnumAsIdentifier::0 variable and param named enum 0.002
ByteInstantiation::0 new Byte(), bad 0.001
ByteInstantiation::1 Byte.valueOf(), ok 0.003
IntegerInstantiation::0 new Integer(), bad 0.003
IntegerInstantiation::1 Integer.valueOf(), ok 0.003
JUnit4SuitesShouldUseSuiteAnnotation::0 Contains suite 0.003
JUnit4SuitesShouldUseSuiteAnnotation::1 Contains JUnit4TestAdapter suite 0.003
JUnit4SuitesShouldUseSuiteAnnotation::2 Uses propper suite 0.003
JUnit4TestShouldUseAfterAnnotation::0 Contains tearDown 0.003
JUnit4TestShouldUseAfterAnnotation::1 Contains @tearDown 0.003
JUnit4TestShouldUseAfterAnnotation::2 Renamed tearDown 0.003
JUnit4TestShouldUseAfterAnnotation::3 #1446 False positive with JUnit4TestShouldUseBeforeAnnotation when TestNG is used 0.003
JUnit4TestShouldUseBeforeAnnotation::0 Contains setUp 0.002
JUnit4TestShouldUseBeforeAnnotation::1 Contains @setUp 0.003
JUnit4TestShouldUseBeforeAnnotation::2 Renamed setup 0.003
JUnit4TestShouldUseBeforeAnnotation::3 #1400 False positive with JUnit4TestShouldUseBeforeAnnotation 0.003
JUnit4TestShouldUseBeforeAnnotation::4 #1446 False positive with JUnit4TestShouldUseBeforeAnnotation when TestNG is used 0.003
JUnit4TestShouldUseTestAnnotation::0 Contains test, no @Test 0.003
JUnit4TestShouldUseTestAnnotation::1 OK 0.002
JUnit4TestShouldUseTestAnnotation::2 OK, renamed test 0.004
JUnit4TestShouldUseTestAnnotation::3 One test proper, the other incorrect 0.002
JUnit4TestShouldUseTestAnnotation::4 Two tests 0.002
JUnit4TestShouldUseTestAnnotation::5 #1197 JUnit4TestShouldUseTestAnnotation for private method 0.003
JUnitUseExpected::0 JUnit 4 - Contains assert 0.005
JUnitUseExpected::1 Junit 3 format 0.006
JUnitUseExpected::2 Junit 3 format 0.007
JUnitUseExpected::3 Throws 0.005
JUnitUseExpected::4 This method can be broken into two, each checking 0.005
JUnitUseExpected::5 Not a JUnit class - Contains assert 0.005
LongInstantiation::0 new Long(), bad 0.003
LongInstantiation::1 Long.valueOf(), ok 0.002
ReplaceEnumerationWithIterator::0 bad, implementing Enumeration 0.003
ReplaceHashtableWithMap::0 bad, local variable of type Hashtable 0.002
ReplaceHashtableWithMap::1 bad, param of type Hashtable 0.003
ReplaceVectorWithList::0 bad, local variable of type Vector 0.002
ReplaceVectorWithList::1 bad, param of type Vector 0.002
ShortInstantiation::0 new Short(), bad 0.003
ShortInstantiation::1 Short.valueOf(), ok 0.002

NamingRulesTest

AbstractNaming::0 ok, abstract class AbstractFoo 0.003
AbstractNaming::1 bad, abstract class named Foo 0.002
AbstractNaming::2 ok, concrete class named AbstractFoo 0.002
AbstractNaming::3 ok, concrete class named Foo 0.003
AbstractNaming::4 #1344 AbstractNaming should check reverse 0.002
AvoidDollarSigns::0 class Fo$o 0.002
AvoidDollarSigns::1 variable fo$oo 0.002
AvoidDollarSigns::2 method foo$oo 0.003
AvoidDollarSigns::3 interface fo$oo 0.002
AvoidDollarSigns::4 ok 0.002
AvoidFieldNameMatchingMethodName::0 TEST1 0.002
AvoidFieldNameMatchingMethodName::1 TEST2 0.003
AvoidFieldNameMatchingMethodName::2 TEST3 0.002
AvoidFieldNameMatchingMethodName::3 TEST4 0.002
AvoidFieldNameMatchingMethodName::4 Just skip interfaces 0.002
AvoidFieldNameMatchingTypeName::0 TEST1 0.002
AvoidFieldNameMatchingTypeName::1 TEST2 0.002
AvoidFieldNameMatchingTypeName::2 TEST3 0.002
AvoidFieldNameMatchingTypeName::3 TEST4 0.002
AvoidFieldNameMatchingTypeName::4 interface 0.003
BooleanGetMethodName::0 Bad name 0.002
BooleanGetMethodName::1 Good name 0.003
BooleanGetMethodName::2 Should not match on multiple parameters by default 0.002
BooleanGetMethodName::3 Should not match on methods annotated with @Override 0.002
BooleanGetMethodName::4 Should match on multiple parameters when checkParameterizedMethods = true 0.002
ClassNamingConventions::0 class names should not start with lowercase character 0.003
ClassNamingConventions::1 all is well 0.002
GenericsNaming::0 1 upper case/single letter 0.002
GenericsNaming::1 2 upper case/single letter 0.002
GenericsNaming::2 1 lower Case/single letter 0.002
GenericsNaming::3 1 lower case/multiple letter 0.002
LongVariable::0 param 0.001
LongVariable::1 ok 0.002
LongVariable::2 local 0.002
LongVariable::3 for 0.002
LongVariable::4 17 character max 0.002
LongVariable::5 threshold test 0.002
MethodNamingConventions::0 method names should start with lowercase character 0.002
MethodNamingConventions::1 method names should not contain underscores 0.002
MethodNamingConventions::2 all is well 0.002
MethodNamingConventions::3 #1288 MethodNamingConventions for native should be deactivated 0.002
MethodNamingConventions::4 #1288 MethodNamingConventions for native should be deactivated - prevent false negative 0.002
MethodNamingConventions::5 #1343 MethodNamingConventions for overrided methods 0.002
MethodWithSameNameAsEnclosingClass::0 bad 0.002
MethodWithSameNameAsEnclosingClass::1 ok 0.002
MethodWithSameNameAsEnclosingClass::2 doesn't crash on interfaces 0.002
MisleadingVariableName::0 misnamed param 0.002
MisleadingVariableName::1 misnamed local 0.002
MisleadingVariableName::2 all's well 0.002
NoPackage::0 bad 0.002
NoPackage::1 good 0.002
NoPackage::2 nested package 0.002
PackageCase::0 bad 0.001
PackageCase::1 good 0.001
ShortClassName::0 ShortClassName basic test case 0.002
ShortClassName::1 ShortClassName basic test case 2 : More code and other declarations 0.002
ShortClassName::2 ShortClassName works with private classes. 0.002
ShortClassName::3 #1143 ShortClassName fires with a 5-letter class name 0.002
ShortClassName::4 #1232 Make ShortClassName configurable (default = 5) 0.003
ShortClassName::5 #1232 Make ShortClassName configurable (minimum length = 2) 0.003
ShortClassName::6 #1232 Make ShortClassName configurable (minimum length = 4) 0.003
ShortMethodName::0 ok 0.003
ShortMethodName::1 bad 0.003
ShortMethodName::2 2 violations 0.002
ShortMethodName::3 2 methods, 1 violation 0.003
ShortMethodName::4 #1361 ShortMethodName configuration - 7 characters 0.003
ShortMethodName::5 #1361 ShortMethodName configuration - 1 characters 0.003
ShortVariable::0 param 0.002
ShortVariable::1 none 0.002
ShortVariable::2 local 0.002
ShortVariable::3 for 0.003
ShortVariable::4 field 0.002
ShortVariable::5 catch(Exception e) is OK 0.002
ShortVariable::6 ShortVariable false positive with for-each loops 0.002
ShortVariable::7 ShortVariable within for-each loops 0.003
ShortVariable::8 #1361 ShortVariable configuration - 7 characters 0.002
ShortVariable::9 #1361 ShortVariable configuration - 1 characters 0.002
SuspiciousConstantFieldName::0 ok 0.002
SuspiciousConstantFieldName::1 PI not final 0.002
SuspiciousConstantFieldName::2 PI and E not final 0.002
SuspiciousConstantFieldName::3 ok 0.002
SuspiciousConstantFieldName::4 ignore interfaces 0.002
SuspiciousEqualsMethodName::0 bad, equals(Foo foo) 0.003
SuspiciousEqualsMethodName::1 ok, equals(Object foo) 0.002
SuspiciousEqualsMethodName::2 bad, equal(Object foo) 0.002
SuspiciousEqualsMethodName::3 #1431 SuspiciousEqualsMethodName false positive 0.004
SuspiciousHashcodeMethodName::0 ok 0.003
SuspiciousHashcodeMethodName::1 hashcode 0.003
SuspiciousHashcodeMethodName::2 HashCode 0.002
SuspiciousHashcodeMethodName::3 Hashcode 0.002
VariableNamingConventions::0 member level, final statics should be all caps 0.002
VariableNamingConventions::1 member level, non-finals shouldn't have underscores 0.002
VariableNamingConventions::2 local level, non-finals shouldn't have underscores 0.002
VariableNamingConventions::3 method level, non-finals shouldn't have underscores 0.002
VariableNamingConventions::4 constructor level, non-finals shouldn't have underscores 0.002
VariableNamingConventions::5 member level, variables names should start with lowercase character 0.002
VariableNamingConventions::6 local level, variables names should start with lowercase character 0.002
VariableNamingConventions::7 method level, variables names should start with lowercase character 0.002
VariableNamingConventions::8 constructor level, variables names should start with lowercase character 0.002
VariableNamingConventions::9 all is well 0.002
VariableNamingConventions::10 local finals are ok 0.002
VariableNamingConventions::11 serialVersionUID is OK 0.001
VariableNamingConventions::12 interface fields are tested 0.002
VariableNamingConventions::13 final non-statics need not be all caps 0.002
VariableNamingConventions::14 variables in inner classes should not trigger problems in parent declaration 0.003
VariableNamingConventions::15 Rule property control 0.002
VariableNamingConventions::16 Check prefixes 0.012
VariableNamingConventions::17 Check suffixes 0.002
VariableNamingConventions::18 Check members disabled 0.002
VariableNamingConventions::19 Check locals disabled 0.003
VariableNamingConventions::20 Check parameters disabled 0.002
VariableNamingConventions::21 False - with non primitive fields (Bug 2225474) 0.002
VariableNamingConventions::22 #1058 False positive for VariableNamingConventions 0.002
VariableNamingConventions::23 #1293 Disable VariableNamingConventions for native methods 0.002
VariableNamingConventions::24 #1293 Disable VariableNamingConventions for native methods - prevent false negative 0.002
VariableNamingConventions::25 #1346 VariableNamingConventions do not work for method parameters 0.002
VariableNamingConventions::26 #1349 VariableNamingConventions : underscore in final but at first position ? 0.003
VariableNamingConventions::27 #1399 False positive for VariableNamingConventions with annotation @interface 0.002

OptimizationsRulesTest

AddEmptyString::0 Bad add 0.002
AddEmptyString::1 Good add 0.001
AddEmptyString::2 Good convert 0.001
AvoidArrayLoops::0 copy index into array 0.002
AvoidArrayLoops::1 copy one array to another 0.002
AvoidArrayLoops::2 copy via while loop 0.002
AvoidArrayLoops::3 copy involving multiple arrays is ok 0.002
AvoidArrayLoops::4 copy involving method invocation on array element is ok 0.002
AvoidArrayLoops::5 using an offset, still bad 0.002
AvoidArrayLoops::6 nested arrays on LHS, ok 0.002
AvoidArrayLoops::7 adding to array is ok 0.002
AvoidInstantiatingObjectsInLoops::0 TEST1 0.001
AvoidInstantiatingObjectsInLoops::1 TEST2 0.002
AvoidInstantiatingObjectsInLoops::2 TEST3 0.002
AvoidInstantiatingObjectsInLoops::3 TEST4 0.001
AvoidInstantiatingObjectsInLoops::4 throw new is OK 0.002
AvoidInstantiatingObjectsInLoops::5 return new in loop is OK 0.001
AvoidInstantiatingObjectsInLoops::6 #1215 AvoidInstantiatingObjectsInLoops matches the right side of a list iteration loop 0.003
LocalVariableCouldBeFinal::0 TEST1 0.001
LocalVariableCouldBeFinal::1 TEST2 0.002
LocalVariableCouldBeFinal::2 TEST3 0.001
LocalVariableCouldBeFinal::3 TEST4 0.002
LocalVariableCouldBeFinal::4 TEST5 0.002
LocalVariableCouldBeFinal::5 TEST6 0.001
LocalVariableCouldBeFinal::6 TEST7 0.002
LocalVariableCouldBeFinal::7 TEST8 0.001
LocalVariableCouldBeFinal::8 TEST9 0.002
LocalVariableCouldBeFinal::9 Bug 2614040 : false + if a += assignment operator is used inside a method call. 0.002
LocalVariableCouldBeFinal::10 Bug #1047 False Positive in 'for' loops for LocalVariableCouldBeFinal in 5.0.1 0.002
LocalVariableCouldBeFinal::11 Verify another case for Bug #1047 False Positive in 'for' loops for LocalVariableCouldBeFinal in 5.0.1 0.003
MethodArgumentCouldBeFinal::0 TEST1 0.001
MethodArgumentCouldBeFinal::1 TEST2 0.002
MethodArgumentCouldBeFinal::2 TEST3 0.001
MethodArgumentCouldBeFinal::3 TEST4 0.002
MethodArgumentCouldBeFinal::4 TEST5 0.003
MethodArgumentCouldBeFinal::5 TEST6 0.002
MethodArgumentCouldBeFinal::6 Shouldn't trigger on try blocks 0.003
MethodArgumentCouldBeFinal::7 Skip native methods 0.003
MethodArgumentCouldBeFinal::8 Skip abstract methods 0.002
MethodArgumentCouldBeFinal::9 self assignment of a method param means it can't be final 0.003
MethodArgumentCouldBeFinal::10 same as above but prefix vs postfix 0.003
MethodArgumentCouldBeFinal::11 same as above but with extra parenthesis 0.002
MethodArgumentCouldBeFinal::12 bug 1808158 - Constructor args could also be final 0.003
PrematureDeclaration::0 premature declaration before unrelated test 0.003
PrematureDeclaration::1 optimal var declaration position 0.002
PrematureDeclaration::2 Bug #1064 Exception running PrematureDeclaration 0.002
PrematureDeclaration::3 #1305 variable declaration inside switch causes ClassCastException 0.002
PrematureDeclaration::4 #1396 PrematureDeclaration lambda false positive 0.001
RedundantFieldInitializer::0 multiple declarations 0.002
RedundantFieldInitializer::1 references 0.001
RedundantFieldInitializer::2 arrays of primitives 0.003
RedundantFieldInitializer::3 arrays of objects 0.002
RedundantFieldInitializer::4 mixed arrays 0.002
RedundantFieldInitializer::5 nested class 0.002
RedundantFieldInitializer::6 boolean 0.003
RedundantFieldInitializer::7 byte 0.005
RedundantFieldInitializer::8 char 0.004
RedundantFieldInitializer::9 short 0.005
RedundantFieldInitializer::10 int 0.007
RedundantFieldInitializer::11 long 0.009
RedundantFieldInitializer::12 float 0.014
RedundantFieldInitializer::13 double 0.013
RedundantFieldInitializer::14 #1298 Member variable int type with value 0xff000000 causes processing error 0.002
RedundantFieldInitializer::15 Java7 binary literals and underscores 0.003
RedundantFieldInitializer::16 #1418 RedundantFieldInitializer false positive with large long value 0.003
RedundantFieldInitializer::17 #1443 RedundantFieldInitializer: False positive for small floats 0.002
RedundantFieldInitializer::18 #215 - False positive for annotation fields 0.002
SimplifyStartsWith::0 failure case 0.003
SimplifyStartsWith::1 startsWith multiple chars 0.002
SimplifyStartsWith::2 startsWith defined on some other class, doesn't take a String 0.002
SimplifyStartsWith::3 #1392 SimplifyStartsWith false-negative 0.002
UnnecessaryWrapperObjectCreation::0 failure case 0.002
UnnecessaryWrapperObjectCreation::1 calling valueOf is OK 0.002
UnnecessaryWrapperObjectCreation::2 failure case for 1.5+ 0.002
UnnecessaryWrapperObjectCreation::3 Patch 2075906: Add toString() to the rule UnnecessaryWrapperObjectCreation 0.002
UnnecessaryWrapperObjectCreation::4 #1057 False positive for UnnecessaryWrapperObjectCreation 0.002
UseArrayListInsteadOfVector::0 TEST0 0.003
UseArrayListInsteadOfVector::1 TEST1 0.002
UseArrayListInsteadOfVector::2 TEST2 0.002
UseArrayListInsteadOfVector::3 TEST3 0.003
UseArrayListInsteadOfVector::4 #1146 real problem 0.002
UseArrayListInsteadOfVector::5 #1146 UseArrayListInsteadOfVector false positive when using own Vector class 0.002
UseArraysAsList::0 failure case 0.004
UseArraysAsList::1 adding first element repeatedly 0.004
UseArraysAsList::2 inside conditional 0.003
UseArraysAsList::3 adding new object 0.003
UseArraysAsList::4 calling method 0.004
UseArraysAsList::5 Integer array passed as argument 0.003
UseArraysAsList::6 #1099 UseArraysAsList false positives 0.003
UseStringBufferForStringAppends::0 failure case 0.001
UseStringBufferForStringAppends::1 concat inside method call 0.002
UseStringBufferForStringAppends::2 startsWith 0.002
UseStringBufferForStringAppends::3 compound append, should only report 1 failure 0.001
UseStringBufferForStringAppends::4 failure case 0.002
UseStringBufferForStringAppends::5 static failure case 0.002
UseStringBufferForStringAppends::6 reference self 0.001
UseStringBufferForStringAppends::7 false positive bug #2002722 0.002
UseStringBufferForStringAppends::8 false positive bug #2002722, different bug in comment section 0.002
UseStringBufferForStringAppends::9 #1340 UseStringBufferForStringAppends False Positive with ternary operator (used in condition) 0.002
UseStringBufferForStringAppends::10 #1340 UseStringBufferForStringAppends False Positive with ternary operator (used both in condition and options) 0.003
UseStringBufferForStringAppends::11 #222 False positive when inverting ternary expression arguments 0.002

StrictExceptionRulesTest

AvoidCatchingGenericException::0 failure case 0.001
AvoidCatchingGenericException::1 catching another type, ok 0.001
AvoidCatchingGenericException::2 throwing it, ok 0.001
AvoidCatchingNPE::0 failure case 0.002
AvoidCatchingNPE::1 catching another type, ok 0.001
AvoidCatchingNPE::2 throwing it, ok 0.001
AvoidCatchingThrowable::0 simple failure case 0.002
AvoidCatchingThrowable::1 ok 0.002
AvoidLosingExceptionInformation::0 basic failure case 0.001
AvoidLosingExceptionInformation::1 fetch the value returned by getMessage(), ok 0.002
AvoidLosingExceptionInformation::2 fetch the value returned by getCause(), ok 0.002
AvoidLosingExceptionInformation::3 a mix of guilty calls to getMessage(), getLocalizedMessage(), getCause() or getStackTrace(), failure 0.002
AvoidLosingExceptionInformation::4 a larger mix of guilty calls to getMessage(), getLocalizedMessage(), getCause(), getStackTrace() or toString(), failure 0.002
AvoidRethrowingException::0 failure case 0.001
AvoidRethrowingException::1 doing something else before throwing it, ok 0.001
AvoidRethrowingException::2 throwing the return value of a method call on the exception, ok 0.001
AvoidRethrowingException::3 throwing a different exception, ok 0.002
AvoidThrowingNewInstanceOfSameException::0 basic failure case 0.002
AvoidThrowingNewInstanceOfSameException::1 do something else before throwing a new instance of the same exception, ok 0.001
AvoidThrowingNewInstanceOfSameException::2 repackage cause as an instance of the same exception, failure 0.002
AvoidThrowingNewInstanceOfSameException::3 throw new instance of the same exception with a different message, ok 0.002
AvoidThrowingNewInstanceOfSameException::4 throw new instance of the same exception with the same message, failure 0.002
AvoidThrowingNewInstanceOfSameException::5 throws a new instance of the same exception without any arguments, ok 0.001
AvoidThrowingNewInstanceOfSameException::6 throws a new instance of the same exception from a nested try/catch block, ok 0.002
AvoidThrowingNewInstanceOfSameException::7 wraps the exception in a new instance of the same exception from a nested try/catch block, ok 0.001
AvoidThrowingNullPointerException::0 throwing various types 0.002
AvoidThrowingRawExceptionTypes::0 throwing various types 0.002
AvoidThrowingRawExceptionTypes::1 Bug 1796928 : The code uses a classe that use the same names that the one this rule is looking for... 0.002
AvoidThrowingRawExceptionTypes::2 #1337: False positive "Avoid throwing raw exception types" when exception is not thrown 0.001
DoNotExtendJavaLangError::0 Extends with fully qualified name 0.002
DoNotExtendJavaLangError::1 Extends with implicit import 0.001
DoNotExtendJavaLangError::2 Extends something else 0.002
DoNotThrowExceptionInFinally::0 classic failure case 0.001
ExceptionAsFlowControl::0 failure case 0.002
ExceptionAsFlowControl::1 normal throw catch 0.002
ExceptionAsFlowControl::2 BUG 996007 0.003
ExceptionAsFlowControl::3 NPE 0.002
SignatureDeclareThrowsException::0 method throws Exception 0.002
SignatureDeclareThrowsException::1 ok 0.001
SignatureDeclareThrowsException::2 constructor throws Exception 0.002
SignatureDeclareThrowsException::3 skip junit setUp method 0.002
SignatureDeclareThrowsException::4 skip junit tearDown method 0.002
SignatureDeclareThrowsException::5 Generics 0.002
SignatureDeclareThrowsException::6 skip any method starting with 'test' 0.001
SignatureDeclareThrowsException::7 #913 SignatureDeclareThrowsException is raised twice 0.003
SignatureDeclareThrowsException::8 #1535 [java] SignatureDeclareThrowsException: ClassCastException with Annotation 0.002
SignatureDeclareThrowsException::9 #350 allow throws exception when overriding a method defined elsewhere 0.002

AvoidDuplicateLiteralsRuleTest

testStringParserEmptyString 0
testStringParserEscapedEscapedChar 0
testStringParserSimple 0
testStringParserEscapedChar 0

StringsRulesTest

AppendCharacterWithChar::0 appending single character string, should fail 0.002
AppendCharacterWithChar::1 appending single char, should be ok 0.003
AppendCharacterWithChar::2 this is probably wrong, but shouldn't fail 0.002
AppendCharacterWithChar::3 concatenates a three character int 0.002
AppendCharacterWithChar::4 concatenates a string explicitly set to 1 character, not explicitly checking right now 0.002
AppendCharacterWithChar::5 for statement 0.002
AppendCharacterWithChar::6 concatenates an escaped character 0.001
AppendCharacterWithChar::7 concatenates all escaped characters 0.002
AppendCharacterWithChar::8 concatenates a single upper case 0.002
AppendCharacterWithChar::9 concatenates a single number 0.002
AppendCharacterWithChar::10 concatenates a single character & 0.001
AppendCharacterWithChar::11 concatenates two characters 0.002
AppendCharacterWithChar::12 a single octal character 0.002
AppendCharacterWithChar::13 octal character in longer string 0.001
AvoidDuplicateLiterals::0 duplicate literals in argument list 0.003
AvoidDuplicateLiterals::1 literal int argument, ok for now 0.001
AvoidDuplicateLiterals::2 duplicate literals in field decl 0.002
AvoidDuplicateLiterals::3 duplicate literals in annotations 0.002
AvoidDuplicateLiterals::4 duplicate literals in annotations, skipped 0.002
AvoidDuplicateLiterals::5 threshold property 0.002
AvoidDuplicateLiterals::6 exception list property 0.003
AvoidDuplicateLiterals::7 exception list and separator properties 0.002
AvoidDuplicateLiterals::8 minimum length property, minimum length reached 0.002
AvoidDuplicateLiterals::9 minimum length property, minimum length not reached 0.002
AvoidDuplicateLiterals::10 minimum length property, default value 0.002
AvoidDuplicateLiterals::11 #1425 Invalid XML Characters in Output 0.002
AvoidStringBufferField::0 Basic test case for AvoidStringBufferField 0.002
ConsecutiveAppendsShouldReuse::0 1, Single append, should be ok 0.002
ConsecutiveAppendsShouldReuse::1 2, Consecutive appends with reuse, should be ok 0.003
ConsecutiveAppendsShouldReuse::2 3, Single append on different method, should be ok 0.003
ConsecutiveAppendsShouldReuse::3 4, Single append on different objects, should be ok 0.002
ConsecutiveAppendsShouldReuse::4 5, Consecutive literal appends without reuse, not ok 0.003
ConsecutiveAppendsShouldReuse::5 6, Consecutive variable appends without reuse, not ok 0.003
ConsecutiveAppendsShouldReuse::6 7, Consecutive appends in different blocks, should be ok 0.003
ConsecutiveAppendsShouldReuse::7 #1180 False Positive for ConsecutiveAppendsShouldReuse on different variable names 0.002
ConsecutiveAppendsShouldReuse::8 #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer 0.001
ConsecutiveAppendsShouldReuse::9 #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer - part 2 0.003
ConsecutiveAppendsShouldReuse::10 #1370 ConsecutiveAppendsShouldReuse not detected properly on StringBuffer - part 3 0.001
ConsecutiveLiteralAppends::0 1, Single append, should be ok 0.003
ConsecutiveLiteralAppends::1 2, Back to back append, not ok 0.002
ConsecutiveLiteralAppends::2 2, re-running with threshold 0.002
ConsecutiveLiteralAppends::3 3, Appends broken up by variable 0.002
ConsecutiveLiteralAppends::4 4, Appends with literal appends 0.002
ConsecutiveLiteralAppends::5 5, Appends broken up by while loop 0.002
ConsecutiveLiteralAppends::6 6, Appends, then a variable 0.003
ConsecutiveLiteralAppends::7 7, Appends, then a variable 0.002
ConsecutiveLiteralAppends::8 8, Appends, then a while 0.002
ConsecutiveLiteralAppends::9 9, Multiple appends in same while 0.002
ConsecutiveLiteralAppends::10 10, Multiple appends in same while, with multiple outside that while 0.003
ConsecutiveLiteralAppends::11 11, Multiple appends in same while, none outside the loop 0.002
ConsecutiveLiteralAppends::12 12, Two loops, not concurrent appends though 0.002
ConsecutiveLiteralAppends::13 13, A bunch of loops, but nothing concurrent 0.006
ConsecutiveLiteralAppends::14 14, A bunch of loops, one concurrent 0.005
ConsecutiveLiteralAppends::15 15, A bunch of loops, none concurrent, separated by else 0.006
ConsecutiveLiteralAppends::16 16, Additive Expression 1 0.002
ConsecutiveLiteralAppends::17 17, Additive Expression 2 0.002
ConsecutiveLiteralAppends::18 18, End with literal append 0.002
ConsecutiveLiteralAppends::19 19, A bunch of appends 0.002
ConsecutiveLiteralAppends::20 20, Suffix append follwed by real append 0.002
ConsecutiveLiteralAppends::21 21, Appends separated by an if 0.002
ConsecutiveLiteralAppends::22 22, calls to methods in append 0.002
ConsecutiveLiteralAppends::23 23, force 2 failures on 3 lines 0.002
ConsecutiveLiteralAppends::24 23, re-running with threshold 0.003
ConsecutiveLiteralAppends::25 24, Appends from within switch statement 0.002
ConsecutiveLiteralAppends::26 25, Appends from within several different ifs 0.003
ConsecutiveLiteralAppends::27 26, One append in if, one in else 0.002
ConsecutiveLiteralAppends::28 27, Concurrent Appends from within switch statement 0.003
ConsecutiveLiteralAppends::29 28, Additive inside an if statement 0.002
ConsecutiveLiteralAppends::30 29, Adding two strings only 0.002
ConsecutiveLiteralAppends::31 30, Method call in append 0.003
ConsecutiveLiteralAppends::32 31, Adding two strings together then another append 0.002
ConsecutiveLiteralAppends::33 32, Including the constructor's string 0.002
ConsecutiveLiteralAppends::34 33, Additive in the constructor 0.002
ConsecutiveLiteralAppends::35 34, Additive in the constructor 0.002
ConsecutiveLiteralAppends::36 35, For block without braces 0.002
ConsecutiveLiteralAppends::37 36, Appends broken up by method call 0.003
ConsecutiveLiteralAppends::38 37, Intervening method call not related to append 0.002
ConsecutiveLiteralAppends::39 38, Intervening method call not related to append 0.002
ConsecutiveLiteralAppends::40 39, Buffer as class variable, accessed in 2 methods 0.002
ConsecutiveLiteralAppends::41 40, Call to external method with subtraction 0.003
ConsecutiveLiteralAppends::42 41, Call to external method with addition, not string appending 0.002
ConsecutiveLiteralAppends::43 42, Using variable string array 0.002
ConsecutiveLiteralAppends::44 43, Using variable char array 0
skipped
ConsecutiveLiteralAppends::44 43, Using variable char array 0.001
ConsecutiveLiteralAppends::45 44, Appending of not String additive expressions 0.002
ConsecutiveLiteralAppends::46 #1175 false positive for StringBuilder.append called 2 consecutive times 0.002
ConsecutiveLiteralAppends::47 #1369 ConsecutiveLiteralAppends not detected properly on StringBuffer 0.003
ConsecutiveLiteralAppends::48 #1384 NullPointerException in ConsecutiveLiteralAppendsRule - 1 0.001
ConsecutiveLiteralAppends::49 #1384 NullPointerException in ConsecutiveLiteralAppendsRule - 2 0.002
ConsecutiveLiteralAppends::50 #1401 False positive for StringBuilder.append called with constructor 0.002
InefficientEmptyStringCheck::0 test is ok, ok 0.001
InefficientEmptyStringCheck::1 String.trim.length is called, should have failed 0.002
InefficientEmptyStringCheck::2 String.trim.length not is called, ok 0.002
InefficientEmptyStringCheck::3 String.trim.length is called, should have failed 0.002
InefficientEmptyStringCheck::4 String.trim.length is called, assigned to int, ok 0.001
InefficientEmptyStringCheck::5 String.trim.length is called, assigned to boolean, should have failed 0.002
InefficientEmptyStringCheck::6 Using trim.length to find the length and compare to 1, OK 0.002
InefficientEmptyStringCheck::7 Passes trim().length() and 0 to another method 0.002
InefficientEmptyStringCheck::8 Compares the length against a mathematical function 0.002
InefficientEmptyStringCheck::9 String.trim().isEmpty() is called, should have failed 0.001
InefficientEmptyStringCheck::10 String.trim().isEmpty() is called after a chain call, should have failed 0.003
InefficientEmptyStringCheck::11 String.trim().isEmpty() is called after a chain call, should have failed twice 0.002
InefficientEmptyStringCheck::12 Verify no NPE is thrown 0.003
InefficientStringBuffering::0 concatenating a literal to a method return value 0.002
InefficientStringBuffering::1 same as TEST1, but in SB constructor 0.002
InefficientStringBuffering::2 chained appends 0.002
InefficientStringBuffering::3 concatenating two literals in SB constructor 0.002
InefficientStringBuffering::4 concatenating two literals post-construction 0.001
InefficientStringBuffering::5 case where concatenation is not a child of a BlockStatement, but instead is a child of an ExplicitConstructorInvocation 0.002
InefficientStringBuffering::6 don't error out on array instantiation 0.002
InefficientStringBuffering::7 usage of the StringBuffer constructor that takes an int 0.002
InefficientStringBuffering::8 nested 0.002
InefficientStringBuffering::9 looking up too high 0.002
InefficientStringBuffering::10 looking too deep 0.003
InefficientStringBuffering::11 concatenating two non-literals 0.001
InefficientStringBuffering::12 concatenating method + int 0.002
InefficientStringBuffering::13 JTextArea.append 0.003
InefficientStringBuffering::14 don't get thrown off by a buried literal 0.002
InefficientStringBuffering::15 sb.delete shouldn't trigger it 0.002
InefficientStringBuffering::16 skip additions involving static finals, compiler will do constant folding for these 0.002
InefficientStringBuffering::17 for statement without braces 0.002
InefficientStringBuffering::18 if statement without braces 0.002
InefficientStringBuffering::19 3 args version of StringBuffer.append 0.001
InefficientStringBuffering::20 compile-time concats are ok 0.002
InefficientStringBuffering::21 compile-time concats are ok, v2 0.002
InefficientStringBuffering::22 1503099, init with two string lengths 0.001
InefficientStringBuffering::23 1503099, append with two string lengths 0.002
InefficientStringBuffering::24 3109408, false + with adding two integers in constructor 0.003
InefficientStringBuffering::25 1503099, adding two integers 0.002
InsufficientStringBufferDeclaration::0 1, StringBuffer allocated with enough space 0.002
InsufficientStringBufferDeclaration::1 2, StringBuffer not allocated with enough space 0.002
InsufficientStringBufferDeclaration::2 3, StringBuffer allocated with space 0.003
InsufficientStringBufferDeclaration::3 4, StringBuffer allocated from variable 0.002
InsufficientStringBufferDeclaration::4 5, creating a new StringBuffer 0.003
InsufficientStringBufferDeclaration::5 6, Initialize with a specific String 0.002
InsufficientStringBufferDeclaration::6 7, appends inside if statements 0.002
InsufficientStringBufferDeclaration::7 8, Field level variable 0.003
InsufficientStringBufferDeclaration::8 9, Field level variable 0.002
InsufficientStringBufferDeclaration::9 10, Appending non-literals 0.003
InsufficientStringBufferDeclaration::10 11, Initialized to null 0.003
InsufficientStringBufferDeclaration::11 12, Passed in as parameter 0.001
InsufficientStringBufferDeclaration::12 13, compound append 0.003
InsufficientStringBufferDeclaration::13 14, Compound append, presized just fine 0.002
InsufficientStringBufferDeclaration::14 15, Append int, incorrect presize 0.003
InsufficientStringBufferDeclaration::15 16, Append int, properly presized 0.002
InsufficientStringBufferDeclaration::16 17, Append char, incorrect presize 0.003
InsufficientStringBufferDeclaration::17 18, Append char, properly presized 0.002
InsufficientStringBufferDeclaration::18 19, String concatenation, incorrect presize 0.003
InsufficientStringBufferDeclaration::19 20, String concatenation with non-literal, incorrect presize 0.002
InsufficientStringBufferDeclaration::20 21, Incorrectly presized twice 0.002
InsufficientStringBufferDeclaration::21 22, appends inside if/else if/else statements 0.002
InsufficientStringBufferDeclaration::22 23, appends inside if/else if/else statements 0.003
InsufficientStringBufferDeclaration::23 24, appends inside if/else if/else statements 0.003
InsufficientStringBufferDeclaration::24 25, Compound ifs 0.003
InsufficientStringBufferDeclaration::25 26, Compound if, pushed over the edge 0.003
InsufficientStringBufferDeclaration::26 28, Compound if, pushed over the edge 0.002
InsufficientStringBufferDeclaration::27 27, Switch statement doesn't exceed 16 characters 0.003
InsufficientStringBufferDeclaration::28 29, Appending from a cast 0.002
InsufficientStringBufferDeclaration::29 30, Appending chars 0.001
InsufficientStringBufferDeclaration::30 31, Appending from a cast in ifs 0.003
InsufficientStringBufferDeclaration::31 32, Constructor from math 0.002
InsufficientStringBufferDeclaration::32 33, Uses setLength 0.002
InsufficientStringBufferDeclaration::33 34, Uses setLength incorrectly 0.002
InsufficientStringBufferDeclaration::34 35, Append of 'null' literal. 0.002
InsufficientStringBufferDeclaration::35 36, Append of boolean literal. 0.002
InsufficientStringBufferDeclaration::36 37, Initialization with multiply - bug 1743938 0.002
InsufficientStringBufferDeclaration::37 38, Uses setLength 0 with subsequently more than 16, but less than initial 0.002
InsufficientStringBufferDeclaration::38 3175710: NPE in InsufficientStringBufferDeclaration 0.002
InsufficientStringBufferDeclaration::39 3516101: InsufficientStringBufferDeclaration fails to parse hex 0.002
InsufficientStringBufferDeclaration::40 Append a hex int 0.002
InsufficientStringBufferDeclaration::41 #1371 InsufficientStringBufferDeclaration not detected properly on StringBuffer 0.002
InsufficientStringBufferDeclaration::42 #1380 InsufficientStringBufferDeclaration false positive when literal string passed to a lookup service 0.003
InsufficientStringBufferDeclaration::43 #1409 NullPointerException in InsufficientStringBufferRule 0.002
InsufficientStringBufferDeclaration::44 #1413 False positive StringBuffer constructor with ?: int value 0.002
StringBufferInstantiationWithChar::0 OK 0.002
StringBufferInstantiationWithChar::1 failure case 0.001
StringInstantiation::0 new 'new String's 0.002
StringInstantiation::1 new String array 0.002
StringInstantiation::2 using multiple parameter constructor 0.001
StringInstantiation::3 using 4 parameter constructor 0.002
StringInstantiation::4 byte array constructor is ok 0.002
StringInstantiation::5 Method returning new String 0.001
StringInstantiation::6 Not a new String 0.002
StringInstantiation::7 Returns new String(str) 0.002
StringToString::0 local var 0.002
StringToString::1 parameter 0.001
StringToString::2 field 0.002
StringToString::3 primitive 0.001
StringToString::4 multiple similar params 0.002
StringToString::5 string array 0.002
StringToString::6 ToString on String Array Object 0.002
StringToString::7 Should only look at toString's of Arrays 0.002
StringToString::8 #959 StringToString False Positive 0.017
StringToString::9 #1397 StringToString should ignore method references 0.003
UnnecessaryCaseChange::0 failure case with toUpperCase().equals() 0.003
UnnecessaryCaseChange::1 failure case with toLowerCase().equals() 0.002
UnnecessaryCaseChange::2 failure case with toUpperCase().equalsIgnoreCase() 0.001
UnnecessaryCaseChange::3 don't flag toUpperCase() invocations with Locale args 0.002
UnnecessaryCaseChange::4 failure case with toLowerCase().equals() 0.004
UseEqualsToCompareStrings::0 failure case using == 0.002
UseEqualsToCompareStrings::1 failure case using != 0.002
UseEqualsToCompareStrings::2 using equals, OK 0.001
UseEqualsToCompareStrings::3 using compareTo, OK 0.002
UseEqualsToCompareStrings::4 using length, OK 0.001
UseIndexOfChar::0 failure case 0.002
UseIndexOfChar::1 using single quotes, OK 0.002
UseIndexOfChar::2 indexOf multi-character literal, OK 0.002
UseIndexOfChar::3 using indexOf(singleCharString, int) 0.001
UseIndexOfChar::4 using lastIndexOf(singleCharString) 0.002
UseIndexOfChar::5 complicated expressions are ok 0.002
UseIndexOfChar::6 all escaped characters 0.002
UseIndexOfChar::7 a single octal character 0.001
UseIndexOfChar::8 octal character in longer string 0.002
UseIndexOfChar::9 UseIndexOfChar: null pointer with lambdas 0.002
UseIndexOfChar::10 #1211 PMD is failing with NPE for rule UseIndexOfChar while analyzing Jdk 8 Lambda expression 0.003
UseStringBufferLength::0 Using length properly 0.002
UseStringBufferLength::1 StringBuffer.toString.equals(""), bad 0.002
UseStringBufferLength::2 StringBuffer.toString.equals("foo"), ok 0.002
UseStringBufferLength::3 StringBuffer.toString.length(), bad 0.002
UseStringBufferLength::4 no literals 0.002
UseStringBufferLength::5 empty + non-empty string sb.toString().equals("" + "x"), ok (as in: do not use StringBuffer.length()) 0.002
UseStringBufferLength::6 sb.toString().trim().equals(""), ok (as in: do not use StringBuffer.length()) 0.002
UseStringBufferLength::7 sb.toString().equals(baz("")), ok 0.002
UseStringBufferLength::8 sb.toString().trim().length == 0, ok (as in: do not use StringBuffer.length()) 0.001
UseStringBufferLength::9 #1177 Incorrect StringBuffer warning when that class is not used 0.002
UselessStringValueOf::0 valueOf in concatenation 0.002
UselessStringValueOf::1 valueOf in String conversion 0.001
UselessStringValueOf::2 valueOf as first expression in concatenation 0.001
UselessStringValueOf::3 valueOf as first/last expression in concatenation 0.002
UselessStringValueOf::4 valueOf as first/last expression in concatenation 0.002
UselessStringValueOf::5 [ 1977438 ] False positive for UselessStringValueOf 0.002
UselessStringValueOf::6 #976 False positive for UselessStringValueOf 0.002
UselessStringValueOf::7 #1084 NPE at UselessStringValueOfRule.java:36 0.004

SunSecureRulesTest

ArrayIsStoredDirectly::0 Clear violation 0.001
ArrayIsStoredDirectly::1 Clear violation with this. 0.001
ArrayIsStoredDirectly::2 assignment to an internal array 0.001
ArrayIsStoredDirectly::3 assignment of param to local 0.001
ArrayIsStoredDirectly::4 skip interfaces 0.001
ArrayIsStoredDirectly::5 skip abstract, native 0.001
ArrayIsStoredDirectly::6 equality expression, not assignment 0.002
ArrayIsStoredDirectly::7 assignment of array element 0.001
ArrayIsStoredDirectly::8 Constructor clear violation 0.001
ArrayIsStoredDirectly::9 Constructor no violation 0.001
ArrayIsStoredDirectly::10 No reassignment 0.001
ArrayIsStoredDirectly::11 #1063 False+: ArrayIsStoredDirectly 0.002
ArrayIsStoredDirectly::12 #1476 False positive of ArrayIsStoredDirectly 0.002
MethodReturnsInternalArray::0 Clear violation 0.001
MethodReturnsInternalArray::1 Clear violation with this. 0.001
MethodReturnsInternalArray::2 ok 0.001
MethodReturnsInternalArray::3 tricky field hiding 0.001
MethodReturnsInternalArray::4 really sick code 0.001
MethodReturnsInternalArray::5 returning a local array is ok 0.002
MethodReturnsInternalArray::6 returning a local array is ok part deux 0.001
MethodReturnsInternalArray::7 returning a cloned field 0.001
MethodReturnsInternalArray::8 returning a new array 0.001
MethodReturnsInternalArray::9 Doesn't return array 0.001
MethodReturnsInternalArray::10 Interface with array declaration 0.001
MethodReturnsInternalArray::11 #962 MethodReturnsInternalArray: False positive using a ternary operator 0.002
MethodReturnsInternalArray::12 #1299 MethodReturnsInternalArray false positive 0.001
MethodReturnsInternalArray::13 #1324 MethodReturnsInternalArray false positive with clone() 0.005
MethodReturnsInternalArray::14 #1322 MethodReturnsInternalArray on private methods 0.001
MethodReturnsInternalArray::15 #1475 False positive of MethodReturnsInternalArray 0.001
MethodReturnsInternalArray::16 #1475 False positive of MethodReturnsInternalArray - ArrayAllocation 0.002

CloneMethodMustImplementCloneableTest

CloneMethodMustImplementCloneable::0 ok, implements Cloneable 0.001
CloneMethodMustImplementCloneable::1 bad, doesn't implement Cloneable 0.001
CloneMethodMustImplementCloneable::2 ok, not Object.clone since method has a param 0.001
CloneMethodMustImplementCloneable::3 ok, doesn't implement Cloneable but only throw CloneNotSupportedException 0.001
CloneMethodMustImplementCloneable::4 ok, inner class implements Cloneable 0.003
CloneMethodMustImplementCloneable::5 ok, implements interface in same package which extends Cloneable 0.001
CloneMethodMustImplementCloneable::6 ok, implements interface imported implicitly which extends Cloneable 0.001
CloneMethodMustImplementCloneable::7 ok, implements interface which extends Cloneable 0.001
CloneMethodMustImplementCloneable::8 ok, extends superclass AND implements cloneable 0.001
CloneMethodMustImplementCloneable::9 Bug 1698550, nr 1 0.001
CloneMethodMustImplementCloneable::10 Bug 1698550, nr 2 0.001
CloneMethodMustImplementCloneable::11 Bug 681, extending a class which implements Clonable. 0.002
CloneMethodMustImplementCloneable::12 Bug 1765613, NullPointerException on enum 0.001
CloneMethodMustImplementCloneable::13 #1534 [java] CloneMethodMustImplementCloneable: ClassCastException with Annotation (java8) 0.002
CloneMethodMustImplementCloneable::14 #1532 [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable - part 1: interface 0.001
CloneMethodMustImplementCloneable::15 #1532 [java] CloneMethodMustImplementCloneable: Implemented Interface extends Cloneable 0.001

LooseCouplingTest

LooseCoupling::0 returning a HashSet, bad 0.002
LooseCoupling::1 returning a Map, OK 0.001
LooseCoupling::2 no problemo 0.001
LooseCoupling::3 returning a set 0.002
LooseCoupling::4 field declared of type HashSet 0.001
LooseCoupling::5 field, return type both HashSet 0.001
LooseCoupling::6 two fields 0.001
LooseCoupling::7 method param is HashMap 0.001
LooseCoupling::8 Vector could be List 0.002
LooseCoupling::9 ArrayList could be List 0.001
LooseCoupling::10 java.util.HashMap should be Map 0.001
LooseCoupling::11 #938 False positive on LooseCoupling for overriding methods 0.002

SignatureDeclareThrowsExceptionTest

SignatureDeclareThrowsException::0 method throws Exception 0.002
SignatureDeclareThrowsException::1 ok 0.002
SignatureDeclareThrowsException::2 constructor throws Exception 0.001
SignatureDeclareThrowsException::3 JUnit 4 testcase 0.002
SignatureDeclareThrowsException::4 skip method in class that extends TestCase 0.002
SignatureDeclareThrowsException::5 Don't skip other methods 0.001
SignatureDeclareThrowsException::6 Unless 0.002
SignatureDeclareThrowsException::7 skip junit setUp method where the superclass is TestCase 0.001
SignatureDeclareThrowsException::8 skip junit setUp method where the superclass is TestCase, imported explicitly 0.002
SignatureDeclareThrowsException::9 skip junit setUp method where the superclass is TestCase, but is imported implicitly 0.001
SignatureDeclareThrowsException::10 skip junit setUp method where the superclass is TestCase and is in the same package 0.002
SignatureDeclareThrowsException::11 Generics 0.001
SignatureDeclareThrowsException::12 #1535 [java] SignatureDeclareThrowsException: ClassCastException with Annotation 0.002
SignatureDeclareThrowsException::13 #350 allow throws exception when overriding a method defined elsewhere 0.002

UnusedImportsTest

UnusedImports::0 simple unused single type import 0.001
UnusedImports::1 one used single type import 0.001
UnusedImports::2 2 unused single-type imports 0.001
UnusedImports::3 1 used single type import 0.002
UnusedImports::4 1 import stmt, used only in throws clause 0.001
UnusedImports::5 for loop 0.001
UnusedImports::6 Generics 0.001
UnusedImports::7 Annotations 0.002
UnusedImports::8 Annotations 2 0.002
UnusedImports::9 import from default package 0.001
UnusedImports::10 import from default package 0.001
UnusedImports::11 On demand import 0.002
UnusedImports::12 imports used in javadoc comment, see also bug #254 0.001
UnusedImports::13 #1280 False Positive in UnusedImports when import used in javadoc 0.001
UnusedImports::14 #914 False +ve from UnusedImports with wildcard static imports 0.006
UnusedImports::15 #1465 False Positve UnusedImports with javadoc @link 0.002
UnusedImports::16 #1547 False Positve UnusedImports with javadoc for identifiers with underscores 0.002
UnusedImports::17 #348 False Positive UnusedImports with javadoc for public static inner classes of imports 0.002

UnnecessaryRulesTest

UnnecessaryConversionTemporary::0 all glommed together 0.003
UnnecessaryConversionTemporary::1 called on String 0.002
UnnecessaryFinalModifier::0 TEST1 0.002
UnnecessaryFinalModifier::1 TEST2 0.001
UnnecessaryFinalModifier::2 TEST3 0.002
UnnecessaryFinalModifier::3 TEST4 0.001
UnnecessaryFinalModifier::4 TEST5 0.001
UnnecessaryFinalModifier::5 TEST6 0.001
UnnecessaryFinalModifier::6 final method in inner class of non-final outer class 0.001
UnnecessaryFinalModifier::7 final method in inner final class 0.002
UnnecessaryFinalModifier::8 #1464 UnnecessaryFinalModifier false positive on a @SafeVarargs method 0.002
UnnecessaryFinalModifier::9 Unnecessary final of private method 0.002
UnnecessaryModifier::0 Unneeded 'public' in interface method 0.001
UnnecessaryModifier::1 class, no problem 0.002
UnnecessaryModifier::2 Unneeded 'abstract' in interface method 0.001
UnnecessaryModifier::3 all is well in interface method 0.002
UnnecessaryModifier::4 Unneeded 'public' in interface field 0.001
UnnecessaryModifier::5 Unneeded 'static' in interface field 0.002
UnnecessaryModifier::6 Unneeded 'final' in interface field 0.001
UnnecessaryModifier::7 Unneeded 'public static final' in interface field 0.001
UnnecessaryModifier::8 OK in interface field 0.002
UnnecessaryModifier::9 Unneeded 'public' in class nested in interface 0.001
UnnecessaryModifier::10 Unneeded 'static' in class nested in interface 0.002
UnnecessaryModifier::11 OK in class nested in interface 0.001
UnnecessaryModifier::12 Unneeded 'public' in interface nested in interface 0.002
UnnecessaryModifier::13 Unneeded 'static' in interface nested in interface 0.002
UnnecessaryModifier::14 OK in interface nested in interface 0.001
UnnecessaryModifier::15 Unneeded 'static' in interface nested in class 0.002
UnnecessaryModifier::16 OK in interface nested in class 0.001
UnnecessaryModifier::17 Unneeded 'public static final' in interface field inside another interface 0.002
UnnecessaryModifier::18 OK in interface field inside another interface 0.001
UnnecessaryModifier::19 Don't check methods in nested classes 0.002
UnnecessaryModifier::20 Don't check fields in nested classes 0.001
UnnecessaryModifier::21 Don't check fields that are anonymous inner classes 0.001
UnnecessaryModifier::22 False negative: #1185 UnusedModifier throws NPE when parsing enum with a nested static interface 0.002
UnnecessaryModifier::23 #1275 False positive: UnusedModifier rule for static inner class in enum 0.002
UnnecessaryModifier::24 #1480 false positive on public modifier used with inner interface in enum 0.002
UnnecessaryModifier::25 Unnecessary public on annotation element 0.002
UnnecessaryModifier::26 Unnecessary abstract on annotation element 0.001
UnnecessaryModifier::27 Unnecessary final on annotation field 0.002
UnnecessaryModifier::28 Unnecessary static on annotation field 0.001
UnnecessaryModifier::29 Unnecessary public on annotation field 0.002
UnnecessaryModifier::30 Unnecessary public on annotation nested class 0.001
UnnecessaryModifier::31 Unnecessary static on annotation nested class 0.002
UnnecessaryModifier::32 Unnecessary public on annotation nested interface 0.001
UnnecessaryModifier::33 Unnecessary public on annotation nested annotation 0.002
UnnecessaryModifier::34 Unnecessary static on annotation nested enum 0.001
UnnecessaryModifier::35 Unnecessary static on interface nested enum 0.002
UnnecessaryModifier::36 Unnecessary static on class nested enum 0.002
UnnecessaryModifier::37 Unnecessary abstract on interface 0.001
UnnecessaryModifier::38 Unnecessary abstract on annotation 0.001
UnnecessaryReturn::0 bad 0.002
UnnecessaryReturn::1 ok since method is not void 0.001
UnnecessaryReturn::2 ok since return is in sub block 0.001
UnnecessaryReturn::3 interface methods don't have return statements 0.002
UnnecessaryReturn::4 abstract methods don't have return statements 0.001
UnnecessaryReturn::5 return inside a catch - ok 0.002
UnusedNullCheckInEquals::0 failure case 0.002
UnusedNullCheckInEquals::1 different var, 'tis ok 0.002
UnusedNullCheckInEquals::2 proper usage 0.001
UnusedNullCheckInEquals::3 variation of correct usage 0.002
UnusedNullCheckInEquals::4 var is not used in equals() call 0.001
UnusedNullCheckInEquals::5 [ 1481051 ] false + UnusedNullCheckInEquals 0.002
UnusedNullCheckInEquals::6 shouldn't this fail? Yes, it should. Fixed it, so that method calls to equals on variables are considered, too. 0.001
UnusedNullCheckInEquals::7 Arrays can't be compared directly but with Arrays.equals(). 0.002
UselessOperationOnImmutable::0 useless operation on BigDecimal 0.002
UselessOperationOnImmutable::1 useless operation on BigInteger 0.002
UselessOperationOnImmutable::2 using the result, so OK 0.002
UselessOperationOnImmutable::3 using the result in a method call, so OK 0.002
UselessOperationOnImmutable::4 BigInteger obtained from compound method call 0.002
UselessOperationOnImmutable::5 Using generics on List, OK 0.003
UselessOperationOnImmutable::6 BigInteger in conditional statement 0.002
UselessOperationOnImmutable::7 1702782, Immutable used in comparison 0.004
UselessOperationOnImmutable::8 String calls in expressions 0.003
UselessOperationOnImmutable::9 BigInteger calls in expression 0.003
UselessOperationOnImmutable::10 2645268, ClassCastException using Annotation on Local Field 0.003
UselessOverridingMethod::0 call super 0.004
UselessOverridingMethod::1 call super with same argument 0
UselessOverridingMethod::2 call super with different argument 0.001
UselessOverridingMethod::3 call super with different argument 2 0.003
UselessOverridingMethod::4 call super with different argument 3 0.001
UselessOverridingMethod::5 call super with inverted arguments 0.002
UselessOverridingMethod::6 return value of super 0.002
UselessOverridingMethod::7 return value of super with argument 0.002
UselessOverridingMethod::8 return value of super after adding a string 0.001
UselessOverridingMethod::9 do not crash on abstract methods 0.002
UselessOverridingMethod::10 do not crash on interfaces 0.001
UselessOverridingMethod::11 do not crash on empty returns 0.002
UselessOverridingMethod::12 do not crash on super 0.002
UselessOverridingMethod::13 call super with different argument 4 0.001
UselessOverridingMethod::14 adding final is OK 0.002
UselessOverridingMethod::15 adding synchronized is OK 0.002
UselessOverridingMethod::16 Constructors are OK 0.001
UselessOverridingMethod::17 Should ignore clone implementation ( see bug 1522517) 0.002
UselessOverridingMethod::18 clone method with arguments should not be ignored 0.002
UselessOverridingMethod::19 False +: Overriding method merely calls super (see bug 1415525) 0
skipped
UselessOverridingMethod::19 False +: Overriding method merely calls super (see bug 1415525) 0.001
UselessOverridingMethod::20 [ 1977230 ] false positive: UselessOverridingMethod 0.003
UselessOverridingMethod::21 [ 2142986 ] UselessOverridingMethod doesn't consider annotations, ignoreAnnotations property set to true 0.003
UselessOverridingMethod::22 [ 2142986 ] UselessOverridingMethod doesn't consider annotations 0.003
UselessOverridingMethod::23 [ 2142986 ] UselessOverridingMethod doesn't consider annotations, @Override only 0.001
UselessOverridingMethod::24 ClassCastException in statement cast 0.029
UselessParentheses::0 failure case, return statement 0.003
UselessParentheses::1 failure case, assignment 0.002
UselessParentheses::2 failure case, condition 1 0.003
UselessParentheses::3 failure case, condition 2 0.002
UselessParentheses::4 useful parentheses, arithmetic 0.003
UselessParentheses::5 useful parentheses, logic 0.002
UselessParentheses::6 typecast, ok 0.003
UselessParentheses::7 typecast with extra, bad 0.003
UselessParentheses::8 false negatives 0.003
UselessParentheses::9 Parentheses around binary expressions are really necessary 0.003
UselessParentheses::10 3526992, false +. In this case the parentheses must stay. 0.003
UselessParentheses::11 #1012 False positive: Useless parentheses. 0.003
UselessParentheses::12 #1111 False positive: Useless parentheses 0.002
UselessParentheses::13 #1102 False positive: shift operator parenthesis 0.003
UselessParentheses::14 #1243 Useless Parentheses False Positive 0.003
UselessParentheses::15 #1282 False Positive with implicit String.valuesOf() (Java) 0.002
UselessParentheses::16 #1366 UselessParentheses false positive on multiple equality operators 0.003
UselessParentheses::17 #1407 UselessParentheses "&" and "+" operator precedence 0.005
UselessParentheses::18 http://stackoverflow.com/questions/34911230/pmd-uselessparentheses-violation: false + with & and << 0.003
UselessParentheses::19 Verify #1519 [java] UselessParenthesis: False Positive: "Prohibits the use of useless parentheses" when more than one line 0.003
UselessParentheses::20 #199 UselessParentheses false positive on multiple logical and operators 0.003
UselessParentheses::21 #199 UselessParentheses false positive on multiple logical or operators 0.003
UselessParentheses::22 #199 UselessParentheses false positive on equals operator 0.003
UselessQualifiedThis::0 Qualified this as field 0.001
UselessQualifiedThis::1 Qualified this in a method 0.002
UselessQualifiedThis::2 Qualified this in a Inner Class 0.001
UselessQualifiedThis::3 Qualified this in a Nested Class 0.002
UselessQualifiedThis::4 Qualified this in a Nested Class part 2 0.001
UselessQualifiedThis::5 Qualified this all in one 0.002
UselessQualifiedThis::6 #1422 UselessQualifiedThis: False positive with Java 8 Function 0.002

UnusedCodeRulesTest

UnusedFormalParameter::0 failure case 0.001
UnusedFormalParameter::1 method called on param 0.001
UnusedFormalParameter::2 assignment to param 0.001
UnusedFormalParameter::3 interface 0.001
UnusedFormalParameter::4 don't flag public methods by default 0.001
UnusedFormalParameter::5 flag public methods if checkall property is set 0.001
UnusedFormalParameter::6 skip native/abstract methods 0.001
UnusedFormalParameter::7 anonymous inner class npe 0.002
UnusedFormalParameter::8 unused constructor param 0.001
UnusedFormalParameter::9 assigned but not used 0.001
UnusedFormalParameter::10 array element is set 0.002
UnusedFormalParameter::11 unused array in constructor 0.001
UnusedFormalParameter::12 unused array in method 0.002
UnusedFormalParameter::13 False - ! if "checkAll" property is not set 0.002
UnusedFormalParameter::14 violation suppression regex works 0.002
UnusedFormalParameter::15 violation suppression xpath works, by name 0.002
UnusedFormalParameter::16 violation suppression xpath works, by type 0.001
UnusedFormalParameter::17 #878 don't flag abstract methods even if checkall property is set when checking an abstract class 0.002
UnusedFormalParameter::18 #1159 false positive UnusedFormalParameter readObject(ObjectInputStream) if not used 0.003
UnusedFormalParameter::19 #1159 correct UnusedFormalParameter for readObject(foo) if not used 0.003
UnusedFormalParameter::20 #1456 UnusedFormalParameter should ignore overriding methods 0.003
UnusedLocalVariable::0 unused local with assignment 0.002
UnusedLocalVariable::1 unused local w/o assignment 0.001
UnusedLocalVariable::2 unused local in constructor 0.002
UnusedLocalVariable::3 local used on rhs 0.003
UnusedLocalVariable::4 unused local in static initializer 0.002
UnusedLocalVariable::5 unused field 0.002
UnusedLocalVariable::6 loop indexes are not unused locals 0.002
UnusedLocalVariable::7 local used in anonymous inner class 0.002
UnusedLocalVariable::8 two unused locals of same name, one in nested class 0.003
UnusedLocalVariable::9 two locals declared on same line 0.001
UnusedLocalVariable::10 an assignment does not a usage make 0.002
UnusedLocalVariable::11 a compound assignment operator doth a usage make 0.002
UnusedLocalVariable::12 assignment to a member field means used 0.002
UnusedLocalVariable::13 make sure scopes are working 0.002
UnusedLocalVariable::14 another scope test 0.002
UnusedLocalVariable::15 assignment to an array member will be treated as a usage 0.001
UnusedLocalVariable::16 local variable used in postfix expression as child of StatementExpression 0.002
UnusedLocalVariable::17 local variable used in postfix expression on right hand side 0.001
UnusedLocalVariable::18 local variable, object ref, public field of which is incremented via in postfix expression 0.002
UnusedLocalVariable::19 local used in right shift 0.001
UnusedLocalVariable::20 unused local with assignment - Suppressed 0.001
UnusedLocalVariable::21 Reproducing bug #1955852: false positives for UnusedPrivateMethod & UnusedLocalField 0.003
UnusedLocalVariable::22 #1247 Not able to recognize JDK 8 Static Method References 0.002
UnusedLocalVariable::23 #1484 UnusedLocalVariable - false positive - parenthesis 0.002
UnusedLocalVariable::24 #257 UnusedLocalVariable - false positive - parenthesis 0.002
UnusedPrivateField::0 simple unused private field 0.001
UnusedPrivateField::1 private field referenced in another field's initializer 0.001
UnusedPrivateField::2 private field with field of same name in anonymous inner class 0.001
UnusedPrivateField::3 field is used semantically before it's declared syntactically 0.001
UnusedPrivateField::4 private field referenced via 'this' modifier 0.002
UnusedPrivateField::5 private referenced by anonymous inner class 0.001
UnusedPrivateField::6 interface sanity test 0.001
UnusedPrivateField::7 unused private field in static inner class 0.001
UnusedPrivateField::8 private field referenced in nonstatic inner class 0.002
UnusedPrivateField::9 unused private static field 0.001
UnusedPrivateField::10 private static final referenced with qualifier 0.001
UnusedPrivateField::11 unused private field after class decl 0.001
UnusedPrivateField::12 two unused private fields in separate inner classes 0.001
UnusedPrivateField::13 method param shadows unused private field 0.001
UnusedPrivateField::14 private field referenced via 'this' not shadowed by param of same name 0.001
UnusedPrivateField::15 don't catch public fields 0.001
UnusedPrivateField::16 instantiate self and reference private field on other object 0.002
UnusedPrivateField::17 don't count Serialization fields as being unused 0.001
UnusedPrivateField::18 an assignment does not a usage make 0.001
UnusedPrivateField::19 assignment to field member is a usage 0.001
UnusedPrivateField::20 assignment to field member using this modifier is a usage 0.002
UnusedPrivateField::21 this.foo++ shouldn't throw an NPE, but isn't a usage 0.001
UnusedPrivateField::22 super.foo++ shouldn't throw an NPE 0.001
UnusedPrivateField::23 SuppressWarnings("unused") unused private field 0.001
UnusedPrivateField::24 631681, private field is accessed by outer class 0.001
UnusedPrivateField::25 631681, private field in singleton is accessed by outer class 0.002
UnusedPrivateField::26 #1188 False positive in UnusedPrivateField 0.002
UnusedPrivateField::27 private field in inner class accessed as method call 0.002
UnusedPrivateField::28 private field in inner class accessed by another inner class 0.002
UnusedPrivateField::29 #1302 False Positive: UnusedPrivateField when accessed by inner class 0.002
UnusedPrivateField::30 #1420 UnusedPrivateField: Ignore fields if using lombok - 1 0.001
UnusedPrivateField::31 #1420 UnusedPrivateField: Ignore fields if using lombok - 2 0.001
UnusedPrivateField::32 #1420 UnusedPrivateField: Ignore fields if using lombok - 3 0.002
UnusedPrivateField::33 #1420 UnusedPrivateField: Ignore fields if using lombok - 4 0.001
UnusedPrivateField::34 #1420 UnusedPrivateField: Ignore fields if using lombok - 5 0.001
UnusedPrivateField::35 #1420 UnusedPrivateField: Ignore fields if using lombok - 6 0.002
UnusedPrivateField::36 #1420 UnusedPrivateField: Ignore fields if using lombok - 7 0.001
UnusedPrivateField::37 #1428 False positive in UnusedPrivateField when local variable hides member variable 0.002
UnusedPrivateMethod::0 private method called by public method 0.001
UnusedPrivateMethod::1 simple unused private method 0.001
UnusedPrivateMethod::2 anonymous inner class calls private method 0.002
UnusedPrivateMethod::3 two private methods with same name but different parameters 0.001
UnusedPrivateMethod::4 calling private method after instantiating new copy of myself 0.002
UnusedPrivateMethod::5 calling private method using 'this' modifier 0.001
UnusedPrivateMethod::6 simple unused private static method 0.001
UnusedPrivateMethod::7 readResolve/writeReplace/etc are OK 0.001
UnusedPrivateMethod::8 Private methods called only by themselves, BUG 1038229 0.001
UnusedPrivateMethod::9 private with same name as public, different method signature 0.002
UnusedPrivateMethod::10 False +, BUG 1114754 0.001
UnusedPrivateMethod::11 called from constructor 0.002
UnusedPrivateMethod::12 private method with same name but diff arg count than public method 0.001
UnusedPrivateMethod::13 static private called from initializer 0.001
UnusedPrivateMethod::14 static private invoked in static context - i.e., Foo.hi() 0.002
UnusedPrivateMethod::15 private method with same name as param 0.001
UnusedPrivateMethod::16 two methods, one private, one public, same name, same arg count, diff types 0.002
UnusedPrivateMethod::17 two private methods, both used, same name, same arg count, diff types 0.002
UnusedPrivateMethod::18 private method same name as local 0.001
UnusedPrivateMethod::19 SuppressWarnings("unused") - simple unused private method 0.001
UnusedPrivateMethod::20 Calling method on instance of self 0.002
UnusedPrivateMethod::21 #46 False +: Unused private field: call to instance of self, received from another class 0
skipped
UnusedPrivateMethod::21 #46 False +: Unused private field: call to instance of self, received from another class 0
UnusedPrivateMethod::22 Calling one arg varargs method 0.001
UnusedPrivateMethod::23 Calling two arg varargs method 0.002
UnusedPrivateMethod::24 Reproducing bug #1955852: false positives for UnusedPrivateMethod & UnusedLocalField 0.002
UnusedPrivateMethod::25 verify #1156 False failure with "Avoid unused private methods" 0.003
UnusedPrivateMethod::26 #1223 UnusedPrivateMethod: Java 8 method reference causing false positives 0.002
UnusedPrivateMethod::27 #1226 False Positive: UnusedPrivateMethod overloading with varargs 0.002
UnusedPrivateMethod::28 #1228 UnusedPrivateMethod returns false positives (1) 0.004
UnusedPrivateMethod::29 #1228 UnusedPrivateMethod returns false positives (2) 0.004
UnusedPrivateMethod::30 #1228 UnusedPrivateMethod returns false positives (3) 0.005
UnusedPrivateMethod::31 #1228 UnusedPrivateMethod returns false positives (4) 0.011
UnusedPrivateMethod::32 #1228 UnusedPrivateMethod returns false positives (5a) 0.003
UnusedPrivateMethod::33 #1228 UnusedPrivateMethod returns false positives (5b) 0.005
UnusedPrivateMethod::34 #1233 UnusedPrivateMethod: False positive : method called on returned object. 0.002
UnusedPrivateMethod::35 #1228 UnusedPrivateMethod returns false positives (6) 0.037
UnusedPrivateMethod::36 #1228 UnusedPrivateMethod returns false positives (7) 0.027
UnusedPrivateMethod::37 #1234 Unused private methods still giving false positives in 5.1.3 snapshot 0.005
UnusedPrivateMethod::38 #1156 False failure with "Avoid unused private methods" (part 2) 0.002
UnusedPrivateMethod::39 #1251 UnusedPrivateMethod false positives for boxing & unboxing arguments 0.003
UnusedPrivateMethod::40 #1249 Regression: UnusedPrivateMethod from 5.0.5 to 5.1.2 0.01
UnusedPrivateMethod::41 #1261 False positive "Avoid unused private methods" with Generics 0.002
UnusedPrivateMethod::42 #1261 False positive "Avoid unused private methods" with Generics 2 0.002
UnusedPrivateMethod::43 #1261 False positive "Avoid unused private methods" with Generics 3 0.002
UnusedPrivateMethod::44 #1261 False positive "Avoid unused private methods" with Generics 4 0.003
UnusedPrivateMethod::45 #1276 False positive in UnusedPrivateMethod when method arg is Object and not called with plain Object 0.003
UnusedPrivateMethod::46 #1281 UnusedPrivateMethod incorrectly flagged for methods nested private classes 0.005
UnusedPrivateMethod::47 #1287 UnusedPrivateMethod returns false positives for Superclass 0.003
UnusedPrivateMethod::48 #1286 UnusedPrivateMethod returns false positives for varags 0.003
UnusedPrivateMethod::49 #1294 False positive UnusedPrivateMethod with public inner enum from another class 0.003
UnusedPrivateMethod::50 #1296 PMD UnusedPrivateMethod invalid detection of 'private void method(int,boolean,Integer...)' 0.003
UnusedPrivateMethod::51 #1332 False Positive: UnusedPrivateMethod 0.003
UnusedPrivateMethod::52 #1395 UnusedPrivateMethod false positive for array element method call 0.003
UnusedPrivateMethod::53 #1403 False positive UnusedPrivateMethod with JAVA8 0.008
UnusedPrivateMethod::54 #1405 UnusedPrivateMethod false positive? 0.004
UnusedPrivateMethod::55 #1412 UnusedPrivateMethod false positive: Issue #1403 not completely solved 0.009

AcceptanceTest

testInnerOuterClass 0
testNullPointerEnumValueOfOverloaded 0
testDemo 0
testEnum 0.001
testEq 0
testFieldFinder 0
testClashingSymbols 0
testInitializer 0
testCatchBlocks 0

ClassScopeTest

testCantContainsSuperToString 0
testOneParam 0
testbuz 0.001
testMethodUsageSeenWithThis 0
testNullType 0.001
testOneParamVararg 0
testEnumTypeParameter 0.001
testNestedClassFieldAndParameter 0.001
testImportNestedClassesResolution 0
testVarArgsEmpty 0
testEnumsClassScope 0
testContains 0
testMethodUsageSeen2 0.001
testContainsStaticVariablePrefixedWithClassName 0
testNestedClassesOfImportResolution 0
testNestedClassDeclFound 0
testTwoParams 0
testClassName 0
testMethodUsageSeen 0.001
testTwoMethodsSameNameDiffArgs 0
testMethodDeclarationRecorded 0
testNoParams 0
testAnonymousInnerClassName 0
testNestedClassesResolution 0.001
testTwoParamsVararg 0

GlobalScopeTest

testEnums 0
testClassDeclAppears 0

ImageFinderFunctionTest

testSeveralImages 0
testSingleImage 0

LocalScopeTest

testLocalVariableTypesAreRecorded 0
testQualifiedNameOccurrence 0
testMethodArgumentTypesAreRecorded 0
testNameWithThisOrSuperIsNotFlaggedAsUnused 0.001
testNameWithSuperIsNotFlaggedAsUnused 0
testPostfixUsageIsRecorded 0
testgetEnclosingMethodScope 0
testLocalVariableDeclarationFound 0

MethodNameDeclarationTest

testEquality 0

MethodScopeTest

testGenerics 0
testMethodName 0
testMethodParameterOccurrenceRecorded 0

NameOccurrencesTest

testQualifiedOccurrence 0.001
testSuper 0
testThis 0
testSimpleVariableOccurrence 0
testNameLinkage 0
testIsSelfAssignment 0
testEnumStaticUsage 0.001

ScopeAndDeclarationFinderTest

testJava8LambdaScoping 0.001
testAnnonInnerClassScoping 0

ScopeCreationVisitorTest

testScopesAreCreated 0

SimpleTypedNameDeclarationTest

testEquals 0

SourceFileScopeTest

testPackageIsEmptyString 0
testNestedClasses 0
testClassDeclAppears 0
testPackageNameFound 0

TypeSetTest

testFindClassSamePackage 0
testImplicitImportResolverPassFail 0
testVoidTypeResolver 0
testCurrentPackageResolverPass 0.001
testFindClassImportOnDemand 0
testFullyQualifiedNameResolverWithNull 0
testExplicitImportResolverWithNullAndEmptyImports 0
testCurrentPackageResolverWithNull 0.001
testASTCompilationUnitPackage 0
testExplicitImportResolver 0
testExplicitImportResolverWithNull 0
testImportOnDemandResolverPass 0
importOnDemandResolverFail1 0.001
importOnDemandResolverFail2 0
testVoidTypeResolverWithNull 0
testAddImport 0
testFindClassExplicitImport 0
testImplicitImportResolverWithNull 0
testImplicitImportResolverPass 0
testImportOnDemandResolverWithNull 0
testPrimitiveTypeResolver 0
testFindClassPrimitive 0
testFindClassImplicitImport 0
testPrimitiveTypeResolverWithNull 0
testFindClassVoid 0
testFindFullyQualified 0.001

VariableNameDeclarationTest

testPrimitiveType 0.001
testPrimitiveTypeImage 0
testExceptionBlkParam 0
testRefTypeImage 0
testParamTypeImage 0
testArrayIsReferenceType 0
testIsArray 0
testConstructor 0

ClassTypeResolverTest

testFieldAccessNested 0.002
testPrimarySimpleGenericFieldAccess 0.003
testFieldAccessShadow 0.003
testBinaryStringPromotion 0.011
testFullyQualifiedType 0.002
testBinaryNumericOperators 0.003
testSimpleGenericFieldAccess 0.006
testBinaryLogicalOperators 0.003
testUnaryNumericOperators 0.004
testFieldAccess 0.002
testBoundsGenericFieldAccess 0.002
testUnaryLogicalOperators 0.003
testAssignmentOperators 0.003
testClassNameExists 0
testAnonymousClassFromInterface 0.001
testAnonymousInnerClass 0.001
testNestedAnonymousClass 0.003
testExtraTopLevelClass 0.001
testInnerClass 0
testThisExpression 0.001
testInnerClassNotCompiled 0.001
testBinaryNumericPromotion 0.032
testEnumAnonymousInnerClass 0.005
testParameterGenericFieldAccess 0.004
testUnaryNumericPromotion 0.005
testSuperExpression 0.001
acceptanceTest 0.001
testFieldAccessSuper 0.003
testRawGenericFieldAccess 0.007
testLiterals 0.002

PMDASMClassLoaderTest

testCachingMemoryConsumption 0
skipped
testLoadClassWithImportOnDemand 0
testClassWithImportInnerOnDemand 0
testCachingOfNotFoundClasses 0.001

Failure Details

[Summary] [Package List] [Test Cases]


testContainsNoInner
skipped: skipped
UseVarargs::4 method, do not varargs as the signature is dictated by an interface // TODO Once this is implemented, perhaps it should be optional? The compiler will technically let you use varargs.
skipped: skipped
ConsecutiveLiteralAppends::44 43, Using variable char array
skipped: skipped
net.sourceforge.pmd.lang.java.rule.typeresolution.xml.MyTestCase
skipped: skipped
UselessOverridingMethod::19 False +: Overriding method merely calls super (see bug 1415525)
skipped: skipped
UnusedPrivateMethod::21 #46 False +: Unused private field: call to instance of self, received from another class
skipped: skipped
testCachingMemoryConsumption
skipped: skipped