Project Report: fawkez

Packagesummary org.jcoderz.guidelines.snippets

org.jcoderz.guidelines.snippets.IndentationSample

LineHitsNoteSource
1  /*
2   * $Id: IndentationSample.java 1011 2008-06-16 17:57:36Z amandel $
3   *
4   * Copyright 2006, The jCoderZ.org Project. All rights reserved.
5   *
6   * Redistribution and use in source and binary forms, with or without
7   * modification, are permitted provided that the following conditions are
8   * met:
9   *
10   *    * Redistributions of source code must retain the above copyright
11   *      notice, this list of conditions and the following disclaimer.
12   *    * Redistributions in binary form must reproduce the above
13   *      copyright notice, this list of conditions and the following
14   *      disclaimer in the documentation and/or other materials
15   *      provided with the distribution.
16   *    * Neither the name of the jCoderZ.org Project nor the names of
17   *      its contributors may be used to endorse or promote products
18   *      derived from this software without specific prior written
19   *      permission.
20   *
21   * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
22   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24   * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS
25   * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
28   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32   */
33  package org.jcoderz.guidelines.snippets;
34  
35  
36  import java.io.FileNotFoundException;
37  import java.io.Serializable;
38  
39  import java.util.EventObject;
40  
41  
42  /**
43   * An example class.
44   *
45   * @author Alexander Bretz
46   */
470 public class IndentationSample
48      implements Serializable
49  {
50      private static final long serialVersionUID = -8293451984149714868L;
51  
52      // BEGIN SNIPPET: SimpleImplementator.xml
530(1)(2)    class SimpleImplementator
54          extends Object
55          implements Serializable
56      // END SNIPPET
57      {
58         private static final long serialVersionUID = -829345198419714868L;
59         void doSomthing ()
60         {
61             // ...
620        }
63      }
64  
65  /*
66  // BEGIN SNIPPET: MultiImplementator1.xml
67  
68  class MultiImplementator extends SimpleImplementator implements Serializable,
69          Cloneable, Comparable, Runnable, EventListener, Observer
70  // END SNIPPET
71  
72  // BEGIN SNIPPET: MultiImplementator2.xml
73  class MultiImplementator2
74          extends SimpleImplementator
75          implements Serializable, Cloneable, Comparable, Runnable, EventListener
76                 Observer
77  // END SNIPPET
78  
79  // BEGIN SNIPPET: MultiImplementator3.xml
80  class MultiImplementator3
81          extends SimpleImplementator
82          implements Serializable,
83                     Cloneable,
84                     Comparable,
85                     Runnable,
86                     EventListener,
87                     Observer
88  // END SNIPPET
89  */
90  
91  // BEGIN SNIPPET: MethodParamsStandard.xml
92 (3)public void severalParameters (String one, int two, String three,
93          EventObject four, Integer five)
94  // END SNIPPET
95     {
96  /*
97  */
980    }
99  
100  // BEGIN SNIPPET: MethodParamsNewLine.xml
101 (4)public void severalParametersNewLine (
102          String one, int two, String three, EventObject four,
103          Integer five)
104  // END SNIPPET
105     {
106        // ...
1070    }
108  
109  // BEGIN SNIPPET: MethodParamsDeep.xml
110 (5)public void severalParametersDeep (
111          String one,
112          int two,
113          String three,
114          EventObject four,
115          Integer five)
116  // END SNIPPET
117      {
118          // ...
119  /*
120  // BEGIN SNIPPET: MethodCallDeep.xml
121  vector.add(lbPunktzahl,
122             new GridBagLayout(0, 1, 2, 1, 0.0, 0.0,
123                               GribBagConstraints.WEST,
124                               GribBagConstraints.NONE,
125                               new Insets(0, GribBagConstraints.WEST,
126                                          GribBagConstraints.WEST,
127                                          GribBagConstraints.WEST), 0, 0));
128  // END SNIPPET
129  */
1300    }
131  
132  // BEGIN SNIPPET: MethodThrowsStandard.xml
133 (6)public void methodThrows (int param) throws IllegalAccessException,
134          IllegalStateException, FileNotFoundException
135  // END SNIPPET
136      {
137          // ...
1380     }
139  
140  // BEGIN SNIPPET: MethodThrowsNewLine.xml
141 (7)public void methodThrowsNewLine (int param)
142             throws IllegalAccessException, IllegalStateException,
143                 FileNotFoundException
144  // END SNIPPET
145      {
146          // ...
1470     }
148  
149  // BEGIN SNIPPET: MethodThrowsDeep.xml
150 (8)public void methodThrowsDeep (int param)
151          throws IllegalAccessException,
152                  IllegalStateException,
153                  FileNotFoundException
154  // END SNIPPET
155      {
156         // ...
1570     }
158  }
159  

Findings in this File

w (1) 53 : 0 org.jcoderz.guidelines.snippets.IndentationSample$SimpleImplementator is serializable and an inner class
w (2) 53 : 0 Should org.jcoderz.guidelines.snippets.IndentationSample$SimpleImplementator be a _static_ inner class?
c (3) 92 : 1 Missing a Javadoc comment.
c (4) 101 : 1 Missing a Javadoc comment.
c (5) 110 : 1 Missing a Javadoc comment.
c (6) 133 : 1 Missing a Javadoc comment.
c (7) 141 : 1 Missing a Javadoc comment.
c (8) 150 : 1 Missing a Javadoc comment.