The following document contains the results of FindBugs Report
FindBugs Version is 1.1.1
Threshold is Low
Effort is Default
| Classes | Bugs | Errors | Missing Classes |
|---|---|---|---|
| 424 | 63 | 58 | 55 |
| Bug | Category | Details | Line |
|---|---|---|---|
| org.microemu.app.Swt.devicePanel should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | Not available |
| org.microemu.app.Swt.shell should be package protected | MALICIOUS_CODE | MS_PKGPROTECT | Not available |
| Write to static field org.microemu.app.Swt.devicePanel from instance method org.microemu.app.Swt.initInterface(org.eclipse.swt.widgets.Shell) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 339 |
| Useless control flow in org.microemu.app.Swt.setDevice(org.microemu.app.util.DeviceEntry) | STYLE | UCF_USELESS_CONTROL_FLOW | 350 |
| Unread field: org.microemu.app.Swt.deviceEntry | PERFORMANCE | URF_UNREAD_FIELD | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| The class org.microemu.app.Swt$1 could be refactored into a named _static_ inner class | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC_ANON | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| The class org.microemu.app.Swt$3 could be refactored into a named _static_ inner class | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC_ANON | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| org.microemu.app.Swt$4.handleEvent(org.eclipse.swt.widgets.Event) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 155 |
| The class org.microemu.app.Swt$4 could be refactored into a named _static_ inner class | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC_ANON | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Write to static field org.microemu.app.ui.swt.SwtDeviceComponent.instance from instance method org.microemu.app.ui.swt.SwtDeviceComponent.SwtDeviceComponent(org.eclipse.swt.widgets.Composite) | STYLE | ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD | 326 |
| Useless control flow in org.microemu.app.ui.swt.SwtDeviceComponent.drawImageInShape(SwtGraphics,org.eclipse.swt.graphics.Image,org.microemu.device.impl.Shape) | STYLE | UCF_USELESS_CONTROL_FLOW | 456 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Should org.microemu.app.ui.swt.SwtDeviceComponent$CreateColorRunnable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Should org.microemu.app.ui.swt.SwtDeviceComponent$CreateImageRunnable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Should org.microemu.app.ui.swt.SwtDeviceComponent$GetFontMetricsRunnable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Should org.microemu.app.ui.swt.SwtDeviceComponent$GetFontRunnable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | Not available |
| Unwritten field: org.microemu.app.ui.swt.SwtDeviceComponent$GetFontRunnable.antialiasing | CORRECTNESS | UWF_UNWRITTEN_FIELD | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Should org.microemu.app.ui.swt.SwtDeviceComponent$StringWidthRunnable be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Unread field: org.microemu.app.ui.swt.SwtDialog.contents | PERFORMANCE | URF_UNREAD_FIELD | Not available |
| Field not initialized in constructor: org.microemu.app.ui.swt.SwtDialog.shell | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Confusing to have methods org.microemu.app.ui.swt.SwtGraphics.setFont(org.eclipse.swt.graphics.Font) and org.microemu.device.swt.SwtDisplayGraphics.setFont(javax.microedition.lcdui.Font) | BAD_PRACTICE | NM_CONFUSING | 114-115 |
| Bug | Category | Details | Line |
|---|---|---|---|
| org.microemu.app.ui.swt.SwtMessageDialog.SwtMessageDialog(org.eclipse.swt.widgets.Shell,String,String,int,String[],int) may expose internal representation by storing an externally mutable object into org.microemu.app.ui.swt.SwtMessageDialog.buttonLabels | MALICIOUS_CODE | EI_EXPOSE_REP2 | 53 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Method org.microemu.app.ui.swt.SwtSelectDeviceDialog$1.handleEvent(org.eclipse.swt.widgets.Event) invokes dubious String.toUpperCase() or String.toLowerCase; use the Locale parameterized version instead | I18N | DM_CONVERT_CASE | 103 |
| Method org.microemu.app.ui.swt.SwtSelectDeviceDialog$1.handleEvent(org.eclipse.swt.widgets.Event) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 158 |
| Bug | Category | Details | Line |
|---|---|---|---|
| The field name org.microemu.device.swt.BWImageFilter.Yb doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.BWImageFilter.Yg doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.BWImageFilter.Yr doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| The field name org.microemu.device.swt.GrayImageFilter.Rb doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.GrayImageFilter.Rg doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.GrayImageFilter.Rr doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.GrayImageFilter.Yb doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.GrayImageFilter.Yg doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.GrayImageFilter.Yr doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| The field name org.microemu.device.swt.RGBImageFilter.Rb doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.RGBImageFilter.Rg doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| The field name org.microemu.device.swt.RGBImageFilter.Rr doesn't start with an lower case letter | BAD_PRACTICE | NM_FIELD_NAMING_CONVENTION | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| org.microemu.device.swt.SwtButton.SwtButton(String,org.microemu.device.impl.Shape,int,String,java.util.Hashtable) may expose internal representation by storing an externally mutable object into org.microemu.device.swt.SwtButton.inputToChars | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Dead store to filter in method org.microemu.device.swt.SwtDeviceDisplay.createRGBImage(int[],int,int,boolean) | STYLE | DLS_DEAD_LOCAL_STORE | 510 |
| Usage of GetResource in org.microemu.device.swt.SwtDeviceDisplay.getImage(String) may be unsafe if class is extended | BAD_PRACTICE | UI_INHERITANCE_UNSAFE_GETRESOURCE | 430 |
| Field not initialized in constructor: org.microemu.device.swt.SwtDeviceDisplay.backgroundColor | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Field not initialized in constructor: org.microemu.device.swt.SwtDeviceDisplay.displayPaintable | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Field not initialized in constructor: org.microemu.device.swt.SwtDeviceDisplay.displayRectangle | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Field not initialized in constructor: org.microemu.device.swt.SwtDeviceDisplay.foregroundColor | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Field not initialized in constructor: org.microemu.device.swt.SwtDeviceDisplay.mode123Image | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Field not initialized in constructor: org.microemu.device.swt.SwtDeviceDisplay.modeAbcLowerImage | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Field not initialized in constructor: org.microemu.device.swt.SwtDeviceDisplay.modeAbcUpperImage | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Bug | Category | Details | Line |
|---|---|---|---|
| Incompatible bit masks yield a constant result in org.microemu.device.swt.SwtFontManager.getFont(javax.microedition.lcdui.Font) | CORRECTNESS | BIT_AND_ZZ | 68 |
| Method org.microemu.device.swt.SwtFontManager.setFont(String,String,String,org.microemu.device.impl.Font) invokes dubious String.toUpperCase() or String.toLowerCase; use the Locale parameterized version instead | I18N | DM_CONVERT_CASE | 146 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Method org.microemu.device.swt.SwtInputMethod.keyPressed(org.eclipse.swt.events.KeyEvent) allocates a boxed primitive just to call toString | PERFORMANCE | DM_BOXED_PRIMITIVE_TOSTRING | 336 |
| Using notify rather than notifyAll in org.microemu.device.swt.SwtInputMethod.mousePressed(org.eclipse.swt.events.KeyEvent) | MT_CORRECTNESS | NO_NOTIFY_NOT_NOTIFYALL | 418 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Inconsistent synchronization of org.microemu.device.swt.SwtSoftButton.command; locked % of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 137 |
| org.microemu.device.swt.SwtSoftButton.LEFT isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 40 |
| org.microemu.device.swt.SwtSoftButton.RIGHT isn't final but should be | MALICIOUS_CODE | MS_SHOULD_BE_FINAL | 41 |
| Method org.microemu.device.swt.SwtSoftButton.SwtSoftButton(String,org.microemu.device.impl.Shape,int,String,org.microemu.device.impl.Rectangle,String,java.util.Vector,javax.microedition.lcdui.Font) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught | STYLE | REC_CATCH_EXCEPTION | 86 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Method org.microemu.device.swt.SwtSystemFont.SwtSystemFont(String,String,int,boolean) invokes dubious String.toUpperCase() or String.toLowerCase; use the Locale parameterized version instead | I18N | DM_CONVERT_CASE | 42 |
| Inconsistent synchronization of org.microemu.device.swt.SwtSystemFont.initialized; locked % of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 52 |
| Useless control flow in org.microemu.device.swt.SwtSystemFont.checkInitialized() | STYLE | UCF_USELESS_CONTROL_FLOW | 74 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Dead store to swtStyle in method org.microemu.device.swt.SwtTrueTypeFont.checkInitialized() | STYLE | DLS_DEAD_LOCAL_STORE | 73 |
| Method org.microemu.device.swt.SwtTrueTypeFont.SwtTrueTypeFont(java.net.URL,String,int,boolean) invokes dubious String.toUpperCase() or String.toLowerCase; use the Locale parameterized version instead | I18N | DM_CONVERT_CASE | 43 |
| Inconsistent synchronization of org.microemu.device.swt.SwtTrueTypeFont.initialized; locked % of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 53 |
| Useless control flow in org.microemu.device.swt.SwtTrueTypeFont.checkInitialized() | STYLE | UCF_USELESS_CONTROL_FLOW | 75 |
| Unread field: org.microemu.device.swt.SwtTrueTypeFont.size | PERFORMANCE | URF_UNREAD_FIELD | Not available |
| Unread field: org.microemu.device.swt.SwtTrueTypeFont.url | PERFORMANCE | URF_UNREAD_FIELD | Not available |
| Unwritten field: org.microemu.device.swt.SwtTrueTypeFont.font | CORRECTNESS | UWF_UNWRITTEN_FIELD | Not available |