SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.9.8

Threshold is medium

Effort is max

Summary

Classes Bugs Errors Missing Classes
69 98 0 0

Files

Class Bugs
ClassInDefaultPackageTest 2
integration.tests.AbstractClassTest 1
integration.tests.AbstractClassWithNoExecutableLines 1
integration.tests.AnEnumTest 1
integration.tests.BooleanExpressionsTest 1
integration.tests.ClassInRegularPackage 2
integration.tests.ClassNotExercised 1
integration.tests.ClassWithNestedClasses 2
integration.tests.ClassWithNestedClasses$1 1
integration.tests.ClassWithNestedClasses$NestedClass 1
integration.tests.ClassWithNestedClasses$NestedClass$DeeplyNestedClass 1
integration.tests.ClassWithNestedClasses$NestedClass$InnerClass 1
integration.tests.ClassWithNestedEnum$NestedClass 1
integration.tests.ClassWithNestedEnum$NestedEnum 1
integration.tests.ClassWithReferenceToNestedClass 1
integration.tests.ClassWithReferenceToNestedClassTest 1
integration.tests.CoverageTest 3
integration.tests.IfElseStatements 20
integration.tests.IfElseStatementsTest 3
integration.tests.InterfaceWithExecutableCode 1
integration.tests.InterfaceWithExecutableCodeTest 1
integration.tests.MiscellaneousTest 1
integration.tests.MultiThreadedCode 2
integration.tests.MultiThreadedCodeTest 1
integration.tests.UnreachableStatements 3
integration.tests.data.ClassWithFieldsAccessedByMultipleTestsTest 4
integration.tests.data.ClassWithFieldsTest 1
integration.tests.data.ClassWithInstanceFields 5
integration.tests.loops.ForStatements 5
integration.tests.loops.ForStatementsTest 1
integration.tests.loops.WhileStatements 2
integration.tests.loops.WhileStatementsTest 2
integration.tests.other.control.structures.SwitchStatements 15
integration.tests.other.control.structures.SwitchStatementsTest 1
integration.tests.other.control.structures.SynchronizedBlocks 1
integration.tests.other.control.structures.TryCatchFinallyStatements 7

ClassInDefaultPackageTest

Bug Category Details Line Priority
Return value of ClassInDefaultPackage.doSomething(ClassInDefaultPackage$NestedEnum) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 11 Medium
Return value of ClassInDefaultPackage.doSomething(ClassInDefaultPackage$NestedEnum) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 16 Medium

integration.tests.AbstractClassTest

Bug Category Details Line Priority
Return value of AbstractClassWithNoExecutableLines.returnValue() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 33 Medium

integration.tests.AbstractClassWithNoExecutableLines

Bug Category Details Line Priority
Unused public or protected field: integration.tests.AbstractClassWithNoExecutableLines.anIntField STYLE UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD Not available Medium

integration.tests.AnEnumTest

Bug Category Details Line Priority
Unread field: integration.tests.AnEnumTest.tested PERFORMANCE URF_UNREAD_FIELD 17 Medium

integration.tests.BooleanExpressionsTest

Bug Category Details Line Priority
Return value of BooleanExpressions.isSameTypeIgnoringAutoBoxing(Class, Class) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 78 Medium

integration.tests.ClassInRegularPackage

Bug Category Details Line Priority
Method integration.tests.ClassInRegularPackage.doSomething(ClassInRegularPackage$NestedEnum) ignores return value of a non mutating method CORRECTNESS NPMC_NON_PRODUCTIVE_METHOD_CALL 57 Medium
Return value of Enum.toString() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 57 Medium

integration.tests.ClassNotExercised

Bug Category Details Line Priority
Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance CORRECTNESS SLF4J_FORMAT_SHOULD_BE_CONST 31 High

integration.tests.ClassWithNestedClasses

Bug Category Details Line Priority
Return value of new ClassWithNestedClasses$1() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 88 Medium
Method integration.tests.ClassWithNestedClasses.methodContainingAnonymousClass(int) uses a Side Effect Constructor STYLE SEC_SIDE_EFFECT_CONSTRUCTOR 88 Medium

integration.tests.ClassWithNestedClasses$1

Bug Category Details Line Priority
Class integration.tests.ClassWithNestedClasses$1 implements Cloneable but does not define or use clone method BAD_PRACTICE CN_IDIOM 88 Medium

integration.tests.ClassWithNestedClasses$NestedClass

Bug Category Details Line Priority
Instance field integration.tests.ClassWithNestedClasses$NestedClass.i likely could be defined as static CORRECTNESS SPP_FIELD_COULD_BE_STATIC Not available Medium

integration.tests.ClassWithNestedClasses$NestedClass$DeeplyNestedClass

Bug Category Details Line Priority
Format should be constant. Use placeholder to reduce the needless cost of parameter construction. see http://www.slf4j.org/faq.html#logging_performance CORRECTNESS SLF4J_FORMAT_SHOULD_BE_CONST 46 High

integration.tests.ClassWithNestedClasses$NestedClass$InnerClass

Bug Category Details Line Priority
To make log readable, log format ({}: {}) should contain non-sign character. BAD_PRACTICE SLF4J_SIGN_ONLY_FORMAT 62 Medium

integration.tests.ClassWithNestedEnum$NestedClass

Bug Category Details Line Priority
Return value of ClassWithNestedEnum$NestedEnum.values() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 31 Medium

integration.tests.ClassWithNestedEnum$NestedEnum

Bug Category Details Line Priority
Enum class integration.tests.ClassWithNestedEnum$NestedEnum only declares one enum value CORRECTNESS ENMI_ONE_ENUM_VALUE 16 Medium

integration.tests.ClassWithReferenceToNestedClass

Bug Category Details Line Priority
Return value of java.util.concurrent.locks.ReentrantReadWriteLock.readLock() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 19 Medium

integration.tests.ClassWithReferenceToNestedClassTest

Bug Category Details Line Priority
Return value of ClassWithReferenceToNestedClass.doSomething() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 17 Medium

integration.tests.CoverageTest

Bug Category Details Line Priority
Unconstrained method integration.tests.CoverageTest.fileData() converts checked exception to unchecked STYLE EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS 88 High
integration.tests.CoverageTest.fileData should be package protected MALICIOUS_CODE MS_PKGPROTECT Not available Medium
Method integration.tests.CoverageTest.setTestedFieldToNewInstanceIfApplicable(Field) uses AccessibleObject.setAccessible to modify accessibility of classes CORRECTNESS RFI_SET_ACCESSIBLE 68 Medium

integration.tests.IfElseStatements

Bug Category Details Line Priority
integration.tests.IfElseStatements.anotherIfWithBooleanAndOperator(boolean, boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 309 High
integration.tests.IfElseStatements.ifAndElse(boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 35 High
integration.tests.IfElseStatements.ifSpanningMultipleLines(boolean, int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 327 High
integration.tests.IfElseStatements.ifWithBooleanAndOperator(boolean, boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 281 High
integration.tests.IfElseStatements.ifWithBooleanOrOperator(boolean, boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 295 High
integration.tests.IfElseStatements.infeasiblePaths(boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 235 High
integration.tests.IfElseStatements.methodWithFourDifferentPathsAndSegmentedLines(boolean, int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 95 High
integration.tests.IfElseStatements.methodWithFourDifferentPathsAndSimpleLines(boolean, int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 75 High
integration.tests.IfElseStatements.simpleIf(boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 22 High
integration.tests.IfElseStatements.singleLineIf(boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 49 High
integration.tests.IfElseStatements.singleLineIfAndElse(boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 61 High
Method integration.tests.IfElseStatements.ifAndElse(boolean) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 37 Medium
Method integration.tests.IfElseStatements.infeasiblePaths(boolean) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 239 Medium
Method integration.tests.IfElseStatements.methodWithFourDifferentPathsAndSegmentedLines(boolean, int) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 97 Medium
Method integration.tests.IfElseStatements.methodWithFourDifferentPathsAndSegmentedLines(boolean, int) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 103 Medium
Method integration.tests.IfElseStatements.methodWithFourDifferentPathsAndSimpleLines(boolean, int) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 77 Medium
Method integration.tests.IfElseStatements.simpleIf(boolean) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 23 Medium
Method integration.tests.IfElseStatements.singleLineIfAndElse(boolean) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 61 Medium
Self assignment of x in integration.tests.IfElseStatements.returnInput(int, boolean, boolean, boolean) STYLE SA_LOCAL_SELF_ASSIGNMENT 152 High
Unread field: integration.tests.IfElseStatements.instanceField PERFORMANCE URF_UNREAD_FIELD 341 Medium

integration.tests.IfElseStatementsTest

Bug Category Details Line Priority
Return value of IfElseStatements.ifElseWithComplexBooleanCondition(boolean, boolean) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 126 Medium
Return value of IfElseStatements.yetAnotherSingleLineIfAndElse(boolean) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 66 Medium
Return value of IfElseStatements.anotherSingleLineIfAndElse(boolean) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 58 Medium

integration.tests.InterfaceWithExecutableCode

Bug Category Details Line Priority
Random object created and used only once in integration.tests.InterfaceWithExecutableCode.<static initializer for InterfaceWithExecutableCode>() BAD_PRACTICE DMI_RANDOM_USED_ONLY_ONCE 17 High

integration.tests.InterfaceWithExecutableCodeTest

Bug Category Details Line Priority
Unused field: integration.tests.InterfaceWithExecutableCodeTest.tested PERFORMANCE UUF_UNUSED_FIELD Not available Medium

integration.tests.MiscellaneousTest

Bug Category Details Line Priority
Method integration.tests.MiscellaneousTest.methodWithIINCWideInstruction() seems to be useless STYLE UC_USELESS_VOID_METHOD 30 Medium

integration.tests.MultiThreadedCode

Bug Category Details Line Priority
Return value of new MultiThreadedCode$1() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 19 Medium
Method integration.tests.MultiThreadedCode.lambda$nonBlockingOperation$0() uses a Side Effect Constructor STYLE SEC_SIDE_EFFECT_CONSTRUCTOR 19 Medium

integration.tests.MultiThreadedCodeTest

Bug Category Details Line Priority
Unused field: integration.tests.MultiThreadedCodeTest.tested PERFORMANCE UUF_UNUSED_FIELD Not available Medium

integration.tests.UnreachableStatements

Bug Category Details Line Priority
integration.tests.UnreachableStatements.branchingMethodWithUnreachableLines(int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 31 High
integration.tests.UnreachableStatements.nonBranchingMethodWithUnreachableLines() forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 19 High
Method integration.tests.UnreachableStatements.branchingMethodWithUnreachableLines(int) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 34 Medium

integration.tests.data.ClassWithFieldsAccessedByMultipleTestsTest

Bug Category Details Line Priority
Return value of ClassWithFieldsAccessedByMultipleTests.getInstanceField2() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 67 Medium
Return value of ClassWithFieldsAccessedByMultipleTests.isStaticField2() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 35 Medium
Return value of ClassWithFieldsAccessedByMultipleTests.getInstanceField1() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 55 Medium
Return value of ClassWithFieldsAccessedByMultipleTests.isStaticField1() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 23 Medium

integration.tests.data.ClassWithFieldsTest

Bug Category Details Line Priority
Method integration.tests.data.ClassWithFieldsTest.setInstance2() needlessly boxes a boolean constant PERFORMANCE NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION 51 Medium

integration.tests.data.ClassWithInstanceFields

Bug Category Details Line Priority
integration.tests.data.ClassWithInstanceFields.getArrayField() may expose internal representation by returning ClassWithInstanceFields.arrayField MALICIOUS_CODE EI_EXPOSE_REP 95 Medium
integration.tests.data.ClassWithInstanceFields.setArrayField(int[]) may expose internal representation by storing an externally mutable object into ClassWithInstanceFields.arrayField MALICIOUS_CODE EI_EXPOSE_REP2 99 Medium
Primitive field integration.tests.data.ClassWithInstanceFields.shortField is public and set from inside the class, which makes it too exposed. Consider making it private to limit external accessibility. BAD_PRACTICE PA_PUBLIC_PRIMITIVE_ATTRIBUTE 59 Medium
Instance field integration.tests.data.ClassWithInstanceFields.finalField likely could be defined as static CORRECTNESS SPP_FIELD_COULD_BE_STATIC Not available Medium
Unread public/protected field: integration.tests.data.ClassWithInstanceFields.shortField STYLE URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD 59 Medium

integration.tests.loops.ForStatements

Bug Category Details Line Priority
integration.tests.loops.ForStatements.forInSeparateLines() forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 15 High
integration.tests.loops.ForStatements.forInSingleLine(int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 21 High
integration.tests.loops.ForStatements.forEachCollectionElement(List): 1st parameter 'values' could be declared as java.lang.Iterable instead STYLE OCP_OVERLY_CONCRETE_PARAMETER 36 Medium
integration.tests.loops.ForStatements.nestedFor(List): 1st parameter 'list' could be declared as java.lang.Iterable instead STYLE OCP_OVERLY_CONCRETE_PARAMETER 71 Medium
Method integration.tests.loops.ForStatements.nestedFor(List) seems to be useless STYLE UC_USELESS_VOID_METHOD 76 High

integration.tests.loops.ForStatementsTest

Bug Category Details Line Priority
Return value of ForStatements.forWithNestedIfWhichReturns(int, int[]) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 84 Medium

integration.tests.loops.WhileStatements

Bug Category Details Line Priority
Method integration.tests.loops.WhileStatements.bothKindsOfWhileCombined(int, int) seems to be useless STYLE UC_USELESS_VOID_METHOD 85 Medium
Method integration.tests.loops.WhileStatements.nestedWhile(int, int) seems to be useless STYLE UC_USELESS_VOID_METHOD 63 Medium

integration.tests.loops.WhileStatementsTest

Bug Category Details Line Priority
Return value of WhileStatements.whileWithBreak(int) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 64 Medium
Return value of WhileStatements.whileWithContinue(int) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 49 Medium

integration.tests.other.control.structures.SwitchStatements

Bug Category Details Line Priority
integration.tests.other.control.structures.SwitchStatements.anotherSwitchStatementWithCompactCasesAndDefault(int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 58 High
integration.tests.other.control.structures.SwitchStatements.anotherSwitchStatementWithSparseCasesAndDefault(char) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 30 High
integration.tests.other.control.structures.SwitchStatements.switchStatementWithCompactCasesAndDefault(int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 40 High
integration.tests.other.control.structures.SwitchStatements.switchStatementWithCompactCasesAndNoDefault(int) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 80 High
integration.tests.other.control.structures.SwitchStatements.switchStatementWithSparseCasesAndDefault(char) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 12 High
integration.tests.other.control.structures.SwitchStatements.switchStatementWithSparseCasesAndNoDefault(char) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 67 High
Method integration.tests.other.control.structures.SwitchStatements.anotherSwitchStatementWithCompactCasesAndDefault(int) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 59 Medium
Method integration.tests.other.control.structures.SwitchStatements.anotherSwitchStatementWithSparseCasesAndDefault(char) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 33 Medium
Method integration.tests.other.control.structures.SwitchStatements.switchStatementWithCompactCasesAndDefault(int) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 45 Medium
Method integration.tests.other.control.structures.SwitchStatements.switchStatementWithCompactCasesAndNoDefault(int) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 81 Medium
Method integration.tests.other.control.structures.SwitchStatements.switchStatementWithSparseCasesAndDefault(char) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 17 Medium
Method integration.tests.other.control.structures.SwitchStatements.switchStatementWithSparseCasesAndNoDefault(char) triggers finalization when calling System.runFinalization() CORRECTNESS MDM_RUNFINALIZATION 70 Medium
Switch statement found in integration.tests.other.control.structures.SwitchStatements.switchStatementWithCompactCasesAndNoDefault(int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 79-82 Medium
Switch statement found in integration.tests.other.control.structures.SwitchStatements.switchStatementWithSparseCasesAndNoDefault(char) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 65-70 Medium
Method integration.tests.other.control.structures.SwitchStatements.switchStatementWithCompactCasesAndNoDefault(int) stores return result in local before immediately returning it STYLE USBR_UNNECESSARY_STORE_BEFORE_RETURN 86 Medium

integration.tests.other.control.structures.SwitchStatementsTest

Bug Category Details Line Priority
Return value of SwitchStatements.switchOnString(String, boolean) ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 99 Medium

integration.tests.other.control.structures.SynchronizedBlocks

Bug Category Details Line Priority
Method integration.tests.other.control.structures.SynchronizedBlocks.doInSynchronizedBlock() ignores return value of a non mutating method CORRECTNESS NPMC_NON_PRODUCTIVE_METHOD_CALL 18 Medium

integration.tests.other.control.structures.TryCatchFinallyStatements

Bug Category Details Line Priority
integration.tests.other.control.structures.TryCatchFinallyStatements.regularTryFinally(boolean) forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 32 High
integration.tests.other.control.structures.TryCatchFinallyStatements.tryCatch() forces garbage collection; extremely dubious except in benchmarking code PERFORMANCE DM_GC 11 High
Method integration.tests.other.control.structures.TryCatchFinallyStatements.tryCatch() prints the stack trace to the console STYLE IMC_IMMATURE_CLASS_PRINTSTACKTRACE 13 Medium
Method integration.tests.other.control.structures.TryCatchFinallyStatements.finallyBlockContainingIfWithBodyInSameLine() ignores return value of a non mutating method CORRECTNESS NPMC_NON_PRODUCTIVE_METHOD_CALL 75 Medium
Method integration.tests.other.control.structures.TryCatchFinallyStatements.finallyBlockContainingIfWithBodyInSameLine() ignores return value of a non mutating method CORRECTNESS NPMC_NON_PRODUCTIVE_METHOD_CALL 78 Medium
Return value of Object.toString() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 78 Medium
Method integration.tests.other.control.structures.TryCatchFinallyStatements.finallyBlockContainingIfWithBodyInSameLine() calls toString() on an instance of a class that hasn't overridden toString() STYLE SPP_NON_USEFUL_TOSTRING 75 Medium