Java Inspection Checklist

Java Inspection checklist Java Inspection
  • Variable, Attribute, and Constant Declaration Defects (VC)

    ×

    How to do this task:
    Subtasks:
  • Are descriptive variable and constant names used in accord with naming conventions?

    ×

    How to do this task:
    Subtasks:
  • Are there variables or attributes with confusingly similar names?

    ×

    How to do this task:
    Subtasks:
  • Is every variable and attribute correctly typed?

    ×

    How to do this task:
    Subtasks:
  • Is every variable and attribute properly initialized?

    ×

    How to do this task:
    Subtasks:
  • Could any non-local variables be made local?

    ×

    How to do this task:
    Subtasks:
  • Are all for-loop control variables declared in the loop header?

    ×

    How to do this task:
    Subtasks:
  • Are there literal constants that should be named constants?

    ×

    How to do this task:
    Subtasks:
  • Are there variables or attributes that should be constants?

    ×

    How to do this task:
    Subtasks:
  • Are there attributes that should be local variables?

    ×

    How to do this task:
    Subtasks:
  • Do all attributes have appropriate access modifiers (private, protected, public)?

    ×

    How to do this task:
    Subtasks:
  • Are there static attributes that should be non-static or vice-versa?

    ×

    How to do this task:
    Subtasks:
  • Method Definition Defects (FD)

    ×

    How to do this task:
    Subtasks:
  • Are descriptive method names used in accord with naming conventions?

    ×

    How to do this task:
    Subtasks:
  • Is every method parameter value checked before being used?

    ×

    How to do this task:
    Subtasks:
  • For every method: Does it return the correct value at every method return point?

    ×

    How to do this task:
    Subtasks:
  • Do all methods have appropriate access modifiers (private, protected, public)? 

    ×

    How to do this task:
    Subtasks:
  • Are there static methods that should be non-static or vice-versa?

    ×

    How to do this task:
    Subtasks:
  • Class Definition Defects (CD)

    ×

    How to do this task:
    Subtasks:
  • Does each class have appropriate constructors and destructors?

    ×

    How to do this task:
    Subtasks:
  • Do any subclasses have common members that should be in the superclass?

    ×

    How to do this task:
    Subtasks:
  • Can the class inheritance hierarchy be simplified?

    ×

    How to do this task:
    Subtasks:
  • Data Reference Defects (DR)

    ×

    How to do this task:
    Subtasks:
  • For every array reference: Is each subscript value within the defined bounds?

    ×

    How to do this task:
    Subtasks:
  • For every object or array reference: Is the value certain to be non-null?

    ×

    How to do this task:
    Subtasks:
  • Are there any computations with mixed data types?

    ×

    How to do this task:
    Subtasks:
  • Computation/Numeric Defects (CN)

    ×

    How to do this task:
    Subtasks:
  • Is overflow or underflow possible during a computation?

    ×

    How to do this task:
    Subtasks:
  • For each expressions with more than one operator: Are the assumptions about order of evaluation and precedence correct?

    ×

    How to do this task:
    Subtasks:
  • Are parentheses used to avoid ambiguity?

    ×

    How to do this task:
    Subtasks:
  • Comparison/Relational Defects (CR)

    ×

    How to do this task:
    Subtasks:
  • For every boolean test: Is the correct condition checked?

    ×

    How to do this task:
    Subtasks:
  • Are the comparison operators correct?

    ×

    How to do this task:
    Subtasks:
  • Has each boolean expression been simplified by driving negations inward?

    ×

    How to do this task:
    Subtasks:
  • Is each boolean expression correct?

    ×

    How to do this task:
    Subtasks:
  • Are there improper and unnoticed side-effects of a comparison?

    ×

    How to do this task:
    Subtasks:
  • Has an "&" inadvertently been interchanged with a "&&" or a "|" for a "||"?

    ×

    How to do this task:
    Subtasks:
  • Control Flow Defects (CF)

    ×

    How to do this task:
    Subtasks:
  • For each loop: Is the best choice of looping constructs used?

    ×

    How to do this task:
    Subtasks:
  • Will all loops terminate?

    ×

    How to do this task:
    Subtasks:
  • When there are multiple exits from a loop, is each exit necessary and handled properly?

    ×

    How to do this task:
    Subtasks:
  • Does each switch statement have a default case?

    ×

    How to do this task:
    Subtasks:
  • Are missing switch case break statements correct and marked with a comment?

    ×

    How to do this task:
    Subtasks:
  • Do named break statements send control to the right place?

    ×

    How to do this task:
    Subtasks:
  • Is the nesting of loops and branches too deep, and is it correct?

    ×

    How to do this task:
    Subtasks:
  • Can any nested if statements be converted into a switch statement?

    ×

    How to do this task:
    Subtasks:
  • Are null bodied control structures correct and marked with braces or comments?

    ×

    How to do this task:
    Subtasks:
  • Are all exceptions handled appropriately?

    ×

    How to do this task:
    Subtasks:
  • Does every method terminate?

    ×

    How to do this task:
    Subtasks:
  • Input-Output Defects (IO)

    ×

    How to do this task:
    Subtasks:
  • Have all files been opened before use?

    ×

    How to do this task:
    Subtasks:
  • Are the attributes of the input object consistent with the use of the file?

    ×

    How to do this task:
    Subtasks:
  • Have all files been closed after use?

    ×

    How to do this task:
    Subtasks:
  • Are there spelling or grammatical errors in any text printed or displayed?

    ×

    How to do this task:
    Subtasks:
  • Are all I/O exceptions handled in a reasonable way?

    ×

    How to do this task:
    Subtasks:
  • Module Interface Defects (MI)

    ×

    How to do this task:
    Subtasks:
  • Are the number, order, types, and values of parameters in every method call in agreement with the called method's declaration?

    ×

    How to do this task:
    Subtasks:
  • Do the values in units agree (e.g., inches versus yards)? 

    ×

    How to do this task:
    Subtasks:
  • If an object or array is passed, does it get changed, and changed correctly by the called method?

    ×

    How to do this task:
    Subtasks:
  • Comment Defects (CM)

    ×

    How to do this task:
    Subtasks:
  • Does every method, class, and file have an appropriate header comment?

    ×

    How to do this task:
    Subtasks:
  • Does every attribute, variable, and constant declaration have a comment?

    ×

    How to do this task:
    Subtasks:
  • Is the underlying behavior of each method and class expressed in plain language?

    ×

    How to do this task:
    Subtasks:
  • Is the header comment for each method and class consistent with the behavior of the method or class?

    ×

    How to do this task:
    Subtasks:
  • Do the comments and code agree?

    ×

    How to do this task:
    Subtasks:
  • Do the comments help in understanding the code?

    ×

    How to do this task:
    Subtasks:
  • Are there enough comments in the code?

    ×

    How to do this task:
    Subtasks:
  • Are there too many comments in the code?

    ×

    How to do this task:
    Subtasks:
  • Layout and Packaging Defects (LP)

    ×

    How to do this task:
    Subtasks:
  • Is a standard indentation and layout format used consistently?

    ×

    How to do this task:
    Subtasks:
  • For each method: Is it no more than about 60 lines long?

    ×

    How to do this task:
    Subtasks:
  • For each compile module: Is no more than about 600 lines long? 

    ×

    How to do this task:
    Subtasks:
  • Modularity Defects (MO)

    ×

    How to do this task:
    Subtasks:
  • Is there a low level of coupling between modules (methods and classes)?

    ×

    How to do this task:
    Subtasks:
  • Is there a high level of cohesion within each module (methods or class)? 

    ×

    How to do this task:
    Subtasks:
  • Is there repetitive code that could be replaced by a call to a method that provides the behavior of the repetitive code?

    ×

    How to do this task:
    Subtasks:
  • Are the Java class libraries used where and when appropriate?

    ×

    How to do this task:
    Subtasks:
  • Storage Usage Defects (SU)

    ×

    How to do this task:
    Subtasks:
  • Are arrays large enough?

    ×

    How to do this task:
    Subtasks:
  • Are object and array references set to null once the object or array is no longer needed?

    ×

    How to do this task:
    Subtasks:
  • Performance Defects (PE)

    ×

    How to do this task:
    Subtasks:
  • Can better data structures or more efficient algorithms be used?

    ×

    How to do this task:
    Subtasks:
  • Are logical tests arranged such that the often successful and inexpensive tests precede the more expensive and less frequently successful tests?

    ×

    How to do this task:
    Subtasks:
  • Can the cost of recomputing a value be reduced by computing it once and storing the results?

    ×

    How to do this task:
    Subtasks:
  • Is every result that is computed and stored actually used?

    ×

    How to do this task:
    Subtasks:
  • Can a computation be moved outside a loop?

    ×

    How to do this task:
    Subtasks:
  • Are there tests within a loop that do not need to be done?

    ×

    How to do this task:
    Subtasks:
  • Can a short loop be unrolled?

    ×

    How to do this task:
    Subtasks:
  • Are there two loops operating on the same data that can be combined into one?

    ×

    How to do this task:
    Subtasks:
  • Are frequently used variables declared register?

    ×

    How to do this task:
    Subtasks:
  • Are short and commonly called methods declared inline?

    ×

    How to do this task:
    Subtasks:

489 copy saved

489 copies saved