PMD report

Problems found

#FileLineProblem
1 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/AntLogHandler.java 23 Private field 'antTask' could be made final; it is only initialized in the declaration or constructor.
2 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/Applier.java 4 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
3 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/Benchmark.java 195 Private field 'time' could be made final; it is only initialized in the declaration or constructor.
4 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/Benchmark.java 196 Private field 'count' could be made final; it is only initialized in the declaration or constructor.
5 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/Benchmark.java 237 Use block level rather than method level synchronization
6 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/Benchmark.java 239 Avoid if (x != y) ..; else ..;
7 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/Benchmark.java 290 Switch statements should have a default label
8 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/ClassUtil.java 11 A class which only has private constructors should be final
9 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/ClasspathClassLoader.java 1 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
10 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/CollectionUtil.java 14 A class which only has private constructors should be final
11 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/CollectionUtil.java 172 Use equals() to compare object references.
12 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/NumericConstants.java 3 An Interface should be used only to model a behaviour; consider converting this to a class.
13 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/ResourceLoader.java 14 A class which only has private constructors should be final
14 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/StringUtil.java 4 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
15 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/StringUtil.java 81 Avoid if (x != y) ..; else ..;
16 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/StringUtil.java 292 Avoid reassigning parameters such as 's1'
17 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/StringUtil.java 292 Avoid reassigning parameters such as 's1'
18 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/StringUtil.java 292 Avoid reassigning parameters such as 's2'
19 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/StringUtil.java 292 Avoid reassigning parameters such as 's2'
20 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/StringUtil.java 293 Use equals() to compare object references.
21 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/TypeMap.java 30 Overridable method 'add' called during object construction
22 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/TypeMap.java 30 Overridable method 'add' called during object construction
23 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/XPathTest.java 1 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
24 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/CreateXMLRulePanel.java 23 Private field 'rulenameField' could be made final; it is only initialized in the declaration or constructor.
25 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/CreateXMLRulePanel.java 24 Private field 'rulemsgField' could be made final; it is only initialized in the declaration or constructor.
26 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/CreateXMLRulePanel.java 25 Private field 'ruledescField' could be made final; it is only initialized in the declaration or constructor.
27 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/CreateXMLRulePanel.java 26 Private field 'ruleXMLArea' could be made final; it is only initialized in the declaration or constructor.
28 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/CreateXMLRulePanel.java 27 Private field 'xpathQueryArea' could be made final; it is only initialized in the declaration or constructor.
29 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/CreateXMLRulePanel.java 28 Private field 'codeEditorPane' could be made final; it is only initialized in the declaration or constructor.
30 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/DFAPanel.java 170 Switch statements should have a default label
31 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/DFAPanel.java 236 Private field 'node' could be made final; it is only initialized in the declaration or constructor.
32 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/DFAPanel.java 251 Private field 'dfaCanvas' could be made final; it is only initialized in the declaration or constructor.
33 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/DFAPanel.java 252 Private field 'nodeList' could be made final; it is only initialized in the declaration or constructor.
34 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/DFAPanel.java 253 Private field 'nodes' could be made final; it is only initialized in the declaration or constructor.
35 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 144 Private field 'item' could be made final; it is only initialized in the declaration or constructor.
36 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 218 Private field 'node' could be made final; it is only initialized in the declaration or constructor.
37 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 219 Private field 'parent' could be made final; it is only initialized in the declaration or constructor.
38 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 400 Avoid if (x != y) ..; else ..;
39 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 620 Private field 'exitOnClose' could be made final; it is only initialized in the declaration or constructor.
40 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 623 Private field 'xpathResults' could be made final; it is only initialized in the declaration or constructor.
41 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 665 Caught exception is rethrown, original stack trace may be lost
42 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 668 Caught exception is rethrown, original stack trace may be lost
43 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 671 Caught exception is rethrown, original stack trace may be lost
44 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/Designer.java 896 Document empty method
45 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/designer/MyPrintStream.java 7 Private field 'buf' could be made final; it is only initialized in the declaration or constructor.
46 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/filter/AbstractDelegateFilter.java 13 Document empty constructor
47 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/filter/DirectoryFilter.java 8 A class which only has private constructors should be final
48 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/filter/FileExtensionFilter.java 34 When doing a String.toLowerCase()/toUpperCase() call, use a Locale
49 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/filter/Filters.java 1 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
50 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/filter/Filters.java 151 Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty()
51 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/filter/RegexStringFilter.java 14 Document empty constructor
52 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/Viewer.java 1 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
53 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/ASTPanel.java 34 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
54 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/ASTPanel.java 71 Switch statements should have a default label
55 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/ActionCommands.java 10 An Interface should be used only to model a behaviour; consider converting this to a class.
56 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/EvaluationResultsPanel.java 25 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
57 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/EvaluationResultsPanel.java 62 Switch statements should have a default label
58 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/ParseExceptionHandler.java 21 Private field 'exc' could be made final; it is only initialized in the declaration or constructor.
59 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/SourceCodePanel.java 31 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
60 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/SourceCodePanel.java 81 Caught exception is rethrown, original stack trace may be lost
61 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/XPathPanel.java 21 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
62 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/XPathPanel.java 52 Switch statements should have a default label
63 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/ASTNodePopupMenu.java 15 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
64 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/ASTNodePopupMenu.java 16 Private field 'node' could be made final; it is only initialized in the declaration or constructor.
65 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/AttributesSubMenu.java 23 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
66 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/AttributesSubMenu.java 24 Private field 'node' could be made final; it is only initialized in the declaration or constructor.
67 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/SimpleNodeSubMenu.java 20 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
68 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/SimpleNodeSubMenu.java 21 Private field 'node' could be made final; it is only initialized in the declaration or constructor.
69 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/XPathFragmentAddingItem.java 19 Private field 'model' could be made final; it is only initialized in the declaration or constructor.
70 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/gui/menu/XPathFragmentAddingItem.java 20 Private field 'fragment' could be made final; it is only initialized in the declaration or constructor.
71 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/model/ASTModel.java 24 Private field 'root' could be made final; it is only initialized in the declaration or constructor.
72 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/model/ASTModel.java 25 Private field 'listeners' could be made final; it is only initialized in the declaration or constructor.
73 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/model/AttributeToolkit.java 1 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
74 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/model/SimpleNodeTreeNodeAdapter.java 23 Private field 'node' could be made final; it is only initialized in the declaration or constructor.
75 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/model/SimpleNodeTreeNodeAdapter.java 25 Private field 'parent' could be made final; it is only initialized in the declaration or constructor.
76 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/model/ViewerModel.java 19 Private field 'listeners' could be made final; it is only initialized in the declaration or constructor.
77 /home/tom/pmd/pmd/src/net/sourceforge/pmd/util/viewer/util/NLS.java 1 All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.