Package com.mebigfatguy.fbcontrib.detect

provides bug detectors for the FindBugs™ tool.
FindBugs is a trademark of the University of Maryland

See:
          Description

Class Summary
AbnormalFinallyBlockReturn find methods that return or throw exception from a finally block.
AbnormalFinallyBlockReturn.FinallyBlockInfo holds the finally block information for a particular method.
AbstractClassEmptyMethods finds methods of abstract classes that do nothing, or just throw exceptions.
AbstractOverriddenMethod finds methods that are declared abstract but override concrete methods in a superclass.
ArrayBasedCollections looks for methods that use arrays for items in the keyset of a map, or as an element of a set, or in a list when using the contains method.
ArrayWrappedCallByReference looks for methods that use an array of length one to pass a variable to achieve call by pointer ala C++.
BloatedAssignmentScope looks for variable assignments at a scope larger than its use.
BloatedSynchronizedBlock looks for methods that are implemented using synchronized blocks, but are overly synchronized because the beginning of the block only accesses local variables, and not member variables, or this.
BogusExceptionDeclaration looks for constructors, private methods or static methods that declare that they throw specific checked exceptions, but that do not.
ClassEnvy finds methods that excessively use methods from another class.
ConfusingAutoboxedOverloading looks for methods that have the same signature, except where one uses a Character parameter, and the other uses an int, long, float, double parameter.
ConfusingFunctionSemantics looks for methods that return a parameter after making what looks like modifications to that parameter.
ConstantListIndex looks for methods that access arrays or classes that implement java.util.List using a constant integer for the index.
ContraVariantArrayAssignment Finds contravariant array assignments.
CopiedOverriddenMethod Looks for methods that are direct copies of the implementation in the super class
CustomBuiltXML looks for methods that build xml based strings by concatenation strings and custom values together.
CyclomaticComplexity Calculates the McCabe Cyclomatic Complexity measure and reports methods that have an excessive value.
DateComparison Looks for inefficient comparison of Date objects using two comparisons when one would do.
DeclaredRuntimeException looks for methods that declare Runtime exceptions in their throws clause.
DeletingWhileIterating looks for deletion of items from a collection using the remove method of the collection at the same time that the collection is being iterated on.
DeprecatedTypesafeEnumPattern looks for classes that appear to implement the old style type safe enum pattern that was used before java added Enum support to the language.
DubiousListCollection looks for fields that are implementations of java.util.List, but that are used in a set-like fashion.
DubiousSetOfCollections looks for uses of sets or keySets of maps that contain other collections.
ExceptionSoftening looks for methods that catch checked exceptions, and throw unchecked exceptions in their place.
FieldCouldBeLocal finds fields that are used in a locals only fashion, specifically private fields that are accessed first in each method with a store vs.
FinalParameters looks for methods that correctly do not write to a parameter.
FloatingPointLoops looks for methods that use floating point indexes for loops.
InappropriateToStringUse looks for methods that rely on the format of the string fetched from another object's toString method, when that method appears not to be owned by the author of the calling method.
InconsistentKeyNameCasing looks for calls to HttpRequest.getParameter with parameters of the same name with different cases like 'id' and 'Id'.
IncorrectInternalClassUse looks for classes that use objects from com.sun.xxx packages.
InefficientStringBuffering looks for appending strings inside of calls to StringBuffer or StringBuilder append.
InheritanceTypeChecking looks for if/else blocks where a series of them use instanceof on the same variable to determine what do to.
JDBCVendorReliance looks for uses of jdbc vendor specific classes and methods making the database access code non portable.
JUnitAssertionOddities looks for odd uses of the Assert class of the JUnit framework
ListIndexedIterating looks for for loops that iterate over a java.util.List using an integer index, and get, rather than using an Iterator.
LiteralStringComparison looks for methods that compare strings against literal strings, where the literal string is passed as the parameter.
LocalSynchronizedCollection looks for allocations of synchronized collections that are stored in local variables, and never stored in fields or returned from methods.
LoggerOddities  
LostExceptionStackTrace looks for methods that catch exceptions, and rethrow another exception without encapsulating the original exception within it.
ManualArrayCopy looks for methods that copy data from one array to another using a loop.
MethodReturnsConstant looks for private methods that can only return one constant value.
MisleadingOverloadModel looks for classes that define both static and instance methods with the same name.
MoreDumbMethods looks for method calls that are unsafe or might indicate bugs.
NeedlessAutoboxing Looks for methods that pass a primitive wrapper class object, to the same classes Constructor.
NeedlessCustomSerialization looks for classes that implement Serializable and implements readObject and writeObject by just calling the readDefaultObject or writeDefaultObject of the stream parameter.
NeedlessInstanceRetrieval looks for methods that call a method to retrieve a reference to an object, to use to load a constant.
NeedlessMemberCollectionSynchronization looks for private collection members, either static or instance, that are only initialized in the clinit or init, but are synchronized.
NonCollectionMethodUse looks for method calls to collection classes where the method is not defined by the Collections interface, and an equivalent method exists in the interface.
NonFunctionalField looks for fields in serializable classes that are defined as both final and transient.
NonOwnedSynchronization looks for methods that synchronize on variables that are not owned by the current class.
NonRecycleableTaglibs looks for tag libraries that are not recycleable because backing members of taglib attributes are set in areas besides the setter method for the attribute.
NonSymmetricEquals looks for classes that break the fundamental rule of equivalence, which is symmetry.
OrphanedDOMNode Looks for methods that create DOM Nodes but do not add them to any DOM Document.
OverlyConcreteParameter looks for parameters that are defined by classes, but only use methods defined by an implemented interface or super class.
OverlyConcreteParameter.MethodInfo  
OverzealousCasting looks for manual casts of objects that are more specific then needed as the value is assigned to a class or interface higher up in the inheritance chain.
ParallelLists looks for classes that maintain two or more lists or arrays associated one-for-one through the same index to hold two or more pieces of related information.
PartiallyConstructedObjectAccess looks for constructors of non final classes that make method calls to non final methods.
PoorlyDefinedParameter looks for non derivable method that declare parameters and then cast those parameters to more specific types in the method.
PossibleIncompleteSerialization looks for classes that don't handle serialization of parent class member fields when the class in question is serializable but is derived from non serializable classes.
PossibleMemoryBloat looks for classes that maintain collections or StringBuffer/StringBuilders in static member variables, and that do not appear to provide a way to clear or remove items from these members.
PossiblyRedundantMethodCalls looks for calls of the same method on the same object when that object hasn't changed.
Section508Compliance looks for interfaces that ignore 508 compliance, including not using JLabel.setLabelFor, Using null layouts,
SillynessPotPourri looks for silly bugs that are simple but do not fit into one large pattern.
SloppyClassReflection looks for methods that use Class.forName("XXX") to load a class object for a class that is already referenced by this class.
SluggishGui looks for methods that implement awt or swing listeners and perform time consuming operations.
SpoiledChildInterfaceImplementor looks for classes that implement interfaces by relying on methods being implemented in super classes, even though the superclass knows nothing about the interface being implemented by the child.
SpuriousThreadStates Looks for methods that call wait, notify or notifyAll on an instance of a java.lang.Thread.
SQLInLoop looks for the execution of sql queries inside a loop.
StaticArrayCreatedInMethod looks for creation of arrays where the contents are constants, or static fields, and the array isn't further modified.
StaticMethodInstanceInvocation looks for methods that make static method calls using an instance reference.
StutteredMethodArguments looks for method calls that passes the same argument to two different parameters of the same method.
SuspiciousCloneAlgorithm looks for implementation of clone() where a store is made to a member of the source object.
SuspiciousClusteredSessionSupport looks for methods that access objects in http sessions, that are complex objects, modifies those objects, but does not call setAttribute to signify a change so that cluster replication can happen.
SuspiciousComparatorReturnValues looks for class that implement Comparator or Comparable, and whose compare or compareTo methods return constant values only, but that don't represent the three possible choice (a negative number, 0, and a positive number).
SuspiciousJDKVersionUse  
SuspiciousNullGuard looks for code that checks to see if a field or local variable is not null, before entering a code block either an if, or while statement, and then doesn't reference that field or local in the block of code that is guarded by the null check.
SuspiciousUninitializedArray looks for creation of arrays, that are not populated before being returned for a method.
SuspiciousWaitOnConcurrentObject looks for calls to the wait method on mutexes defined in the java.util.concurrent package where it is likely that await was intended.
SyncCollectionIterators Looks for use of iterators on synchronized collections built from the Collections class.
TailRecursion looks for methods that make a recursive call to itself as the last statement in the method.
TristateBooleanPattern looks for methods that are defined to return Boolean, but return null.
UnnecessaryNewNullCheck looks for construction of new objects, and then the immediate testing whether the object is null or not.
UnnecessaryStoreBeforeReturn Looks for methods that store the return result in a local variable, and then immediately returns that local variable.
UnrelatedCollectionContents looks for collections or arrays that hold objects that are unrelated thru class or interface inheritance other than java.lang.Object.
UnrelatedReturnValues looks for methods that return Object, and who's code body returns two or more different types of objects that are unrelated (other than by Object).
UseAddAll looks for loops that transfers the contents of one collection to another.
UseCharacterParameterizedMethod looks for methods that pass single character string constants as parameters to methods that alternatively have an overridden method that accepts a character instead.
UseEnumCollections looks for uses of sets or maps where the key is an enum.
UseSplit looks for code that builds an array by using a StringTokenizer to break up a string and place individual elements into an array.
UseToArray  
WeakExceptionMessaging  
 

Package com.mebigfatguy.fbcontrib.detect Description

provides bug detectors for the FindBugs™ tool.
FindBugs is a trademark of the University of Maryland



Copyright © 2005-2010 MeBigFatGuy.com. All Rights Reserved.