PMD Results

The following document contains the results of PMD 4.2.2.

Files

com/melloware/jukes/db/audit/AuditInterceptor.java

ViolationLine
Return an empty array rather than null.93 - 95

com/melloware/jukes/db/Database.java

ViolationLine
Singleton is not thread safe217 - 229

com/melloware/jukes/db/HibernateUtil.java

ViolationLine
The String literal "unchecked" appears 5 times in this file; the first occurrence is on line 6161

com/melloware/jukes/file/Playlist.java

ViolationLine
The String literal " - " appears 4 times in this file; the first occurrence is on line 604604

com/melloware/jukes/file/tag/AudioFileTag.java

ViolationLine
Caught exception is rethrown, original stack trace may be lost51 - 52
Caught exception is rethrown, original stack trace may be lost55 - 56
The String literal "FieldDataInvalidException" appears 7 times in this file; the first occurrence is on line 258258
Caught exception is rethrown, original stack trace may be lost434

com/melloware/jukes/file/tag/Mp3Tag.java

ViolationLine
Caught exception is rethrown, original stack trace may be lost80 - 81
Caught exception is rethrown, original stack trace may be lost84 - 85
Caught exception is rethrown, original stack trace may be lost88 - 89

com/melloware/jukes/gui/Jukes.java

ViolationLine
Use block level rather than method level synchronization284 - 293
Use block level rather than method level synchronization299 - 319
Non-static initializers are confusing398 - 401

com/melloware/jukes/gui/tool/logging/AwtLogHandler.java

ViolationLine
Avoid unnecessary comparisons in boolean expressions61
These nested if statements could be combined75 - 77

com/melloware/jukes/gui/view/component/PlaylistCellRenderer.java

ViolationLine
StringBuffer.append is called 2 consecutive times with literal Strings. Use a single append with a single String.61
StringBuffer.append is called 2 consecutive times with literal Strings. Use a single append with a single String.61

com/melloware/jukes/gui/view/dialogs/DifferenceToolDialog.java

ViolationLine
Perhaps 'panel' could be replaced by a local variable.87
Perhaps 'settings' could be replaced by a local variable.91
When doing a String.toLowerCase()/toUpperCase() call, use a Locale416
Caught exception is rethrown, original stack trace may be lost500
Caught exception is rethrown, original stack trace may be lost504
Caught exception is rethrown, original stack trace may be lost508
When doing a String.toLowerCase()/toUpperCase() call, use a Locale563

com/melloware/jukes/gui/view/dialogs/DiscAddDialog.java

ViolationLine
Perhaps 'buttonCancel' could be replaced by a local variable.83
Perhaps 'buttonSave' could be replaced by a local variable.84
Perhaps 'buttonBar' could be replaced by a local variable.86

com/melloware/jukes/gui/view/dialogs/DiscFindDialog.java

ViolationLine
Possible unsafe assignment to a non-final static field in a constructor.88

com/melloware/jukes/gui/view/dialogs/DiscRemoveDialog.java

ViolationLine
Perhaps 'panel' could be replaced by a local variable.63

com/melloware/jukes/gui/view/dialogs/LocationChangeDialog.java

ViolationLine
Perhaps 'buttonApply' could be replaced by a local variable.50
Perhaps 'buttonClose' could be replaced by a local variable.51
Perhaps 'settings' could be replaced by a local variable.55
Ensure that resources like this Connection object are closed after use89

com/melloware/jukes/gui/view/dialogs/SearchDialog.java

ViolationLine
Perhaps 'buttonBar' could be replaced by a local variable.81
Perhaps 'settings' could be replaced by a local variable.87
Caught exception is rethrown, original stack trace may be lost445

com/melloware/jukes/gui/view/dialogs/WebSearchDialog.java

ViolationLine
Perhaps 'buttonBar' could be replaced by a local variable.80
Perhaps 'list' could be replaced by a local variable.82
Caught exception is rethrown, original stack trace may be lost485

com/melloware/jukes/gui/view/editor/ArtistEditor.java

ViolationLine
Perhaps 'artistPanel' could be replaced by a local variable.69

com/melloware/jukes/gui/view/editor/DiscEditor.java

ViolationLine
Perhaps 'discPanel' could be replaced by a local variable.92
Perhaps 'trackList' could be replaced by a local variable.95
Perhaps 'tracks' could be replaced by a local variable.100

com/melloware/jukes/gui/view/editor/TrackEditor.java

ViolationLine
Perhaps 'trackPanel' could be replaced by a local variable.62

com/melloware/jukes/gui/view/FilterPanel.java

ViolationLine
Perhaps 'filterPanel' could be replaced by a local variable.63
Perhaps 'scrollPane' could be replaced by a local variable.64

com/melloware/jukes/gui/view/MainFrame.java

ViolationLine
A switch with less than 3 branches is inefficient, use a if statement instead.277 - 293

com/melloware/jukes/gui/view/MainPageBuilder.java

ViolationLine
Perhaps 'navigationPanel' could be replaced by a local variable.94
Use block level rather than method level synchronization495 - 497
Use block level rather than method level synchronization504 - 506

com/melloware/jukes/gui/view/PlaylistPanel.java

ViolationLine
Perhaps 'listScrollPane' could be replaced by a local variable.79
Perhaps 'listModel' could be replaced by a local variable.83

com/melloware/jukes/gui/view/preferences/LookAndFeelPanel.java

ViolationLine
Avoid empty catch blocks266 - 268
Use block level rather than method level synchronization319 - 325

com/melloware/jukes/gui/view/preferences/PreferencesDialog.java

ViolationLine
Perhaps 'lafPanel' could be replaced by a local variable.48

com/melloware/jukes/gui/view/preferences/PropertySheetSettings.java

ViolationLine
Perhaps 'settings' could be replaced by a local variable.27

com/melloware/jukes/gui/view/tasks/LoadPlaylistTask.java

ViolationLine
Perhaps 'file' could be replaced by a local variable.47

com/melloware/jukes/util/GuiUtil.java

ViolationLine
Unnecessary final modifier in final class42 - 53

com/melloware/jukes/util/TimeSpanUnit.java

ViolationLine
An Interface should be used only to model a behaviour; consider converting this to a class.123 - 139

com/melloware/jukes/ws/AmazonItem.java

ViolationLine
These nested if statements could be combined301 - 303