SpotBugs Report

Project Information

Project: codeCompCommon (spotbugsMain)

SpotBugs version: 4.5.3

Code analyzed:



Metrics

220 lines of code analyzed, in 11 classes, in 2 packages.

Metric Total Density*
High Priority Warnings 0.00
Medium Priority Warnings 4 18.18
Total Warnings 4 18.18

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



Contents

Summary

Warning Type Number
Malicious code vulnerability Warnings 3
Performance Warnings 1
Total 4

Warnings

Click on a warning row to see full context information.

Malicious code vulnerability Warnings

Code Warning
EI2 new edu.odu.cs.cs350.sourcedSuffixTrees.iterators.OmitPrivateCodesIterator(Iterator) may expose internal representation by storing an externally mutable object into OmitPrivateCodesIterator.baseIterator
EI2 new edu.odu.cs.cs350.sourcedSuffixTrees.iterators.StringContainsIterator(Iterator, String) may expose internal representation by storing an externally mutable object into StringContainsIterator.baseIterator
EI2 new edu.odu.cs.cs350.sourcedSuffixTrees.iterators.TruncatedStringsIterator(Iterator, char) may expose internal representation by storing an externally mutable object into TruncatedStringsIterator.baseIterator

Performance Warnings

Code Warning
SIC Should edu.odu.cs.cs350.sourcedSuffixTrees.iterators.TreeIterator$State be a _static_ inner class?

Details

EI_EXPOSE_REP2: May expose internal representation by incorporating reference to mutable object

This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

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.