Fork me on GitHub

FindBugs Bug Detector Report

The following document contains the results of FindBugs

FindBugs Version is 3.0.1

Threshold is medium

Effort is min

Summary

Classes Bugs Errors Missing Classes
22 41 0 0

org.miloss.fgsms.osagent.AgentThreadRunner

Bug Category Details Line Priority
new org.miloss.fgsms.osagent.AgentThreadRunner(String[]) may expose internal representation by storing an externally mutable object into AgentThreadRunner.args MALICIOUS_CODE EI_EXPOSE_REP2 37 Medium

org.miloss.fgsms.osagent.Df

Bug Category Details Line Priority
The method name org.miloss.fgsms.osagent.Df.DriveInfo() doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 59-134 Medium
The method name org.miloss.fgsms.osagent.Df.GetDriveInfo(String) doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 139-160 Medium
usage is null guaranteed to be dereferenced in org.miloss.fgsms.osagent.Df.DriveInfo() on exception path CORRECTNESS NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH 108 Medium

org.miloss.fgsms.osagent.Ifconfig

Bug Category Details Line Priority
The method name org.miloss.fgsms.osagent.Ifconfig.NetworkSendRate(String) doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 78-90 Medium

org.miloss.fgsms.osagent.Ifconfig$NetworkRate

Bug Category Details Line Priority
Should org.miloss.fgsms.osagent.Ifconfig$NetworkRate be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 65 Medium

org.miloss.fgsms.osagent.Iostat

Bug Category Details Line Priority
org.miloss.fgsms.osagent.Iostat.GetBytesPerSecond(String, boolean) uses the same code for two branches STYLE DB_DUPLICATE_BRANCHES 50 Medium
Dead store to mounts in org.miloss.fgsms.osagent.Iostat.GetBytesPerSecond(String, boolean) STYLE DLS_DEAD_LOCAL_STORE 46 Medium
The method name org.miloss.fgsms.osagent.Iostat.GetBytesPerSecond(String, boolean) doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 45-66 Medium

org.miloss.fgsms.osagent.Iostat$DiskRates

Bug Category Details Line Priority
Should org.miloss.fgsms.osagent.Iostat$DiskRates be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 37 Medium

org.miloss.fgsms.osagent.MemWatch

Bug Category Details Line Priority
The method name org.miloss.fgsms.osagent.MemWatch.MemoryBytesUsed() doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 33-37 Medium

org.miloss.fgsms.osagent.NetInfo

Bug Category Details Line Priority
The method name org.miloss.fgsms.osagent.NetInfo.GetNetworkInfo() doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 40-68 Medium

org.miloss.fgsms.osagent.OSAgent

Bug Category Details Line Priority
Dead store to pr in org.miloss.fgsms.osagent.OSAgent.doRestartComputer() STYLE DLS_DEAD_LOCAL_STORE 1246 Medium
Possible null pointer dereference of OSAgent.sensors in org.miloss.fgsms.osagent.OSAgent.stopAllSensors() CORRECTNESS NP_NULL_ON_SOME_PATH 1511 High
Null passed for non-null parameter of String.replace(CharSequence, CharSequence) in org.miloss.fgsms.osagent.OSAgent.DoRestartProcess(ProcessPolicy) CORRECTNESS NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS 1257 Medium
Exception is caught when Exception is not thrown in org.miloss.fgsms.osagent.OSAgent.getMachineInfo(MachinePolicy) STYLE REC_CATCH_EXCEPTION 740 Medium
Exception is caught when Exception is not thrown in org.miloss.fgsms.osagent.OSAgent.startup(String[]) STYLE REC_CATCH_EXCEPTION 413 Medium
Return value of org.miloss.fgsms.services.interfaces.policyconfiguration.MachineInformation.getHostname() ignored, but method has no side effect STYLE RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT 281 Medium

org.miloss.fgsms.osagent.ProcFileInfo

Bug Category Details Line Priority
The method name org.miloss.fgsms.osagent.ProcFileInfo.GetOpenFileCount(String) doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 40-53 Medium

org.miloss.fgsms.osagent.ProcInfo

Bug Category Details Line Priority
Dead store to ppd in org.miloss.fgsms.osagent.ProcInfo.GetData(String, String) STYLE DLS_DEAD_LOCAL_STORE 55 High
Dead store to config in org.miloss.fgsms.osagent.ProcInfo.getDataWindows(String, String, boolean) STYLE DLS_DEAD_LOCAL_STORE 94 Medium
Dead store to path in org.miloss.fgsms.osagent.ProcInfo.getDataWindows(String, String, boolean) STYLE DLS_DEAD_LOCAL_STORE 96 Medium
Dead store to status in org.miloss.fgsms.osagent.ProcInfo.getDataWindows(String, String, boolean) STYLE DLS_DEAD_LOCAL_STORE 99 Medium
Dead store to statusstr in org.miloss.fgsms.osagent.ProcInfo.getDataWindows(String, String, boolean) STYLE DLS_DEAD_LOCAL_STORE 97 Medium
Dead store to x in org.miloss.fgsms.osagent.ProcInfo.getDataWindows(String, String, boolean) STYLE DLS_DEAD_LOCAL_STORE 98 Medium
Dead store to exe in org.miloss.fgsms.osagent.ProcInfo.restartWindowsService(String) STYLE DLS_DEAD_LOCAL_STORE 117 Medium
The method name org.miloss.fgsms.osagent.ProcInfo.GetData(String, String) doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 53-74 Medium

org.miloss.fgsms.osagent.Ps

Bug Category Details Line Priority
Primitive value is boxed then unboxed to perform primitive coercion in org.miloss.fgsms.osagent.Ps.GetProcessData(List) PERFORMANCE BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION 307 Medium
The method name org.miloss.fgsms.osagent.Ps.CurrentThreadCount() doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 207 Medium
The method name org.miloss.fgsms.osagent.Ps.GetCPUCores() doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 322-337 Medium
The method name org.miloss.fgsms.osagent.Ps.GetCurrentCPUUsage() doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 169-170 Medium
The method name org.miloss.fgsms.osagent.Ps.GetSystemBootTimeInMS() doesn't start with a lower case letter BAD_PRACTICE NM_METHOD_NAMING_CONVENTION 158-163 Medium
Exception is caught when Exception is not thrown in org.miloss.fgsms.osagent.Ps.GetProcessData(List) STYLE REC_CATCH_EXCEPTION 241 Medium

org.miloss.fgsms.osagent.callbacks.AdminCommand

Bug Category Details Line Priority
new org.miloss.fgsms.osagent.callbacks.AdminCommand(RemoteAgentCallbackImpl) invokes inefficient new String() constructor PERFORMANCE DM_STRING_VOID_CTOR 31 Medium
Unread field: org.miloss.fgsms.osagent.callbacks.AdminCommand.authcode PERFORMANCE URF_UNREAD_FIELD 106 Medium
Unread field: org.miloss.fgsms.osagent.callbacks.AdminCommand.completedat PERFORMANCE URF_UNREAD_FIELD 36 Medium
Unread field: org.miloss.fgsms.osagent.callbacks.AdminCommand.enqueuedat PERFORMANCE URF_UNREAD_FIELD 35 Medium

org.miloss.fgsms.osagent.callbacks.RemoteAgentCallbackImpl

Bug Category Details Line Priority
Primitive value is boxed and then immediately unboxed in org.miloss.fgsms.osagent.callbacks.RemoteAgentCallbackImpl.getOperatingStatus(GetOperatingStatusRequestMessage) PERFORMANCE BX_BOXING_IMMEDIATELY_UNBOXED 223 Medium
Found reliance on default encoding in org.miloss.fgsms.osagent.callbacks.RemoteAgentCallbackImpl.run(): new String(byte[], int, int) I18N DM_DEFAULT_ENCODING 156 High
org.miloss.fgsms.osagent.callbacks.RemoteAgentCallbackImpl.getOperatingStatus(GetOperatingStatusRequestMessage) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead PERFORMANCE DM_NUMBER_CTOR 223 Medium
Exception is caught when Exception is not thrown in org.miloss.fgsms.osagent.callbacks.RemoteAgentCallbackImpl.run() STYLE REC_CATCH_EXCEPTION 165 Medium