FindBugs Report

Project Information

Project: <<unnamed project>>

FindBugs version: 1.3.5

Code analyzed:



Metrics

137697 lines of code analyzed, in 1695 classes, in 208 packages.

Metric Total Density*
High Priority Warnings 26 0.19
Medium Priority Warnings 140 1.02
Total Warnings 166 1.21

(* Defects per Thousand lines of non-commenting source statements)



Contents

Summary

Warning Type Number
Bad practice Warnings 8
Correctness Warnings 14
Malicious code vulnerability Warnings 20
Performance Warnings 101
Dodgy Warnings 23
Total 166

Warnings

Click on a warning row to see full context information.

Bad practice Warnings

Code Warning
DE com.plumtree.portalpages.admin.httpmemorydebugging.HTTPMemoryDebugModel.ClearMemoryAndCaches() might ignore java.lang.Exception
DE com.plumtree.portalpages.admin.ptutilities.objectlockmanager.ObjectLockManagerView.Display() might ignore java.lang.Exception
DE com.plumtree.portalpages.browsing.editors.community.HeaderAndFooterSelectorView.CreateSingleSelectObjectTable(String, boolean, String, String, String, int, boolean) might ignore java.lang.Exception
DE com.plumtree.portalpages.browsing.gateway.GatewayControl.CheckActionSecurityAndExecute(XPHashtable) might ignore java.lang.Exception
DE com.plumtree.portalpages.common.mediator.CListURLTemplateMediator.GetImageSource() might ignore java.lang.Exception
HE com.plumtree.portalpages.browsing.editors.objectdelivery.common.ODDependency defines equals and uses Object.hashCode()
HE com.plumtree.portalpages.common.plugnav.NavCategoryType defines equals and uses Object.hashCode()
HE com.plumtree.portalpages.common.plugnav.NavPageType defines equals and uses Object.hashCode()

Correctness Warnings

Code Warning
DMI Invocation of toString on data in com.plumtree.portalpages.admin.editors.crawler.CrawlerModel.GetDataSourceIDFromQS(XPHashtable)
DMI Invocation of toString on data in com.plumtree.portalpages.admin.editors.xui.XUIHelperModel.SaveSection(XPHashtable)
DMI Invocation of toString on data in com.plumtree.portalpages.admin.ptutilities.migrationutility.MigrationLoadPackageModel.LoadPackage(XPHashtable)
DMI Invocation of toString on sValues in com.plumtree.portalpages.browsing.portalsettings.password.ExpiredPasswordControl.GetArgument(String, XPHashtable)
DMI Invocation of toString on prefNames in com.plumtree.portalpages.portlets.intrinsicpageletparamprefeditor.IntrinsicPrefsEditorForPageletParametersView.DisplayPrefsEditList(HTMLElement, String[], String[], String[], String)
DMI Invocation of toString on prefValues in com.plumtree.portalpages.portlets.intrinsicpageletparamprefeditor.IntrinsicPrefsEditorForPageletParametersView.DisplayPrefsEditList(HTMLElement, String[], String[], String[], String)
IL There is an apparent infinite loop in com.plumtree.portalpages.common.objects.ObjectView.Display()
IL There is an apparent infinite loop in com.plumtree.portalpages.common.objects.ObjectView.Display()
IL There is an apparent infinite loop in com.plumtree.portalpages.common.search.TypeSelectorView.Display()
IL There is an apparent infinite loop in com.plumtree.portalpages.devices.mypage.html32.MyPageDevicesView_HTML32.Display()
IL There is an apparent infinite loop in com.plumtree.portalpages.devices.mypage.wml.MyPageDevicesView_WML.DisplayString()
INT Bad comparison of nonnegative value with -1 in com.plumtree.portalpages.admin.editors.authsource.AuthSource3View.DisplayBody3(HTMLElementCollection)
INT Bad comparison of nonnegative value with -1 in com.plumtree.portalpages.admin.editors.authsource.AuthSourceSelectAuthPartnerView.Display()
RCN Nullcheck of type at line 174 of value previously dereferenced in com.plumtree.portalpages.admin.approval.ptobject.ObjectApprovalStatusAS.Init()

Malicious code vulnerability Warnings

Code Warning
MS com.plumtree.portalpages.admin.editors.savedsearch.SnapshotADConstraintsView.ADMIN_TYPES should be package protected
MS com.plumtree.portalpages.admin.ptutilities.diagnostic.dynamicloads.DynamicLoadsView.COL_WIDTHS should be package protected
MS com.plumtree.portalpages.browsing.editors.objectdelivery.common.ObjectDeliveryHelper.m_arHiddenCLASSIDS should be package protected
MS com.plumtree.portalpages.browsing.editors.objectdelivery.common.ObjectDeliveryHelper.m_arHiddenDependencyTypes should be package protected
MS com.plumtree.portalpages.browsing.editors.objectdelivery.common.ObjectDeliveryHelper.m_arSupportedCLASSIDS should be package protected
MS com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerTasks.STR_CONTEXT_APPEND isn't final but should be
MS com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerTasks.STR_QS_APPEND isn't final but should be
MS com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerTasks.STR_QS_ASSIGN isn't final but should be
MS com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerTasks.STR_QS_PREFIX isn't final but should be
MS com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerTasks.STR_TOKEN_DELIMITER isn't final but should be
MS com.plumtree.portalpages.common.plugnav.NavCategoryType.m_navCategoryTypes should be package protected
MS com.plumtree.portalpages.common.plugnav.NavPageType.m_navPageTypes should be package protected
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.COLNAME_TO_PROPID_MAP isn't final but should be
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.DATASTORE_PROP_IDENTIFIER isn't final but should be
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.DATASTORE_PROP_ITEMS isn't final but should be
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.DATASTORE_PROP_LABEL isn't final but should be
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.DATASTORE_PROP_TOTALRESULTS isn't final but should be
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.INVALID_PROPID isn't final but should be
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.NO_PROPTYPE isn't final but should be
MS com.plumtree.portalpages.rest.dojo.AQueryStoreModel.PROPID_PROPTYPE_MAP isn't final but should be

Performance Warnings

Code Warning
SBSC Method com.plumtree.portalpages.admin.editors.group.SelectActivityRightsModel.GetObjectClassIDs() concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.editors.group.SelectActivityRightsModel.GetSelectedItems() concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.editors.webservice.credvaulttree.CredVaultRefreshTreeControl.CredVaultsToString(String[]) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.editors.webservice.userinfotree.UserInfoRefreshTreeControl.UserInfosToString(String[]) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.objmgr.ObjMgrModel.MigrateObjects(XPHashtable, String) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.objmgr.ObjMgrModel.MoveObjectsBetweenFolders(int, Object[][]) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.ptutilities.diagnostic.relatedservers.RelatedServersModel.GetInstalledServerData(int) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.serversettings.search.BannerFieldAliasView.PadToEight(String) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.serversettings.search.SearchServerSettingsEditorModel.SaveClassIds(XPArrayList) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.serversettings.search.SearchServerTuningEditorModel.BuildAliasFromElements() concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.admin.serversettings.search.SearchServerTuningEditorModel.SaveBannerAlias(XPHashtable) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirConstants.BreakUpStringAndHTMLEncode(String, int) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirModel.ABODeleteFolders(int[]) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirModel.CopyFolders(int[], int) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirModel.CreateDirectoryFolder(String, String) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirModel.DeleteCards(int[]) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirModel.DeleteFolders(int[]) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirModel.LoadBrowsingPropColumns() concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirModel.MoveFolders(int[], int) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.directory.DirRepostControl.BuildCommaDelimitedList(int[]) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.editors.userprofile.UserProfileModel.Finish() concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.editors.userprofile.UserProfileModel.SavePage(String, XPHashtable) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.login.createaccount.CreateAccountModel.DoCreateAccount(IXPRequest, IWebData) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.myportal.MyPortalModel.DeletePage(int) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.portalsettings.password.PasswordModel.SavePage(String, XPHashtable) concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.browsing.sitemap.sitemappage.SiteMapModel.GetGroupPath() concatenates strings using + in a loop
SBSC Method com.plumtree.portalpages.condition.conditiontypes.ConditionTypeGroupID.Compare(XPHashtable, IValue, XPStringBuilder) concatenates strings using + in a loop
SIC Should com.plumtree.portalpages.browsing.myportal.MyPortalPartialPortletsDP$AddPotletsPartialContentDisplayHelper be a _static_ inner class?
SIC Should com.plumtree.portalpages.browsing.myportal.MyPortalPartialPortletsDP$CollapseExpandPotletPartialContentDisplayHelper be a _static_ inner class?
SIC Should com.plumtree.portalpages.browsing.myportal.MyPortalPartialPortletsDP$RemovePotletPartialContentDisplayHelper be a _static_ inner class?
UrF Unread field: com.plumtree.portalpages.admin.editors.defaultprofile.EditDefaultProfileRepostControl.m_asOwner
UrF Unread field: com.plumtree.portalpages.admin.editors.portlet.plugins.PortletSettingsView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.remoteserver.RemoteServerPropsView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.AddSettingsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.AdvSettingsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.AWSSettingsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.BasicAuthPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.ChooseWSTypePluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.CWSSettingsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.DebugConfigPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.GatewayCachingPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.HelpURLPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.IntrinsicHelpSpacePluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.IntrinsicPortletWSSettingsPluginView.m_asParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.IntrinsicProfilePluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.IntrinsicUserPrefsPluginView.m_asParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.MWSSettingsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.PWSSettingsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.RemoteConfigPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.RemoteMigrationPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.SelectDevicesPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.SOAPEncodingPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.SummaryURLPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.SWSSettingsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.UserInfoPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.UserPrefsPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.editors.webservice.plugins.XUIURLPluginView.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.ptutilities.migrationutility.MigrationStatusPopupView.m_model
UrF Unread field: com.plumtree.portalpages.admin.serversettings.search.BannerFieldAliasView$PropertyValue.typeID
UrF Unread field: com.plumtree.portalpages.admin.serversettings.ServerSettingsModel.m_asasParent
UrF Unread field: com.plumtree.portalpages.admin.serversettings.ServerSettingsModel.m_ptSession
UrF Unread field: com.plumtree.portalpages.ajax.AjaxModel.m_ptSession
UrF Unread field: com.plumtree.portalpages.browsing.editors.dircommon.doctype.DocTypePlugInView.m_asasParent
UrF Unread field: com.plumtree.portalpages.browsing.editors.folder.FolderEditorAdvancedSettingsDP.m_asModel
UrF Unread field: com.plumtree.portalpages.browsing.editors.folder.FolderEditorRelatedResourcesDP.m_asModel
UrF Unread field: com.plumtree.portalpages.browsing.portalsettings.PortalSettingsControl.m_asasParent
UrF Unread field: com.plumtree.portalpages.browsing.portalsettings.PortalSettingsControl.m_asmModel
UrF Unread field: com.plumtree.portalpages.browsing.portletpreview.NoMyPageAccessView.m_asModel
UrF Unread field: com.plumtree.portalpages.browsing.search.network.NetworkSearchModel.m_bannerSearchHelper
UrF Unread field: com.plumtree.portalpages.browsing.search.results.assocobjects.AssociatedObjectsControl.m_asOwner
UrF Unread field: com.plumtree.portalpages.browsing.sessionprefs.SessionPrefsControl.m_asasParent
UrF Unread field: com.plumtree.portalpages.browsing.sitemap.sitemappage.DisplayInPortletDP.m_asModel
UrF Unread field: com.plumtree.portalpages.browsing.sitemap.sitemappage.MembersDP.m_asModel
UrF Unread field: com.plumtree.portalpages.browsing.sitemap.sitemappage.SubCommunitiesDP.m_asModel
UrF Unread field: com.plumtree.portalpages.common.areyousure.AYSBottomView.m_model
UrF Unread field: com.plumtree.portalpages.common.areyousure.AYSPopupBodyFrameDP.m_model
UrF Unread field: com.plumtree.portalpages.common.areyousure.AYSPopupBottomFrameDP.m_model
UrF Unread field: com.plumtree.portalpages.common.areyousure.AYSPopupDP.m_model
UrF Unread field: com.plumtree.portalpages.common.areyousure.AYSPopupTopFrameDP.m_model
UrF Unread field: com.plumtree.portalpages.common.areyousure.AYSTopView.m_model
UrF Unread field: com.plumtree.portalpages.common.objectapproval.ObjectItemDescriptor.session
UrF Unread field: com.plumtree.portalpages.devices.choosepage.common.ChoosePageDevicesControl.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.error.common.ErrorDevicesControl.m_asasParent
UrF Unread field: com.plumtree.portalpages.devices.error.common.ErrorDevicesControl.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.error.common.ErrorDevicesModel.m_asOwner
UrF Unread field: com.plumtree.portalpages.devices.error.html.ErrorDevicesView_HTML32.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.error.wml.ErrorDevicesView_WML.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.login.common.LoginDevicesControl.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.logoff.common.LogoffDevicesControl.m_asasParent
UrF Unread field: com.plumtree.portalpages.devices.logoff.common.LogoffDevicesControl.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.logoff.common.LogoffDevicesModel.m_ptSession
UrF Unread field: com.plumtree.portalpages.devices.logoff.html32.LogoffDevicesView_HTML32.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.logoff.wml.LogoffDevicesView_WML.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.mypage.common.MyPageDevicesControl.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.portlet.common.PortletDevicesControl.m_asmModel
UrF Unread field: com.plumtree.portalpages.devices.portlet.html32.PortletDevicesView_HTML32.m_asOwner
UrF Unread field: com.plumtree.portalpages.devices.portlet.wml.PortletDevicesView_WML.m_asOwner
UrF Unread field: com.plumtree.portalpages.portlets.headerfooter.StandardFooterView.m_asOwner
UrF Unread field: com.plumtree.portalpages.portlets.headerfooter.StandardFooterView.m_model
UrF Unread field: com.plumtree.portalpages.portlets.sitemap.prefs.SiteMapPortletPrefsSortedLinksModel.m_Session
UuF Unused field: com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerControl.bLogout

Dodgy Warnings

Code Warning
DLS Dead store to ourgroups in com.plumtree.portalpages.admin.editors.authsource.AuthSourceModel.listOfAlienGroups()
DLS Dead store to myBr in com.plumtree.portalpages.admin.httpmemorydebugging.HTTPMemoryDebugView.GetHTMLForPageControlListSection()
DLS Dead store to nRowIndex in com.plumtree.portalpages.admin.ptutilities.diagnostic.dynamicloads.DynamicLoadsView.DisplayDynamicLoads()
DLS Dead store to imgValidIconHTML in com.plumtree.portalpages.browsing.portalsettings.password.PasswordDP.GetHTMLBelowSubHeader()
DLS Dead store to iSession in com.plumtree.portalpages.browsing.sso.ensemble.EnsembleHandlerTasks.ProcessRedirect(AActivitySpace, Redirect, boolean)
DLS Dead store to isPathwaysEnabled in com.plumtree.portalpages.common.search.TypeSelectorModel.SaveSection(XPHashtable)
ICAST int division result cast to double or float in com.plumtree.portalpages.browsing.objectselection.communities.CommSelGroupedResults508ViewHelper.formatSize(int)
ICAST int division result cast to double or float in com.plumtree.portalpages.browsing.objectselection.communities.CommSelGroupedResultsViewHelper.formatSize(int)
ICAST int division result cast to double or float in com.plumtree.portalpages.browsing.objectselection.portlets.PortletSelGroupedResults508ViewHelper.formatSize(int)
ICAST int division result cast to double or float in com.plumtree.portalpages.browsing.objectselection.portlets.PortletSelGroupedResultsViewHelper.formatSize(int)
ICAST int division result cast to double or float in com.plumtree.portalpages.browsing.search.results.GroupedResultsViewHelper.formatSize(int)
ICAST Result of integer multiplication cast to long in com.plumtree.portalpages.pei.PTLoginActions.CheckPasswordExpiration(IPTSession, ApplicationData)
IM Check for oddness that won't work for negative numbers in com.plumtree.portalpages.browsing.directory.browse_D.BrowseDocViewHelper_D.Display508Object(int, HTMLTable, IObjectModelRO, AActivitySpace)
IM Check for oddness that won't work for negative numbers in com.plumtree.portalpages.browsing.directory.browse.BrowseDocViewHelper.DisplayObject(int, int, HTMLTable, IObjectModelRO, AActivitySpace)
IM Check for oddness that won't work for negative numbers in com.plumtree.portalpages.browsing.directory.DirFolderViewHelper.DisplayFolder(int, HTMLTableCell, IFolderModelRO, AActivitySpace)
IM Check for oddness that won't work for negative numbers in com.plumtree.portalpages.browsing.directory.edit.EditDocViewHelper.DisplayObject(int, int, HTMLTable, IObjectModelRO, AActivitySpace)
IM Check for oddness that won't work for negative numbers in com.plumtree.portalpages.common.joblogs.HistoryViewHelper.GetTableRows(int, ASQueryResultWrapper)
IM Check for oddness that won't work for negative numbers in com.plumtree.portalpages.common.search.TypeSelectorView.Display()
SF Switch statement found in com.plumtree.portalpages.common.editpage.PageLayoutAlternateView.Display() where one case falls through to the next case
ST Write to static field com.plumtree.portalpages.browsing.directory.DirModel.s_bSubfolderQueryThroughSearch from instance method new com.plumtree.portalpages.browsing.directory.DirModel()
ST Write to static field com.plumtree.portalpages.browsing.directory.DirModel.s_nNumDaysToDisplayNewTag from instance method new com.plumtree.portalpages.browsing.directory.DirModel()
ST Write to static field com.plumtree.portalpages.browsing.directory.DirModel.s_nNumDaysToDisplayUpdatedTag from instance method new com.plumtree.portalpages.browsing.directory.DirModel()
ST Write to static field com.plumtree.portalpages.browsing.directory.DirModel.m_strDefaultInxightLanguage from instance method com.plumtree.portalpages.browsing.directory.DirModel.Init(AActivitySpace)

Details

DE_MIGHT_IGNORE: Method might ignore exception

This method might ignore an exception.  In general, exceptions should be handled or reported in some way, or they should be thrown out of the method.

DLS_DEAD_LOCAL_STORE: Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

DMI_INVOKING_TOSTRING_ON_ARRAY: Invocation of toString on an array

The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.

HE_EQUALS_USE_HASHCODE: Class defines equals() and uses Object.hashCode()

This class overrides equals(Object), but does not override hashCode(), and inherits the implementation of hashCode() from java.lang.Object (which returns the identity hash code, an arbitrary value assigned to the object by the VM).  Therefore, the class is very likely to violate the invariant that equal objects must have equal hashcodes.

If you don't think instances of this class will ever be inserted into a HashMap/HashTable, the recommended hashCode implementation to use is:

public int hashCode() {
  assert false : "hashCode not designed";
  return 42; // any arbitrary constant will do 
  }

ICAST_IDIV_CAST_TO_DOUBLE: int division result cast to double or float

This code casts the result of an integer division operation to double or float. Doing division on integers truncates the result to the integer value closest to zero. The fact that the result was cast to double suggests that this precision should have been retained. What was probably meant was to cast one or both of the operands to double before performing the division. Here is an example:

int x = 2;
int y = 5;
// Wrong: yields result 0.0
double value1 =  x / y;

// Right: yields result 0.4
double value2 =  x / (double) y;

ICAST_INTEGER_MULTIPLY_CAST_TO_LONG: Result of integer multiplication cast to long

This code performs integer multiply and then converts the result to a long, as in:

 
	long convertDaysToMilliseconds(int days) { return 1000*3600*24*days; } 
If the multiplication is done using long arithmetic, you can avoid the possibility that the result will overflow. For example, you could fix the above code to:
 
	long convertDaysToMilliseconds(int days) { return 1000L*3600*24*days; } 
or
 
	static final long MILLISECONDS_PER_DAY = 24L*3600*1000;
	long convertDaysToMilliseconds(int days) { return days * MILLISECONDS_PER_DAY; } 

IL_INFINITE_LOOP: An apparent infinite loop

This loop doesn't seem to have a way to terminate (other than by perhaps throwing an exception).

IM_BAD_CHECK_FOR_ODD: Check for oddness that won't work for negative numbers

The code uses x % 2 == 1 to check to see if a value is odd, but this won't work for negative numbers (e.g., (-5) % 2 == -1). If this code is intending to check for oddness, consider using x & 1 == 1, or x % 2 != 0.

INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE: Bad comparison of nonnegative value with negative constant

This code compares a value that is guaranteed to be non-negative with a negative constant.

MS_SHOULD_BE_FINAL: Field isn't final but should be

A mutable static field could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

MS_PKGPROTECT: Field should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE: Nullcheck of value previously dereferenced

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.

SBSC_USE_STRINGBUFFER_CONCATENATION: Method concatenates strings using + in a loop

The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.

For example:

  // This is bad
  String s = "";
  for (int i = 0; i < field.length; ++i) {
    s = s + field[i];
  }

  // This is better
  StringBuffer buf = new StringBuffer();
  for (int i = 0; i < field.length; ++i) {
    buf.append(field[i]);
  }
  String s = buf.toString();

SF_SWITCH_FALLTHROUGH: Switch statement found where one case falls through to the next case

This method contains a switch statement where one case branch will fall through to the next case. Usually you need to end this case with a break or return.

SIC_INNER_SHOULD_BE_STATIC: Should be a static inner class

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.

ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD: Write to static field from instance method

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.

URF_UNREAD_FIELD: Unread field

This field is never read.  Consider removing it from the class.

UUF_UNUSED_FIELD: Unused field

This field is never used.  Consider removing it from the class.