[Fb-contrib-commit] fb-contrib/htdocs index.html,1.64,1.65
Brought to you by:
dbrosius
|
From: Dave B. <dbr...@us...> - 2006-02-18 23:23:13
|
Update of /cvsroot/fb-contrib/fb-contrib/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11423/htdocs Modified Files: index.html Log Message: add Abbreviations Index: index.html =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/htdocs/index.html,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- index.html 18 Feb 2006 03:03:41 -0000 1.64 +++ index.html 18 Feb 2006 23:23:09 -0000 1.65 @@ -51,7 +51,7 @@ Note: these detectors are still in testing<br/> <div id="cvs" style="display:none;"> <ul> - <li><b>Bloated Synchronized Block</b><br/> + <li><b>[BSB] Bloated Synchronized Block</b><br/> Looks for methods that implement synchronized blocks that appear to contain some code at the beginning that does not need to be synchronized. Moving these lines out of the synchronized block should help multithreaded performance.</li> @@ -64,28 +64,28 @@ Note: fb-contrib v2.2.0 requires FindBugs™ v0.95 or later<br/> <div id="v2_2_0" style="display:block;"> <ul> - <li><b>Constant List Index</b><br/> + <li><b>[CLI] Constant List Index</b><br/> Looks for methods that access an array or list using a constant integer index. Often, this is a typo where a loop variable is intended to be used. If however, specific list indices mean different specific things, then perhaps replacing the list with a first-class object with meaningful accessors would make the code less brittle.</li> - <li><b>Sloppy Class Reflection</b><br/> + <li><b>[SCR] Sloppy Class Reflection</b><br/> Looks for methods that use Class.forName("XXX") to load a class object for a class that is already referenced by this class. It is simpler to just use XXX.class, and doing so protects the integrity of this code from such transformations as obfuscation. Use of Class.forName should only be used when the class in question isn't already statically bound to this context.</li> - <li><b>Array Wrapped Call By Reference</b><br/> + <li><b>[AWCBR] Array Wrapped Call By Reference</b><br/> Looks for methods that use an array of length one to pass a variable to achieve call by pointer ala C++. It is better to define a proper return class type that holds all the relevant information retrieved from the called method.</li> - <li><b>Sluggish Gui</b><br/> + <li><b>[SG] Sluggish Gui</b><br/> Looks for methods that implement awt or swing listeners and perform time consuming operations. Doing these operations in the gui thread will cause the interface to appear sluggish and non-responsive to the user. It is better to use a separate thread to do the time consuming work so that the user has a better experience.</li> - <li><b>Needless Instance Retrieval</b><br/> + <li><b>[NIR] Needless Instance Retrieval</b><br/> Looks for methods that call a method to retrieve a reference to an object only to then load a static field of that object's class. It is simpler and more performant to just directly load the field from the class itself.</li> @@ -97,19 +97,19 @@ Detectors added in v2.0.0<br/> <div id="v2_0_0" style="display:none;"> <ul> - <li><b>Array Based Collections</b><br/> + <li><b>[ABC] Array Based Collections</b><br/> 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. Since arrays do not, and cannot define an equals method, reference equality is used for these collections, which is probably not desired. If it is, consider using the IdentityHashMap class when using Maps in this case, to better document your intentions.</li> - <li><b>Orphaned DOM Nodes</b><br/> + <li><b>[ODN] Orphaned DOM Nodes</b><br/> Looks for methods that create DOM nodes but do not append them to any Document.</li> - <li><b>Abstract Overridden Method</b><br/> + <li><b>[A0M] Abstract Overridden Method</b><br/> Looks for abstract methods that override a concrete method in a super class. Doing this casts away the implementation of the super class, and breaks the implied contract as set forth by the parent class.</li> - <li><b>Custom Built XML</b><br/> + <li><b>[CBX] Custom Built XML</b><br/> Looks for methods that build xml based strings by concatenation strings and custom values together. Doing so makes brittle code, that is difficult to modify, validate and understand. It is cleaner to create external xml files that are @@ -122,20 +122,20 @@ Detectors added in v1.8.0<br/> <div id="v1_8_0" style="display:none;"> <ul> - <li><b>Spurious Thread States</b><br/> + <li><b>[STS] Spurious Thread States</b><br/> Finds methods that call wait, notify or notifyAll on an instance of a java.lang.Thread. Since the internal workings of the thread is to synchronize on the thread itself, introducing client calls will confuse the thread state of the object in question, and will cause spurious thread state changes, either waking threads up when not intended, or removing the thread from the runnable state.</li> - <li><b>Needless Autoboxing</b><br/> + <li><b>[NAB] Needless Autoboxing</b><br/> Finds methods that pass an instance of a primitive wrapper class, to a constructor of the same class. Since wrapper classes are immutable, you can just use the original instance, instead of creating a new one. This bug is a misuse of autoboxing.</li> - <li><b>UnnecessaryStoreBeforeReturn</b><br/> + <li><b>[USBR] UnnecessaryStoreBeforeReturn</b><br/> Finds methods that store the return result in a local variable, and then immediately returns that local variable.</li> - <li><b>CopiedOverriddenMethod</b><br/> + <li><b>[COM] CopiedOverriddenMethod</b><br/> Finds methods that are implemented with an exact copy of their super class method's implementation. In most cases, this means that this method can just be removed.</li> </ul> @@ -146,20 +146,20 @@ Detectors added in v1.6.0<br/> <div id="v1_6_0" style="display:none;"> <ul> - <li><b>Static Method Instance Invocation</b><br/> + <li><b>[SMII] Static Method Instance Invocation</b><br/> Finds methods that make static method calls using an instance reference. For documentation purposes, it is better to call the method using the class name. This may represent a change in definition that should be noticed.</li> - <li><b>Abnormal Finally Block Return</b><br/> + <li><b>[AFBR] Abnormal Finally Block Return</b><br/> Finds methods that return or throw an exception from a finally block. Since a finally block is executed after any return or throw statements that are present in the try or catch block, these exit values are swallowed by the finally block's actions.</li> - <li><b>Non Collections Method Use</b><br/> + <li><b>[NCMU] Non Collections Method Use</b><br/> Finds calls to collections objects using methods that are not defined in the Collections interfaces, but that have equivalent methods defined in such. By using the new methods, it allows for the replacement of concrete classes with interfaces, and simplifies changing collection types if desired.</li> - <li><b>Confusing Autoboxed Overloading</b><br/> + <li><b>[CAO] Confusing Autoboxed Overloading</b><br/> Finds classes that define overloaded methods where the only difference is a parameter being of type java.lang.Character, and int, long, float or double. Due to autoboxing, one might conclude that a parameter of 'a' would autobox to Character, but would instead be cast to a double.</li> @@ -171,17 +171,17 @@ Detectors added in v1.4.0<br/> <div id="v1_4_0" style="display:none;"> <ul> - <li><b>Final Parameters</b><br/> + <li><b>[FP] Final Parameters</b><br/> Finds parameters that could be marked as final, but aren't. Doing so helps document the method, keeps unwanted changes to creep in, and may help the jvm jit compiler to optimize better.</li> - <li><b>Abstract Class Empty Methods</b><br/> + <li><b>[ACEM] Abstract Class Empty Methods</b><br/> Finds empty methods, or methods that just throw an exception in abstract classes. In these cases, it probably is more correct to just define the method to be abstract as well, so that proper subclass implementation is enforced.</li> - <li><b>Manual Array Copy</b><br/> + <li><b>[MAC] Manual Array Copy</b><br/> Finds methods that copy elements from one array to another manually using a loop. It is better performing to use System.arraycopy, as this method is native.</li> - <li><b>Floating Point Loops</b><br/> + <li><b>[FPL] Floating Point Loops</b><br/> Finds methods that use floating point variables as the index to loops. Since floating point math is inprecise, errors will accumulate each time through the loop, making the logic suspect. It is better to use an integer index, and calculate the desired floating point value from this integer.</li> @@ -193,19 +193,19 @@ Detectors added in v1.2.0<br/> <div id="v1_2_0" style="display:none;"> <ul> - <li><b>Parallel Lists</b><br/> + <li><b>[PL] Parallel Lists</b><br/> Finds classes that maintain two or more lists or arrays that appear to share a one-to-one relationship through a common index. It is usually better to create a separate class that holds all corresponding attributes, and add instances of this class to just one list or array.</li> - <li><b>Dubious List Collection</b><br/> + <li><b>[DLC] Dubious List Collection</b><br/> Finds fields that are implementations of java.util.List, but that are used in a set-like fashion. Since lookup type operations are performed using a linear search for Lists, the performance for large Lists will be poor. Consideration should be made as to whether these fields should be sets.</li> - <li><b>Partially Constructed Object Access</b><br/> + <li><b>[PCOA] Partially Constructed Object Access</b><br/> Finds constructors that call non-final methods in non-final classes. If this class is derived from, and the method is overridden, then that method will be executing on an object that hasn't been constructed in regards to the subclass implementation. These methods should probably be defined as final.</li> - <li><b>Literal String Comparison</b><br/> + <li><b>[LSC] Literal String Comparison</b><br/> Finds methods that call the equals or compareTo methods on a String variable passing in a String literal. A NullPointerException may occur if the string variable is null. If instead the method was called on the string literal, and the variable was passed as an argument, this exception could never happen</li> @@ -217,21 +217,21 @@ Detectors added in v1.0.0<br/> <div id="v1_0_0" style="display:none;"> <ul> - <li><b>Overly Concrete Parameters</b><br/> + <li><b>[OCP] Overly Concrete Parameters</b><br/> Finds parameters to methods that are defined as concrete classes, when they're usage pattern can be defined by an implemented interface. By switching to the interface, you can reduce coupling, which helps making the code more testable and changeable.</li> - <li><b>List Indexed Iterating</b><br/> + <li><b>[LII] List Indexed Iterating</b><br/> Looks for uses of using loop indexed variables to 'iterate' over a List by calling get(i) each time thru the loop. Depending on the List implementation, using Iterators can be significantly faster. Using Iterators also makes it easier to substitute other collection types.</li> - <li><b>Unrelated Collection Contents</b><br/> + <li><b>[UCC] Unrelated Collection Contents</b><br/> Looks for collections that hold objects that are unrelated by class or interface inheritance, other than java.lang.Object. Doing so, leads to brittle code, either by 'encoding' type knowledge in the position of an element, or using instanceof tests. It is usually better to create a separate class, add the individual types as members to it, and add an instance of this class to the collection.</li> - <li><b>Declared Runtime Exception</b><br/> + <li><b>[DRE] Declared Runtime Exception</b><br/> Finds methods that declare RuntimeExceptions in their throws clause. While not illegal, this may indicate a misunderstanding as to how unchecked exceptions are handled. If is felt that a RuntimeException is so prevalent that it should be declared, it @@ -244,14 +244,14 @@ Detectors added in v0.9.3 <div id="v0_9_3" style="display:none;"> <ul> - <li><b>Inefficient String Buffering</b><br/> + <li><b>[ISB] Inefficient String Buffering</b><br/> Finds Concatenation inside of a StringBuffer.append call, which creates temporary StringBuffers.</li> - <li><b>Synchronized Collection Iterators</b><br/> + <li><b>[SCI] Synchronized Collection Iterators</b><br/> Finds use of iterators on collections built from Collection.synchronizedXXX() calls. As iterators are by default not multithread safe, there use with a synchronized collections seems dubious.</li> - <li><b>Cyclomatic Complexity</b><br/> + <li><b>[CC] Cyclomatic Complexity</b><br/> Finds methods that are overly complex based on the McCabe algorithm for counting number of unique branches in the method</li> </ul> |