incava.org

examples

The following is an example of the output from the documentation analyzer, the statistics generator, and the syntax analyzer.

input code

package com.foobar.Graphics;

import java.lang.String;
import java.util.*;


/**
 * An example program for the DoctorJ application suitte.
 *
 * @since 1.2.3
 * @author Carl Gustav
 * @author 
 * @throws NullPointerExceptions These are thrown throughout the code.
 * @see other classes in this project.
 */
public class Example extends Object {

    static final transient public int ZERO = 0;

    /**
     * The constructor.
     *
     * @return quits if the value is already set.
     */
    public Example() {
        super();
    }

    /**
     * <description>
     * 
     * @param
     * @author
     * @since
     * @version
     */
    public void skeletal() {
        int hashCode = super.hashCode();
        int a = -1;
        switch (hashCode) {
            case 0:
                a = 14;  
            case 1:
                a = 23;
                break;
        }
        if (a > 4);
            System.out.println("a is greater than 4");
    }    

    /**
     * A function in which there is confusion between types and names.
     * 
     * @param Object The first value.
     * @param String The second value.
     * @return int What is returned.
     */
    public int mixed(Object one, String str) {
        return 0;
    }    

    /**
     * A test function that takes 4 arguments and sums them.
     *
     * @param first The first value.
     * @param third The third value.
     * @param secodn The second value.
     * @param fourth The fourth value.
     * @returns the sum of the values.
     */
    public int sum(int first, int second, int third) throws Exception {
        return first + second + third;
    }

    /**
     * The main program.
     *
     * @author Robin Steele
     * @param argv The list of arguments.
     */
    public static void main(String[] args) {
    }

}

documentation check

In Example.java:

     8.  * An example program for the DoctorJ application suitte.
                                                          <---->
*** Word 'suitte' appears to be misspelled. Closest matches: suite, site [...]

    11.  * @author Carl Gustav
           <----->
*** Tag in improper order

    12.  * @author 
           <----->
*** @author without name text

    13.  * @throws NullPointerExceptions These are thrown throughout the code.
           <----->
*** Tag not valid for class

    18.     static final transient public int ZERO = 0;
                                              <-->
*** Undocumented public field

    21.      * The constructor.
               <-------------->
*** Summary sentence too short

    23.      * @return quits if the value is already set.
               <----->
*** Tag not valid for constructor

    30.      * <description>
               <----------->
*** Summary sentence does not end with period

    32.      * @param
               <---->
*** Parameters documented but no code parameters

    33.      * @author
               <----->
*** Tag in improper order

    34.      * @since
               <---->
*** @since without text

    35.      * @version
               <------>
*** Tag not valid for method

    54.      * @param Object The first value.
                      <---->
*** Parameter refers to type, not name

    55.      * @param String The second value.
                      <---->
*** Parameter refers to type, not name

    56.      * @return int What is returned.
                       <->
*** @return refers to method return type

    67.      * @param secodn The second value.
                      <---->
*** Parameter misspelled

    68.      * @param fourth The fourth value.
                      <---->
*** Parameter not in code

    69.      * @returns the sum of the values.
               <------>
*** Tag in improper order

    71.     public int sum(int first, int second, int third) throws Exception {
                                                                    <------->
*** Exception not documented

    76.      * The main program.
               <--------------->
*** Summary sentence too short

    78.      * @author Robin Steele
               <----->
*** Tag not valid for method

    79.      * @param argv The list of arguments.
                      <-->
*** Parameter misspelled

Valid HTML 4.01!

Valid CSS!