Apache Commons logo Commons BCEL

FindBugs Bug Detector Report

The following document contains the results of FindBugs

FindBugs Version is 3.0.1

Threshold is

Effort is min

Summary

Classes Bugs Errors Missing Classes
433 23 0 0

org.apache.bcel.classfile.ConstantUtf8

Bug Category Details Line Priority
Write to static field org.apache.bcel.classfile.ConstantUtf8.created from instance method new org.apache.bcel.classfile.ConstantUtf8(String) STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 156 Medium

org.apache.bcel.classfile.LineNumberTable

Bug Category Details Line Priority
Computation of average could overflow in org.apache.bcel.classfile.LineNumberTable.getSourceLine(int) STYLE IM_AVERAGE_COMPUTATION_COULD_OVERFLOW 168 Medium

org.apache.bcel.classfile.Signature$MyByteArrayInputStream

Bug Category Details Line Priority
Found reliance on default encoding in new org.apache.bcel.classfile.Signature$MyByteArrayInputStream(String): String.getBytes() I18N DM_DEFAULT_ENCODING 132 High
Found reliance on default encoding in org.apache.bcel.classfile.Signature$MyByteArrayInputStream.getData(): new String(byte[]) I18N DM_DEFAULT_ENCODING 137 High

org.apache.bcel.classfile.Utility

Bug Category Details Line Priority
Switch statement found in org.apache.bcel.classfile.Utility.codeToString(ByteSequence, ConstantPool, boolean) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 334-337 Medium

org.apache.bcel.generic.BranchHandle

Bug Category Details Line Priority
Write to static field org.apache.bcel.generic.BranchHandle.bh_list from instance method org.apache.bcel.generic.BranchHandle.addHandle() STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 64 Medium

org.apache.bcel.generic.InstructionConstants

Bug Category Details Line Priority
org.apache.bcel.generic.InstructionConstants.INSTRUCTIONS should be moved out of an interface and made package protected MALICIOUS_CODE MS_OOI_PKGPROTECT 174 Medium

org.apache.bcel.generic.InstructionList

Bug Category Details Line Priority
Computation of average could overflow in org.apache.bcel.generic.InstructionList.findHandle(InstructionHandle[], int[], int, int) STYLE IM_AVERAGE_COMPUTATION_COULD_OVERFLOW 116 Medium
Switch statement found in org.apache.bcel.generic.InstructionList.setPositions(boolean) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 896-903 Medium

org.apache.bcel.generic.SWITCH

Bug Category Details Line Priority
Computation of average could overflow in org.apache.bcel.generic.SWITCH.sort(int, int) STYLE IM_AVERAGE_COMPUTATION_COULD_OVERFLOW 105 Medium

org.apache.bcel.util.AttributeHTML

Bug Category Details Line Priority
Found reliance on default encoding in new org.apache.bcel.util.AttributeHTML(String, String, ConstantPool, ConstantHTML): new java.io.PrintWriter(OutputStream) I18N DM_DEFAULT_ENCODING 61 High

org.apache.bcel.util.BCELFactory

Bug Category Details Line Priority
Switch statement found in org.apache.bcel.util.BCELFactory.visitAllocationInstruction(AllocationInstruction) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 189-193 Medium

org.apache.bcel.util.BCELifier

Bug Category Details Line Priority
Found reliance on default encoding in new org.apache.bcel.util.BCELifier(JavaClass, OutputStream): new java.io.PrintWriter(OutputStream) I18N DM_DEFAULT_ENCODING 72 High
Complicated, subtle or wrong increment in for-loop org.apache.bcel.util.BCELifier.printFlags(int, BCELifier$FLAGS) STYLE QF_QUESTIONABLE_FOR_LOOP 215 Medium

org.apache.bcel.util.Class2HTML

Bug Category Details Line Priority
Found reliance on default encoding in org.apache.bcel.util.Class2HTML.writeMainHTML(AttributeHTML): new java.io.PrintWriter(OutputStream) I18N DM_DEFAULT_ENCODING 221 High

org.apache.bcel.util.ClassLoader

Bug Category Details Line Priority
org.apache.bcel.util.ClassLoader.DEFAULT_IGNORED_PACKAGES should be package protected MALICIOUS_CODE MS_PKGPROTECT 61 Medium
The class name org.apache.bcel.util.ClassLoader shadows the simple name of the superclass java.lang.ClassLoader BAD_PRACTICE NM_SAME_SIMPLE_NAME_AS_SUPERCLASS 61-190 High

org.apache.bcel.util.ClassVector

Bug Category Details Line Priority
Class org.apache.bcel.util.ClassVector defines non-transient non-serializable instance field vec BAD_PRACTICE SE_BAD_FIELD Not available High

org.apache.bcel.util.CodeHTML

Bug Category Details Line Priority
Found reliance on default encoding in new org.apache.bcel.util.CodeHTML(String, String, Method[], ConstantPool, ConstantHTML): new java.io.PrintWriter(OutputStream) I18N DM_DEFAULT_ENCODING 63 High

org.apache.bcel.util.ConstantHTML

Bug Category Details Line Priority
Found reliance on default encoding in new org.apache.bcel.util.ConstantHTML(String, String, String, Method[], ConstantPool): new java.io.PrintWriter(OutputStream) I18N DM_DEFAULT_ENCODING 60 High

org.apache.bcel.util.MethodHTML

Bug Category Details Line Priority
Found reliance on default encoding in new org.apache.bcel.util.MethodHTML(String, String, Method[], Field[], ConstantHTML, AttributeHTML): new java.io.PrintWriter(OutputStream) I18N DM_DEFAULT_ENCODING 52 High

org.apache.bcel.verifier.GraphicalVerifier

Bug Category Details Line Priority
Unread field: org.apache.bcel.verifier.GraphicalVerifier.packFrame; should this field be static? PERFORMANCE SS_SHOULD_BE_STATIC 33 Medium

org.apache.bcel.verifier.structurals.Frame

Bug Category Details Line Priority
org.apache.bcel.verifier.structurals.Frame._this should be package protected MALICIOUS_CODE MS_PKGPROTECT Not available Medium