FindBugs Bug Detector Report

The following document contains the results of FindBugs Report

FindBugs Version is 1.2.1

Threshold is Low

Effort is Default

Summary

ClassesBugsErrorsMissing Classes
4857600

com.barteo.emulator.device.Device

BugCategoryDetailsLine
VERY confusing to have methods com.barteo.emulator.device.Device.init(EmulatorContext, String) and org.microemu.device.impl.DeviceImpl.init(EmulatorContext, String)CORRECTNESSNM_VERY_CONFUSING47-48
VERY confusing to have methods com.barteo.emulator.device.Device.init(EmulatorContext) and org.microemu.device.impl.DeviceImpl.init(EmulatorContext)CORRECTNESSNM_VERY_CONFUSING40-41

nanoxml.XMLElement

BugCategoryDetailsLine
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE1190
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE1247
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE1752
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE1619
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE1681
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE1463
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE1524
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE2407
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE699
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE835
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE767
Comparison of String parameter using == or != in nanoxml.XMLElement.getChild(String, String) BAD_PRACTICEES_COMPARING_PARAMETER_STRING_WITH_EQ1030
Switch statement found in nanoxml.XMLElement.scanWhitespace(StringBuffer) where one case falls through to the next caseSTYLESF_SWITCH_FALLTHROUGH2783-2786

org.microemu.app.Common

BugCategoryDetailsLine
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE780
org.microemu.app.Common.initParams(List, DeviceEntry, Class) invokes System.exit(...), which shuts down the entire virtual machineBAD_PRACTICEDM_EXIT741
org.microemu.app.Common.createExtensionsClassLoader(URL[]) creates a org.microemu.app.classloader.ExtensionsClassLoader classloader, which should be performed within a doPrivileged blockBAD_PRACTICEDP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED904
Redundant nullcheck of clConfig, which is known to be non-null in org.microemu.app.Common.initParams(List, DeviceEntry, Class)STYLERCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE767
Write to static field org.microemu.app.Common.instance from instance method org.microemu.app.Common.Common(EmulatorContext)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD126
Write to static field org.microemu.app.Common.launcher from instance method org.microemu.app.Common.Common(EmulatorContext)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD130
Write to static field org.microemu.app.Common.statusBarListener from instance method org.microemu.app.Common.setStatusBarListener(StatusBarListener)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD467
Write to static field org.microemu.app.Common.launcher from instance method org.microemu.app.Common.startLauncher(MIDletContext)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD455
Common.mIDletClassLoaderConfig not initialized in constructorSTYLEUWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTORNot available

org.microemu.app.Common$1

BugCategoryDetailsLine
org.microemu.app.Common$1.run() invokes System.exit(...), which shuts down the entire virtual machineBAD_PRACTICEDM_EXIT324
Method org.microemu.app.Common$1.1(Common, String, Common, String, boolean) creates a thread using the default empty run methodMT_CORRECTNESSDM_USELESS_THREAD256
Unconditional wait in org.microemu.app.Common$1.run()MT_CORRECTNESSUW_UNCOND_WAIT305

org.microemu.app.Common$2

BugCategoryDetailsLine
The class org.microemu.app.Common$2 could be refactored into a named _static_ inner classPERFORMANCESIC_INNER_SHOULD_BE_STATIC_ANON472-474

org.microemu.app.Config

BugCategoryDetailsLine
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE476
org.microemu.app.Config.loadConfigFile(String) may fail to close streamBAD_PRACTICEOS_OPEN_STREAM135
org.microemu.app.Config.loadConfigFile(String) ignores result of java.io.InputStream.read(byte[])BAD_PRACTICERR_NOT_CHECKED138
Method org.microemu.app.Config.loadConfigFile(String) concatenates strings using + in a loopPERFORMANCESBSC_USE_STRINGBUFFER_CONCATENATION139

org.microemu.app.classloader.ClassPreprocessor

BugCategoryDetailsLine
Should org.microemu.app.classloader.ClassPreprocessor.instrument(InputStream, InstrumentationConfig) return a zero length array rather than null?STYLEPZLA_PREFER_ZERO_LENGTH_ARRAYS52

org.microemu.app.classloader.MIDletClassLoader

BugCategoryDetailsLine
Dead store to maxClassSizeSize in org.microemu.app.classloader.MIDletClassLoader.findClass(String)STYLEDLS_DEAD_LOCAL_STORE380
org.microemu.app.classloader.MIDletClassLoader.enhanceCatchBlock isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL66
org.microemu.app.classloader.MIDletClassLoader.instrumentMIDletClasses isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL60
org.microemu.app.classloader.MIDletClassLoader.traceClassLoading isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL62
org.microemu.app.classloader.MIDletClassLoader.traceSystemClassLoading isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL64

org.microemu.app.classloader.MIDletClassLoader$2

BugCategoryDetailsLine
The class org.microemu.app.classloader.MIDletClassLoader$2 could be refactored into a named _static_ inner classPERFORMANCESIC_INNER_SHOULD_BE_STATIC_ANON286-287

org.microemu.app.util.DeviceEntry

BugCategoryDetailsLine
org.microemu.app.util.DeviceEntry defines equals(DeviceEntry) method and uses Object.equals(Object)BAD_PRACTICEEQ_SELF_USE_OBJECT139-146
org.microemu.app.util.DeviceEntry defines equals and uses Object.hashCode()BAD_PRACTICEHE_EQUALS_USE_HASHCODE139-146

org.microemu.app.util.FileRecordStoreManager

BugCategoryDetailsLine
Dead store to recordStoreImpl in org.microemu.app.util.FileRecordStoreManager.deleteRecordStore(String)STYLEDLS_DEAD_LOCAL_STORE144
org.microemu.app.util.FileRecordStoreManager.loadFromDiskSecure(File) may fail to close stream on exceptionBAD_PRACTICEOS_OPEN_STREAM_EXCEPTION_PATH253
org.microemu.app.util.FileRecordStoreManager.saveToDiskSecure(File, RecordStoreImpl) may fail to close stream on exceptionBAD_PRACTICEOS_OPEN_STREAM_EXCEPTION_PATH289
Should org.microemu.app.util.FileRecordStoreManager.listRecordStores() return a zero length array rather than null?STYLEPZLA_PREFER_ZERO_LENGTH_ARRAYS198

org.microemu.app.util.FileRecordStoreManager$1

BugCategoryDetailsLine
The class org.microemu.app.util.FileRecordStoreManager$1 could be refactored into a named _static_ inner classPERFORMANCESIC_INNER_SHOULD_BE_STATIC_ANON83-87

org.microemu.app.util.MIDletResourceLoader

BugCategoryDetailsLine
org.microemu.app.util.MIDletResourceLoader.classLoader isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINALNot available
org.microemu.app.util.MIDletResourceLoader.traceResourceLoading isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL51

org.microemu.app.util.MIDletSystemProperties

BugCategoryDetailsLine
org.microemu.app.util.MIDletSystemProperties.applyToJavaSystemProperties isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL55

org.microemu.app.util.MIDletThread

BugCategoryDetailsLine
Method org.microemu.app.util.MIDletThread.MIDletThread() creates a thread using the default empty run methodMT_CORRECTNESSDM_USELESS_THREAD62
org.microemu.app.util.MIDletThread.graceTerminationPeriod isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL45

org.microemu.app.util.MidletURLReference

BugCategoryDetailsLine
org.microemu.app.util.MidletURLReference defines equals and uses Object.hashCode()BAD_PRACTICEHE_EQUALS_USE_HASHCODE64-67

org.microemu.app.util.ResURLStreamHandler

BugCategoryDetailsLine
org.microemu.app.util.ResURLStreamHandler.ResURLStreamHandler(Hashtable) may expose internal representation by storing an externally mutable object into ResURLStreamHandler.entriesMALICIOUS_CODEEI_EXPOSE_REP241

org.microemu.cldc.datagram.Connection

BugCategoryDetailsLine
Connection.socket not initialized in constructorSTYLEUWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTORNot available

org.microemu.cldc.datagram.DatagramImpl

BugCategoryDetailsLine
org.microemu.cldc.datagram.DatagramImpl.readFully(byte[], int, int) ignores result of java.io.DataInputStream.read(byte[], int, int)BAD_PRACTICERR_NOT_CHECKED208

org.microemu.cldc.http.Connection

BugCategoryDetailsLine
org.microemu.cldc.http.Connection.allowNetworkConnection should be package protectedMALICIOUS_CODEMS_PKGPROTECT47
Confusing to have methods org.microemu.cldc.http.Connection.getURL() and org.microemu.app.util.MidletURLReference.getUrl()BAD_PRACTICENM_CONFUSING82-86

org.microemu.cldc.ssl.Connection$1

BugCategoryDetailsLine
Should org.microemu.cldc.ssl.Connection$1.getAcceptedIssuers() return a zero length array rather than null?STYLEPZLA_PREFER_ZERO_LENGTH_ARRAYS69
The class org.microemu.cldc.ssl.Connection$1 could be refactored into a named _static_ inner classPERFORMANCESIC_INNER_SHOULD_BE_STATIC_ANON69-76

org.microemu.device.impl.ButtonName

BugCategoryDetailsLine
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE97

org.microemu.device.impl.DeviceImpl

BugCategoryDetailsLine
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE582
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE642
Use of non-localized String.toUpperCase() or String.toLowerCaseI18NDM_CONVERT_CASE447
org.microemu.device.impl.DeviceImpl.parseBoolean(String) invokes inefficient new String(String) constructorPERFORMANCEDM_STRING_CTOR642
Private method org.microemu.device.impl.DeviceImpl.saveDevice(XMLElement) is never calledPERFORMANCEUPM_UNCALLED_PRIVATE_METHOD695-706

org.microemu.device.impl.InputMethodImpl

BugCategoryDetailsLine
Method org.microemu.device.impl.InputMethodImpl.filterConstraints(char[]) uses the same code for two switch clausesSTYLEDB_DUPLICATE_SWITCH_CLAUSES156
Inconsistent synchronization of org.microemu.device.impl.InputMethodImpl.lastButton; locked 66% of timeMT_CORRECTNESSIS2_INCONSISTENT_SYNC93
Inconsistent synchronization of org.microemu.device.impl.InputMethodImpl.resetKey; locked 50% of timeMT_CORRECTNESSIS2_INCONSISTENT_SYNC70
Naked notify in org.microemu.device.impl.InputMethodImpl.dispose()MT_CORRECTNESSNN_NAKED_NOTIFY61
Using notify rather than notifyAll in org.microemu.device.impl.InputMethodImpl.dispose()MT_CORRECTNESSNO_NOTIFY_NOT_NOTIFYALL61
org.microemu.device.impl.InputMethodImpl.InputMethodImpl() invokes java.lang.Thread.start()MT_CORRECTNESSSC_START_IN_CTOR54
Unconditional wait in org.microemu.device.impl.InputMethodImpl.run()MT_CORRECTNESSUW_UNCOND_WAIT72

org.microemu.device.impl.Polygon

BugCategoryDetailsLine
Dead store of null to xtemp in org.microemu.device.impl.Polygon.addPoint(int, int)STYLEDLS_DEAD_LOCAL_STORE_OF_NULL105
Dead store of null to ytemp in org.microemu.device.impl.Polygon.addPoint(int, int)STYLEDLS_DEAD_LOCAL_STORE_OF_NULL108

org.microemu.log.StdOutAppender

BugCategoryDetailsLine
org.microemu.log.StdOutAppender.enabled isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL37

org.microemu.microedition.io.ConnectorImpl

BugCategoryDetailsLine
org.microemu.microedition.io.ConnectorImpl.debugConnectionInvocations isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL57