FindBugs Bug Detector Report

The following document contains the results of FindBugs Report

FindBugs Version is 2.0.0

Threshold is medium

Effort is min

Summary

ClassesBugsErrorsMissing Classes
976900

gov.nasa.pds.harvest.HarvestLauncher

BugCategoryDetailsLinePriority
Dead store to dirExcludes in gov.nasa.pds.harvest.HarvestLauncher.logHeader(Policy)STYLEDLS_DEAD_LOCAL_STORE345Medium
Dead store to fileIncludes in gov.nasa.pds.harvest.HarvestLauncher.logHeader(Policy)STYLEDLS_DEAD_LOCAL_STORE344Medium
gov.nasa.pds.harvest.HarvestLauncher.processMain(String[]) invokes System.exit(...), which shuts down the entire virtual machineBAD_PRACTICEDM_EXIT637Medium
gov.nasa.pds.harvest.HarvestLauncher.query(CommandLine) invokes System.exit(...), which shuts down the entire virtual machineBAD_PRACTICEDM_EXIT221Medium

gov.nasa.pds.harvest.association.AssociationPublisher

BugCategoryDetailsLinePriority
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numAssociationsNotRegistered from instance method gov.nasa.pds.harvest.association.AssociationPublisher.publish(File, Metadata)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD114Medium
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numAssociationsRegistered from instance method gov.nasa.pds.harvest.association.AssociationPublisher.publish(File, Metadata)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD109Medium

gov.nasa.pds.harvest.constants.Constants

BugCategoryDetailsLinePriority
gov.nasa.pds.harvest.constants.Constants.collections isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL163High
gov.nasa.pds.harvest.constants.Constants.nonPrimaryMembers isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL161High

gov.nasa.pds.harvest.crawler.PDS3ProductCrawler

BugCategoryDetailsLinePriority
Dead store to label in gov.nasa.pds.harvest.crawler.PDS3ProductCrawler.passesPreconditions(File)STYLEDLS_DEAD_LOCAL_STORE114Medium

gov.nasa.pds.harvest.crawler.actions.FileObjectRegistrationAction

BugCategoryDetailsLinePriority
Dead store to fileObjectEntries in gov.nasa.pds.harvest.crawler.actions.FileObjectRegistrationAction.performAction(File, Metadata)STYLEDLS_DEAD_LOCAL_STORE137Medium
Possible null pointer dereference of file in gov.nasa.pds.harvest.crawler.actions.FileObjectRegistrationAction.getPds3FileObjects(File, List) on exception pathCORRECTNESSNP_NULL_ON_SOME_PATH_EXCEPTION428Medium
Exception is caught when Exception is not thrown in gov.nasa.pds.harvest.crawler.actions.FileObjectRegistrationAction.performAction(File, Metadata)STYLEREC_CATCH_EXCEPTION197Medium
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numAncillaryProductsNotRegistered from instance method gov.nasa.pds.harvest.crawler.actions.FileObjectRegistrationAction.performAction(File, Metadata)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD201Medium
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numAncillaryProductsRegistered from instance method gov.nasa.pds.harvest.crawler.actions.FileObjectRegistrationAction.performAction(File, Metadata)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD177Medium

gov.nasa.pds.harvest.crawler.actions.RegistryUniquenessCheckerAction

BugCategoryDetailsLinePriority
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numProductsNotRegistered from instance method gov.nasa.pds.harvest.crawler.actions.RegistryUniquenessCheckerAction.performAction(File, Metadata)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD88Medium

gov.nasa.pds.harvest.crawler.actions.SaveMetadataAction

BugCategoryDetailsLinePriority
Unread field: gov.nasa.pds.harvest.crawler.actions.SaveMetadataAction.DESCRIPTION; should this field be static?PERFORMANCESS_SHOULD_BE_STATIC37Medium
Unread field: gov.nasa.pds.harvest.crawler.actions.SaveMetadataAction.ID; should this field be static?PERFORMANCESS_SHOULD_BE_STATIC34Medium

gov.nasa.pds.harvest.crawler.actions.ValidObjectTypeCheckerAction

BugCategoryDetailsLinePriority
Unread field: gov.nasa.pds.harvest.crawler.actions.ValidObjectTypeCheckerAction.DESCRIPTION; should this field be static?PERFORMANCESS_SHOULD_BE_STATIC21Medium
Unread field: gov.nasa.pds.harvest.crawler.actions.ValidObjectTypeCheckerAction.ID; should this field be static?PERFORMANCESS_SHOULD_BE_STATIC20Medium

gov.nasa.pds.harvest.crawler.metadata.extractor.BundleMetExtractor

BugCategoryDetailsLinePriority
Dead store to references in gov.nasa.pds.harvest.crawler.metadata.extractor.BundleMetExtractor.extractMetadata(File)STYLEDLS_DEAD_LOCAL_STORE68Medium
Exception is caught when Exception is not thrown in gov.nasa.pds.harvest.crawler.metadata.extractor.BundleMetExtractor.extractMetadata(File)STYLEREC_CATCH_EXCEPTION144Medium

gov.nasa.pds.harvest.crawler.metadata.extractor.CollectionMetExtractor

BugCategoryDetailsLinePriority
Dead store to references in gov.nasa.pds.harvest.crawler.metadata.extractor.CollectionMetExtractor.extractMetadata(File)STYLEDLS_DEAD_LOCAL_STORE77Medium

gov.nasa.pds.harvest.crawler.metadata.extractor.Pds3MetExtractor

BugCategoryDetailsLinePriority
gov.nasa.pds.harvest.crawler.metadata.extractor.Pds3MetExtractor.createLid(File, Label, LidContents) concatenates strings using + in a loopPERFORMANCESBSC_USE_STRINGBUFFER_CONCATENATION200Medium
gov.nasa.pds.harvest.crawler.metadata.extractor.Pds3MetExtractor.createTitle(File, Label, TitleContents) concatenates strings using + in a loopPERFORMANCESBSC_USE_STRINGBUFFER_CONCATENATION255Medium

gov.nasa.pds.harvest.crawler.metadata.extractor.Pds4MetExtractor

BugCategoryDetailsLinePriority
Dead store to dataClasses in gov.nasa.pds.harvest.crawler.metadata.extractor.Pds4MetExtractor.extractMetadata(File)STYLEDLS_DEAD_LOCAL_STORE88Medium
Dead store to references in gov.nasa.pds.harvest.crawler.metadata.extractor.Pds4MetExtractor.extractMetadata(File)STYLEDLS_DEAD_LOCAL_STORE87Medium
Exception is caught when Exception is not thrown in gov.nasa.pds.harvest.crawler.metadata.extractor.Pds4MetExtractor.extractMetadata(File)STYLEREC_CATCH_EXCEPTION172Medium

gov.nasa.pds.harvest.file.ChecksumManifest

BugCategoryDetailsLinePriority
Found reliance on default encoding in gov.nasa.pds.harvest.file.ChecksumManifest.read(File): new java.io.FileReader(File)I18NDM_DEFAULT_ENCODING53High

gov.nasa.pds.harvest.file.MD5Checksum

BugCategoryDetailsLinePriority
Possible null pointer dereference of input in gov.nasa.pds.harvest.file.MD5Checksum.createChecksum(String) on exception pathCORRECTNESSNP_NULL_ON_SOME_PATH_EXCEPTION70Medium

gov.nasa.pds.harvest.ingest.RegistryIngester

BugCategoryDetailsLinePriority
Dead store to extrinsic in gov.nasa.pds.harvest.ingest.RegistryIngester.hasProduct(URL, String)STYLEDLS_DEAD_LOCAL_STORE133Medium
gov.nasa.pds.harvest.ingest.RegistryIngester.createFileObjectMetadata(FileObject, Metadata) invokes inefficient new Long(long) constructor; use Long.valueOf(long) insteadPERFORMANCEDM_NUMBER_CTOR395Medium
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numProductsNotRegistered from instance method gov.nasa.pds.harvest.ingest.RegistryIngester.ingest(URL, File, Metadata)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD221Medium
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numProductsRegistered from instance method gov.nasa.pds.harvest.ingest.RegistryIngester.ingest(URL, File, Metadata)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD217Medium

gov.nasa.pds.harvest.inventory.InventoryTableReader

BugCategoryDetailsLinePriority
Found reliance on default encoding in new gov.nasa.pds.harvest.inventory.InventoryTableReader(File): new java.io.FileReader(File)I18NDM_DEFAULT_ENCODING79High
Unread field: gov.nasa.pds.harvest.inventory.InventoryTableReader.parentDirectoryPERFORMANCEURF_UNREAD_FIELD65Medium

gov.nasa.pds.harvest.inventory.InventoryXMLReader

BugCategoryDetailsLinePriority
Unread field: gov.nasa.pds.harvest.inventory.InventoryXMLReader.parentDirectoryPERFORMANCEURF_UNREAD_FIELD57Medium

gov.nasa.pds.harvest.logging.formatter.HarvestFormatter

BugCategoryDetailsLinePriority
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numErrors from instance method gov.nasa.pds.harvest.logging.formatter.HarvestFormatter.format(LogRecord)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD63Medium
Write to static field gov.nasa.pds.harvest.stats.HarvestStats.numWarnings from instance method gov.nasa.pds.harvest.logging.formatter.HarvestFormatter.format(LogRecord)STYLEST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD60Medium
Unread field: gov.nasa.pds.harvest.logging.formatter.HarvestFormatter.configPERFORMANCEURF_UNREAD_FIELD45Medium

gov.nasa.pds.harvest.registry.RegistryClient

BugCategoryDetailsLinePriority
Unread field: gov.nasa.pds.harvest.registry.RegistryClient.passwordPERFORMANCEURF_UNREAD_FIELD82Medium
Unread field: gov.nasa.pds.harvest.registry.RegistryClient.userPERFORMANCEURF_UNREAD_FIELD81Medium

gov.nasa.pds.harvest.security.SecurityClient

BugCategoryDetailsLinePriority
Unwritten field: gov.nasa.pds.harvest.security.SecurityClient.mediaTypeCORRECTNESSUWF_UNWRITTEN_FIELD60Medium

gov.nasa.pds.harvest.stats.HarvestStats

BugCategoryDetailsLinePriority
gov.nasa.pds.harvest.stats.HarvestStats.numAncillaryProductsNotRegistered isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL21Medium
gov.nasa.pds.harvest.stats.HarvestStats.numAncillaryProductsRegistered isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL19Medium
gov.nasa.pds.harvest.stats.HarvestStats.numAssociationsNotRegistered isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL25Medium
gov.nasa.pds.harvest.stats.HarvestStats.numAssociationsRegistered isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL23Medium
gov.nasa.pds.harvest.stats.HarvestStats.numBadFiles isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL11Medium
gov.nasa.pds.harvest.stats.HarvestStats.numErrors isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL27Medium
gov.nasa.pds.harvest.stats.HarvestStats.numFilesSkipped isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL13Medium
gov.nasa.pds.harvest.stats.HarvestStats.numGeneratedChecksumsDiffInLabel isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL39Medium
gov.nasa.pds.harvest.stats.HarvestStats.numGeneratedChecksumsDiffInManifest isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL33Medium
gov.nasa.pds.harvest.stats.HarvestStats.numGeneratedChecksumsNotCheckedInLabel isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL41Medium
gov.nasa.pds.harvest.stats.HarvestStats.numGeneratedChecksumsNotCheckedInManifest isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL35Medium
gov.nasa.pds.harvest.stats.HarvestStats.numGeneratedChecksumsSameInLabel isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL37Medium
gov.nasa.pds.harvest.stats.HarvestStats.numGeneratedChecksumsSameInManifest isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL31Medium
gov.nasa.pds.harvest.stats.HarvestStats.numGoodFiles isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL9Medium
gov.nasa.pds.harvest.stats.HarvestStats.numManifestChecksumsDiffInLabel isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL45Medium
gov.nasa.pds.harvest.stats.HarvestStats.numManifestChecksumsNotCheckedInLabel isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL47Medium
gov.nasa.pds.harvest.stats.HarvestStats.numManifestChecksumsSameInLabel isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL43Medium
gov.nasa.pds.harvest.stats.HarvestStats.numProductsNotRegistered isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL17Medium
gov.nasa.pds.harvest.stats.HarvestStats.numProductsRegistered isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL15Medium
gov.nasa.pds.harvest.stats.HarvestStats.numWarnings isn't final and can't be protected from malicious code MALICIOUS_CODEMS_CANNOT_BE_FINAL29Medium
gov.nasa.pds.harvest.stats.HarvestStats.registeredProductTypes isn't final but should beMALICIOUS_CODEMS_SHOULD_BE_FINAL50High

gov.nasa.pds.harvest.util.LidVid

BugCategoryDetailsLinePriority
Equals method for gov.nasa.pds.harvest.util.LidVid assumes the argument is of type LidVidBAD_PRACTICEBC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS73Medium
gov.nasa.pds.harvest.util.LidVid defines equals and uses Object.hashCode()BAD_PRACTICEHE_EQUALS_USE_HASHCODE72High
gov.nasa.pds.harvest.util.LidVid.equals(Object) does not check for null argumentBAD_PRACTICENP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT72Medium

gov.nasa.pds.harvest.util.Utility

BugCategoryDetailsLinePriority
Found reliance on default encoding in gov.nasa.pds.harvest.util.Utility.toXML(Association): java.io.ByteArrayOutputStream.toString()I18NDM_DEFAULT_ENCODING122High
Found reliance on default encoding in gov.nasa.pds.harvest.util.Utility.toXML(ExtrinsicObject): java.io.ByteArrayOutputStream.toString()I18NDM_DEFAULT_ENCODING101High

gov.nasa.pds.harvest.util.XMLValidationEventHandler

BugCategoryDetailsLinePriority
level could be null and is guaranteed to be dereferenced in gov.nasa.pds.harvest.util.XMLValidationEventHandler.handleEvent(ValidationEvent)CORRECTNESSNP_GUARANTEED_DEREF47Medium