Class | Description |
---|---|
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.
|
ArrayIndexOutOfBounds | |
ArrayWrappedCallByReference |
looks for methods that use an array of length one to pass a variable to achieve call
by pointer ala C++.
|
BackportReusePublicIdentifiers |
Detects use of Backport concurrent classes.
|
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.
|
CircularDependencies |
looks for classes that have dependencies on each other in a circular way.
|
ClassEnvy |
finds methods that excessively use methods from another class.
|
CloneUsability |
finds classes that implement clone() that do not specialize the return value, and do
not swallow CloneNotFoundException.
|
CollectionNamingConfusion |
looks for fields and local variables that have Map, Set, List in their names
but the variable is a collection of a different basic type.
|
CommonsEqualsBuilderToEquals |
Find usage of EqualsBuilder from Apache commons, where the code invoke
equals() on the constructed object rather than isEquals()
|
CommonsHashcodeBuilderToHashcode |
Find usage of HashCodeBuilder from Apache commons, where the code invokes
hashCode() on the constructed object rather than toHashCode()
|
CommonsStringBuilderToString |
Find usage of ToStringBuilder from Apache commons, where the code invokes
toString() on the constructed object without invoking append().
|
CompareClassNameEquals |
In a JVM, Two classes are the same class (and consequently the same type) if
they are loaded by the same class loader, and they have the same fully
qualified name [JVMSpec 1999].
|
ConflictingTimeUnits |
looks for methods that perform arithmetic operations on values representing time
where the time unit is incompatible, ie adding a millisecond value to a nanosecond value.
|
ConfusingArrayAsList |
looks for calls to Arrays.asList where the parameter is a primitive array.
|
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.
|
HangingExecutors |
looks for executors that are never shutdown, which will not allow the application to terminate
|
HttpClientProblems | |
ImproperPropertiesUse |
looks for java.util.Properties use where values other than String
are placed in the properties object.
|
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.
|
InvalidConstantArgument |
Looks for jdk method calls where a parameter expects a constant value, because the api
was created before enums.
|
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
|
LingeringGraphicsObjects |
looks for creation of java.awt.Graphics object that do not have the
.dispose() method called on them when finished.
|
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.
|
MissingMethodsDetector | |
ModifyingUnmodifiableCollection |
looks for code that attempts to modify a collection that is or may be
defined as immutable.
|
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.
|
NonProductiveMethodCall |
looks for common methods that are believed to be non mutating, where the value
is discarded.
|
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.
|
PoorMansEnum |
looks for simple fields that only store one of several constant values.
|
PossibleConstantAllocationInLoop | |
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.
|
PossibleUnsuspectedSerialization |
looks for serialization of non-static inner classes.
|
PossiblyRedundantMethodCalls |
looks for calls of the same method on the same object when that object hasn't changed.
|
PresizeCollections |
finds methods that create and populate collections, and while knowing
the end size of those collections, does not pre allocate the collection
to be big enough.
|
ReflectionOnObjectMethods |
looks for method calls through reflection on methods found in
java.lang.Object.
|
Section508Compliance |
looks for interfaces that ignore 508 compliance, including not using JLabel.setLabelFor,
Using null layouts,
|
SideEffectConstructor |
looks for constructors that operate through side effects, specifically
constructors that aren't assigned to any variable or field.
|
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.
|
StackedTryBlocks |
looks for two or more try catch blocks that are consecutive and catch the
same kind of exception, and throw the same exception always.
|
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).
|
SuspiciousGetterSetterUse |
looks for methods that set a setter with the value obtained from the same bean's
complimentary getter.
|
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 reassigns
that field or variable.
|
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.
|
UnboundMethodTemplateParameter |
Looks for methods that declare method level template parameter(s) that are not bound to any of the
method's parameters, and thus is not adding any validation/type safety to the method, and is
just confusing.
|
Unjitable |
looks for methods that are bigger than 8000 bytes, as these methods are ignored by
the jit for compilation, causing them to always be interpreted.
|
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).
|
UnusedParameter |
looks for private or static methods that have parameters that aren't used.
|
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 | |
UseVarArgs | |
WeakExceptionMessaging | |
WriteOnlyCollection |
Copyright © 2005-2014 MeBigFatGuy.com. All Rights Reserved.