SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.8.4
Threshold is medium
Effort is default
Summary
| Classes | Bugs | Errors | Missing Classes |
|---|---|---|---|
| 148 | 143 | 0 | 0 |
Files
org.opentrafficsim.editor.ApplicationStore
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.ApplicationStore at new org.opentrafficsim.editor.ApplicationStore(String, String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 44 | Medium |
| Found reliance on default encoding in new org.opentrafficsim.editor.ApplicationStore(String, String): new java.io.FileReader(String) | I18N | DM_DEFAULT_ENCODING | 52 | High |
| Found reliance on default encoding in org.opentrafficsim.editor.ApplicationStore.setProperty(String, String): new java.io.FileWriter(File) | I18N | DM_DEFAULT_ENCODING | 87 | High |
| new org.opentrafficsim.editor.ApplicationStore(String, String) may fail to clean up java.io.Reader | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 52 | Medium |
| org.opentrafficsim.editor.ApplicationStore.setProperty(String, String) may fail to clean up java.io.Writer | EXPERIMENTAL | OBL_UNSATISFIED_OBLIGATION | 87 | Medium |
| new org.opentrafficsim.editor.ApplicationStore(String, String) may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 52 | Medium |
| org.opentrafficsim.editor.ApplicationStore.setProperty(String, String) may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 87 | Medium |
| Exceptional return value of java.io.File.mkdirs() ignored in org.opentrafficsim.editor.ApplicationStore.setProperty(String, String) | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 86 | Medium |
org.opentrafficsim.editor.AttributesTableModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.AttributesTableModel.getNode() may expose internal representation by returning AttributesTableModel.node | MALICIOUS_CODE | EI_EXPOSE_REP | 139 | Medium |
| new org.opentrafficsim.editor.AttributesTableModel(XsdTreeNode, JTreeTable) may expose internal representation by storing an externally mutable object into AttributesTableModel.node | MALICIOUS_CODE | EI_EXPOSE_REP2 | 47 | Medium |
| new org.opentrafficsim.editor.AttributesTableModel(XsdTreeNode, JTreeTable) may expose internal representation by storing an externally mutable object into AttributesTableModel.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 48 | Medium |
org.opentrafficsim.editor.EvalWrapper
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.EvalWrapper.getEval(ScenarioWrapper) may expose internal representation by returning EvalWrapper.eval | MALICIOUS_CODE | EI_EXPOSE_REP | 110 | Medium |
| org.opentrafficsim.editor.EvalWrapper.getLastValidEval() may expose internal representation by returning EvalWrapper.eval | MALICIOUS_CODE | EI_EXPOSE_REP | 123 | Medium |
| Exception is caught when Exception is not thrown in org.opentrafficsim.editor.EvalWrapper.wrap(XsdTreeNode) | STYLE | REC_CATCH_EXCEPTION | 302 | Medium |
org.opentrafficsim.editor.NodeActions
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.NodeActions(OtsEditor, JTreeTable) may expose internal representation by storing an externally mutable object into NodeActions.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
| new org.opentrafficsim.editor.NodeActions(OtsEditor, JTreeTable) may expose internal representation by storing an externally mutable object into NodeActions.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
org.opentrafficsim.editor.OtsEditor
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.OtsEditor at new org.opentrafficsim.editor.OtsEditor() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 373 | Medium |
| org.opentrafficsim.editor.OtsEditor.getChoiceNode() may expose internal representation by returning OtsEditor.choiceNode | MALICIOUS_CODE | EI_EXPOSE_REP | 1260 | Medium |
| org.opentrafficsim.editor.OtsEditor.getClipboard() may expose internal representation by returning OtsEditor.clipboard | MALICIOUS_CODE | EI_EXPOSE_REP | 1986 | Medium |
| org.opentrafficsim.editor.OtsEditor.getEventListenerMap() may expose internal representation by returning OtsEditor.listenerMap | MALICIOUS_CODE | EI_EXPOSE_REP | 1285 | Medium |
| org.opentrafficsim.editor.OtsEditor.getNodeActions() may expose internal representation by returning OtsEditor.nodeActions | MALICIOUS_CODE | EI_EXPOSE_REP | 2010 | Medium |
| org.opentrafficsim.editor.OtsEditor.getUndo() may expose internal representation by returning OtsEditor.undo | MALICIOUS_CODE | EI_EXPOSE_REP | 542 | Medium |
| org.opentrafficsim.editor.OtsEditor.setChoiceNode(XsdTreeNode) may expose internal representation by storing an externally mutable object into OtsEditor.choiceNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1269 | Medium |
| org.opentrafficsim.editor.OtsEditor.setClipboard(XsdTreeNode, boolean) may expose internal representation by storing an externally mutable object into OtsEditor.clipboard | MALICIOUS_CODE | EI_EXPOSE_REP2 | 1976 | Medium |
| org.opentrafficsim.editor.OtsEditor.setCoupledNode(XsdTreeNode, XsdTreeNode, String) may expose internal representation by storing an externally mutable object into OtsEditor.candidateBackNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 805 | Medium |
| org.opentrafficsim.editor.OtsEditor.setCoupledNode(XsdTreeNode, XsdTreeNode, String) may expose internal representation by storing an externally mutable object into OtsEditor.coupledNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 804 | Medium |
| org.opentrafficsim.editor.OtsEditor.setSchema(Document) may expose internal representation by storing an externally mutable object into OtsEditor.xsdDocument | MALICIOUS_CODE | EI_EXPOSE_REP2 | 836 | Medium |
| org.opentrafficsim.editor.OtsEditor.checkAutosave() may fail to close stream | BAD_PRACTICE | OS_OPEN_STREAM | 864 | Medium |
| Exceptional return value of java.io.File.delete() ignored in org.opentrafficsim.editor.OtsEditor.checkAutosave() | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 890 | Medium |
| Exceptional return value of java.io.File.mkdir() ignored in org.opentrafficsim.editor.OtsEditor.checkAutosave() | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 859 | Medium |
| Exceptional return value of java.io.File.delete() ignored in org.opentrafficsim.editor.OtsEditor.runSingle() | BAD_PRACTICE | RV_RETURN_VALUE_IGNORED_BAD_PRACTICE | 503 | Medium |
| org.opentrafficsim.editor.OtsEditor$2 stored into non-transient field OtsEditor.autosave | BAD_PRACTICE | SE_BAD_FIELD_STORE | 966 | Medium |
| Useless condition: it's known that bgHeight > 0 at this point | STYLE | UC_USELESS_CONDITION | 1224 | High |
| Useless condition: it's known that bgWidth > 0 at this point | STYLE | UC_USELESS_CONDITION | 1223 | High |
org.opentrafficsim.editor.OtsRunner$OtsRunnerModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.OtsRunner$OtsRunnerModel.getNetwork() may expose internal representation by returning OtsRunner$OtsRunnerModel.network | MALICIOUS_CODE | EI_EXPOSE_REP | 136 | Medium |
org.opentrafficsim.editor.ScenarioWrapper
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.ScenarioWrapper.getScenarioNode() may expose internal representation by returning ScenarioWrapper.scenarioNode | MALICIOUS_CODE | EI_EXPOSE_REP | 42 | Medium |
| new org.opentrafficsim.editor.ScenarioWrapper(XsdTreeNode) may expose internal representation by storing an externally mutable object into ScenarioWrapper.scenarioNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 23 | Medium |
org.opentrafficsim.editor.Schema
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.Schema at new org.opentrafficsim.editor.Schema(Document) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 90 | Medium |
| Dead store to elements rather than field with same name in org.opentrafficsim.editor.Schema.checkKeyrefs() | STYLE | DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD | 600 | Medium |
| org.opentrafficsim.editor.Schema.getRoot() may expose internal representation by returning Schema.root | MALICIOUS_CODE | EI_EXPOSE_REP | 858 | Medium |
| Nullcheck of base at line 956 of value previously dereferenced in org.opentrafficsim.editor.Schema.isType(Node, String) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 951 | Medium |
| org.opentrafficsim.editor.Schema.checkKeyOrUniques(String, Map) makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 658 | Medium |
| org.opentrafficsim.editor.Schema.checkKeyrefs() makes inefficient use of keySet iterator instead of entrySet iterator | PERFORMANCE | WMI_WRONG_MAP_ITERATOR | 580 | Medium |
org.opentrafficsim.editor.Schema$RecursionElement
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.editor.Schema$RecursionElement be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 528-558 | Medium |
org.opentrafficsim.editor.Undo
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.Undo at new org.opentrafficsim.editor.Undo(OtsEditor, AbstractButton, AbstractButton) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 69 | Medium |
| new org.opentrafficsim.editor.Undo(OtsEditor, AbstractButton, AbstractButton) may expose internal representation by storing an externally mutable object into Undo.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 64 | Medium |
| new org.opentrafficsim.editor.Undo(OtsEditor, AbstractButton, AbstractButton) may expose internal representation by storing an externally mutable object into Undo.redoItem | MALICIOUS_CODE | EI_EXPOSE_REP2 | 66 | Medium |
| new org.opentrafficsim.editor.Undo(OtsEditor, AbstractButton, AbstractButton) may expose internal representation by storing an externally mutable object into Undo.undoItem | MALICIOUS_CODE | EI_EXPOSE_REP2 | 65 | Medium |
| Inconsistent synchronization of org.opentrafficsim.editor.Undo.ignoreChanges; locked 54% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 77 | Medium |
org.opentrafficsim.editor.Undo$Action
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Should org.opentrafficsim.editor.Undo$Action be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 526-533 | Medium |
org.opentrafficsim.editor.XiIncludeNode
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.XiIncludeNode.getFirstChild() may expose internal representation by returning XiIncludeNode.FILE_CHILD | MALICIOUS_CODE | EI_EXPOSE_REP | 107 | Medium |
| org.opentrafficsim.editor.XiIncludeNode.getLastChild() may expose internal representation by returning XiIncludeNode.FALLBACK_CHILD | MALICIOUS_CODE | EI_EXPOSE_REP | 114 | Medium |
org.opentrafficsim.editor.XsdOption
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.XsdOption.choice() may expose internal representation by returning XsdOption.choice | MALICIOUS_CODE | EI_EXPOSE_REP | 15 | Medium |
| org.opentrafficsim.editor.XsdOption.optionNode() may expose internal representation by returning XsdOption.optionNode | MALICIOUS_CODE | EI_EXPOSE_REP | 15 | Medium |
| new org.opentrafficsim.editor.XsdOption(XsdTreeNode, XsdTreeNode, boolean, boolean) may expose internal representation by storing an externally mutable object into XsdOption.choice | MALICIOUS_CODE | EI_EXPOSE_REP2 | 15 | Medium |
| new org.opentrafficsim.editor.XsdOption(XsdTreeNode, XsdTreeNode, boolean, boolean) may expose internal representation by storing an externally mutable object into XsdOption.optionNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 15 | Medium |
org.opentrafficsim.editor.XsdTreeNode
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.XsdTreeNode at new org.opentrafficsim.editor.XsdTreeNode(Schema) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 250 | Medium |
| Exception thrown in class org.opentrafficsim.editor.XsdTreeNode at new org.opentrafficsim.editor.XsdTreeNode(XsdTreeNode, Node, ImmutableList) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 270 | Medium |
| Exception thrown in class org.opentrafficsim.editor.XsdTreeNode at new org.opentrafficsim.editor.XsdTreeNode(XsdTreeNode, Node, ImmutableList, Node) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 316 | Medium |
| Boxing/unboxing to parse a primitive org.opentrafficsim.editor.XsdTreeNode.loadChildren(List, NodeList, boolean) | PERFORMANCE | DM_BOXED_PRIMITIVE_FOR_PARSING | 2520 | High |
| org.opentrafficsim.editor.XsdTreeNode.getOption() may expose internal representation by returning XsdTreeNode.selected | MALICIOUS_CODE | EI_EXPOSE_REP | 501 | Medium |
| org.opentrafficsim.editor.XsdTreeNode.getParent() may expose internal representation by returning XsdTreeNode.parent | MALICIOUS_CODE | EI_EXPOSE_REP | 735 | Medium |
| Return value of add() ignored, is this OK in org.opentrafficsim.editor.XsdTreeNode.assureChildren() | STYLE | RV_RETURN_VALUE_IGNORED_INFERRED | 723 | Medium |
| Return value of add() ignored, is this OK in org.opentrafficsim.editor.XsdTreeNode.loadChildren(List, NodeList, boolean) | STYLE | RV_RETURN_VALUE_IGNORED_INFERRED | 2551 | Medium |
| org.opentrafficsim.editor.XsdTreeNode.loadXmlNodes(Node) concatenates strings using + in a loop | PERFORMANCE | SBSC_USE_STRINGBUFFER_CONCATENATION | 2378 | Medium |
| Class org.opentrafficsim.editor.XsdTreeNode defines non-transient non-serializable instance field schema | BAD_PRACTICE | SE_BAD_FIELD | Not available | High |
| Class org.opentrafficsim.editor.XsdTreeNode defines non-transient non-serializable instance field attributeNodes | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.editor.XsdTreeNode defines non-transient non-serializable instance field referringXsdNode | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
| Class org.opentrafficsim.editor.XsdTreeNode defines non-transient non-serializable instance field xsdNode | BAD_PRACTICE | SE_BAD_FIELD | Not available | Medium |
org.opentrafficsim.editor.XsdTreeNodeRoot
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.XsdTreeNodeRoot at new org.opentrafficsim.editor.XsdTreeNodeRoot(Schema) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 75 | Medium |
org.opentrafficsim.editor.XsdTreeNodeUtil
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Boxing/unboxing to parse a primitive org.opentrafficsim.editor.XsdTreeNodeUtil.getOccurs(Node, String) | PERFORMANCE | DM_BOXED_PRIMITIVE_FOR_PARSING | 74 | High |
org.opentrafficsim.editor.XsdTreeTableModel
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.XsdTreeTableModel.setTreeTable(JTreeTable) may expose internal representation by storing an externally mutable object into XsdTreeTableModel.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
org.opentrafficsim.editor.decoration.AutomaticConnectorId
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.decoration.AutomaticConnectorId.notifyAttributeChanged(XsdTreeNode, String) may expose internal representation by storing an externally mutable object into AutomaticConnectorId.lastNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 42 | Medium |
org.opentrafficsim.editor.decoration.AutomaticLinkId
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.decoration.AutomaticLinkId.notifyAttributeChanged(XsdTreeNode, String) may expose internal representation by storing an externally mutable object into AutomaticLinkId.lastNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 63 | Medium |
org.opentrafficsim.editor.decoration.LayoutCustomizer
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.decoration.LayoutCustomizer(OtsEditor) may expose internal representation by storing an externally mutable object into LayoutCustomizer.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
| Possible null pointer dereference of custom in org.opentrafficsim.editor.decoration.LayoutCustomizer.accept(XsdTreeNode) | CORRECTNESS | NP_NULL_ON_SOME_PATH | 90 | Medium |
org.opentrafficsim.editor.decoration.validation.KeyValidator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.decoration.validation.KeyValidator at new org.opentrafficsim.editor.decoration.validation.KeyValidator(Node, String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 60 | Medium |
org.opentrafficsim.editor.decoration.validation.KeyrefValidator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.decoration.validation.KeyrefValidator at new org.opentrafficsim.editor.decoration.validation.KeyrefValidator(Node, String, KeyValidator) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 50 | Medium |
| new org.opentrafficsim.editor.decoration.validation.KeyrefValidator(Node, String, KeyValidator) may expose internal representation by storing an externally mutable object into KeyrefValidator.refer | MALICIOUS_CODE | EI_EXPOSE_REP2 | 57 | Medium |
org.opentrafficsim.editor.decoration.validation.ParentValidator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Nullcheck of parent at line 176 of value previously dereferenced in org.opentrafficsim.editor.decoration.validation.ParentValidator.getContext(XsdTreeNode) | CORRECTNESS | RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE | 176 | Medium |
org.opentrafficsim.editor.decoration.validation.RoadLayoutElementValidator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.decoration.validation.RoadLayoutElementValidator at new org.opentrafficsim.editor.decoration.validation.RoadLayoutElementValidator(OtsEditor, String, RoadLayoutElementValidator$LayoutCoupling, String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 83 | Medium |
org.opentrafficsim.editor.decoration.validation.ValueValidator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Boxing/unboxing to parse a primitive org.opentrafficsim.editor.decoration.validation.ValueValidator.reportNativeTypeNonCompliance(String, String) | PERFORMANCE | DM_BOXED_PRIMITIVE_FOR_PARSING | 345 | High |
| Boxing/unboxing to parse a primitive org.opentrafficsim.editor.decoration.validation.ValueValidator.reportRestrictionNonCompliance(Node, Node, String) | PERFORMANCE | DM_BOXED_PRIMITIVE_FOR_PARSING | 447 | High |
| org.opentrafficsim.editor.decoration.validation.ValueValidator.SUPPRESS_ERRORS should be moved out of an interface and made package protected | MALICIOUS_CODE | MS_OOI_PKGPROTECT | 30 | Medium |
org.opentrafficsim.editor.decoration.validation.XPathValidator
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.decoration.validation.XPathValidator at new org.opentrafficsim.editor.decoration.validation.XPathValidator(Node, String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 40 | Medium |
| new org.opentrafficsim.editor.decoration.validation.XPathValidator(Node, String) may expose internal representation by storing an externally mutable object into XPathValidator.keyNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 42 | Medium |
org.opentrafficsim.editor.decoration.validation.XPathValidator$Field
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.decoration.validation.XPathValidator$Field(XPathValidator, String) may expose internal representation by storing an externally mutable object into XPathValidator$Field.this$0 | MALICIOUS_CODE | EI_EXPOSE_REP2 | 248 | Medium |
org.opentrafficsim.editor.extensions.DefinitionsSaver
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.extensions.DefinitionsSaver(OtsEditor) may expose internal representation by storing an externally mutable object into DefinitionsSaver.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
org.opentrafficsim.editor.extensions.OdEditor
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.extensions.OdEditor at new org.opentrafficsim.editor.extensions.OdEditor(OtsEditor) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 39 | Medium |
| new org.opentrafficsim.editor.extensions.OdEditor(OtsEditor) may expose internal representation by storing an externally mutable object into OdEditor.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 42 | Medium |
org.opentrafficsim.editor.extensions.RoadLayoutEditor
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.extensions.RoadLayoutEditor at new org.opentrafficsim.editor.extensions.RoadLayoutEditor(OtsEditor) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 43 | Medium |
| new org.opentrafficsim.editor.extensions.RoadLayoutEditor(OtsEditor) may expose internal representation by storing an externally mutable object into RoadLayoutEditor.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 | Medium |
org.opentrafficsim.editor.extensions.RouteEditor
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.extensions.RouteEditor(OtsEditor) may expose internal representation by storing an externally mutable object into RouteEditor.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
org.opentrafficsim.editor.extensions.TrafCodEditor
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.extensions.TrafCodEditor(OtsEditor) may expose internal representation by storing an externally mutable object into TrafCodEditor.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
org.opentrafficsim.editor.extensions.map.ChangeListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.extensions.map.ChangeListener.getNode() may expose internal representation by returning ChangeListener.node | MALICIOUS_CODE | EI_EXPOSE_REP | 185 | Medium |
| new org.opentrafficsim.editor.extensions.map.ChangeListener(XsdTreeNode, Supplier) may expose internal representation by storing an externally mutable object into ChangeListener.node | MALICIOUS_CODE | EI_EXPOSE_REP2 | 66 | Medium |
org.opentrafficsim.editor.extensions.map.EditorMap
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Possible null pointer dereference of EditorMap.networkFlattenerListener in org.opentrafficsim.editor.extensions.map.EditorMap.removeNetworkFlattener() | CORRECTNESS | NP_NULL_ON_SOME_PATH | 908 | Medium |
org.opentrafficsim.editor.extensions.map.EditorMap$2
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Test for floating point equality in org.opentrafficsim.editor.extensions.map.EditorMap$2.computeVisibleExtent(Bounds2d, Dimension) | STYLE | FE_FLOATING_POINT_EQUALITY | 220 | High |
org.opentrafficsim.editor.extensions.map.FlattenerListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Boxing/unboxing to parse a primitive org.opentrafficsim.editor.extensions.map.FlattenerListener.calculateData() | PERFORMANCE | DM_BOXED_PRIMITIVE_FOR_PARSING | 53 | High |
org.opentrafficsim.editor.extensions.map.MapCrossSectionData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.extensions.map.MapCrossSectionData(XsdTreeNode, PolyLine2d, Polygon2d, SliceInfo) may expose internal representation by storing an externally mutable object into MapCrossSectionData.linkNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 50 | Medium |
org.opentrafficsim.editor.extensions.map.MapData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.extensions.map.MapData.getNode() may expose internal representation by returning MapData.node | MALICIOUS_CODE | EI_EXPOSE_REP | 51 | Medium |
| new org.opentrafficsim.editor.extensions.map.MapData(EditorMap, XsdTreeNode, OtsEditor) may expose internal representation by storing an externally mutable object into MapData.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
| new org.opentrafficsim.editor.extensions.map.MapData(EditorMap, XsdTreeNode, OtsEditor) may expose internal representation by storing an externally mutable object into MapData.map | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
| new org.opentrafficsim.editor.extensions.map.MapData(EditorMap, XsdTreeNode, OtsEditor) may expose internal representation by storing an externally mutable object into MapData.node | MALICIOUS_CODE | EI_EXPOSE_REP2 | 40 | Medium |
org.opentrafficsim.editor.extensions.map.MapLaneBasedObjectData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.extensions.map.MapLaneBasedObjectData at new org.opentrafficsim.editor.extensions.map.MapLaneBasedObjectData(EditorMap, XsdTreeNode, OtsEditor) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 80 | Medium |
| org.opentrafficsim.editor.extensions.map.MapLaneBasedObjectData.getLaneWidth() may expose internal representation by returning MapLaneBasedObjectData.laneWidth | MALICIOUS_CODE | EI_EXPOSE_REP | 142 | Medium |
org.opentrafficsim.editor.extensions.map.MapLinkData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.extensions.map.MapLinkData.getEventListenerMap() may expose internal representation by returning MapLinkData.eventListenerMap | MALICIOUS_CODE | EI_EXPOSE_REP | 674 | Medium |
org.opentrafficsim.editor.extensions.map.MapLinkData$ShapeListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception is caught when Exception is not thrown in org.opentrafficsim.editor.extensions.map.MapLinkData$ShapeListener.notify(Event) | STYLE | REC_CATCH_EXCEPTION | 874 | Medium |
| Switch statement found in org.opentrafficsim.editor.extensions.map.MapLinkData$ShapeListener.notify(Event) where default case is missing | STYLE | SF_SWITCH_NO_DEFAULT | 855-870 | Medium |
org.opentrafficsim.editor.extensions.map.MapNodeData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.extensions.map.MapNodeData at new org.opentrafficsim.editor.extensions.map.MapNodeData(EditorMap, XsdTreeNode, OtsEditor) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 69 | Medium |
org.opentrafficsim.editor.extensions.map.MapPriorityData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.extensions.map.MapPriorityData(MapLinkData) may expose internal representation by storing an externally mutable object into MapPriorityData.linkData | MALICIOUS_CODE | EI_EXPOSE_REP2 | 30 | Medium |
org.opentrafficsim.editor.extensions.map.MapShoulderData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.extensions.map.MapShoulderData(Length, XsdTreeNode, PolyLine2d, Polygon2d, SliceInfo) may expose internal representation by storing an externally mutable object into MapShoulderData.startOffset | MALICIOUS_CODE | EI_EXPOSE_REP2 | 36 | Medium |
org.opentrafficsim.editor.extensions.map.MapStripeData
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.extensions.map.MapStripeData.getWidth() may expose internal representation by returning MapStripeData.width | MALICIOUS_CODE | EI_EXPOSE_REP | 67 | Medium |
| new org.opentrafficsim.editor.extensions.map.MapStripeData(StripeAnimation$StripeData$Type, Length, Length, XsdTreeNode, PolyLine2d, Polygon2d, SliceInfo) may expose internal representation by storing an externally mutable object into MapStripeData.startOffset | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 | Medium |
| new org.opentrafficsim.editor.extensions.map.MapStripeData(StripeAnimation$StripeData$Type, Length, Length, XsdTreeNode, PolyLine2d, Polygon2d, SliceInfo) may expose internal representation by storing an externally mutable object into MapStripeData.width | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 | Medium |
org.opentrafficsim.editor.extensions.map.RoadLayoutListener$1
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception is caught when Exception is not thrown in org.opentrafficsim.editor.extensions.map.RoadLayoutListener$1.hasNext() | STYLE | REC_CATCH_EXCEPTION | 228 | Medium |
org.opentrafficsim.editor.listeners.AttributesListSelectionListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.listeners.AttributesListSelectionListener(OtsEditor, JTable) may expose internal representation by storing an externally mutable object into AttributesListSelectionListener.attributesTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 49 | Medium |
| new org.opentrafficsim.editor.listeners.AttributesListSelectionListener(OtsEditor, JTable) may expose internal representation by storing an externally mutable object into AttributesListSelectionListener.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 48 | Medium |
org.opentrafficsim.editor.listeners.AttributesMouseListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.listeners.AttributesMouseListener(OtsEditor, JTable) may expose internal representation by storing an externally mutable object into AttributesMouseListener.attributesTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
| new org.opentrafficsim.editor.listeners.AttributesMouseListener(OtsEditor, JTable) may expose internal representation by storing an externally mutable object into AttributesMouseListener.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 38 | Medium |
org.opentrafficsim.editor.listeners.ChangesListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.listeners.ChangesListener(OtsEditor, JComboBox) may expose internal representation by storing an externally mutable object into ChangesListener.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
| new org.opentrafficsim.editor.listeners.ChangesListener(OtsEditor, JComboBox) may expose internal representation by storing an externally mutable object into ChangesListener.scenario | MALICIOUS_CODE | EI_EXPOSE_REP2 | 57 | Medium |
org.opentrafficsim.editor.listeners.ChoiceListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.listeners.ChoiceListener(XsdTreeNode, XsdTreeNode, int, OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into ChoiceListener.attributesTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 60 | Medium |
| new org.opentrafficsim.editor.listeners.ChoiceListener(XsdTreeNode, XsdTreeNode, int, OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into ChoiceListener.choiceNode | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
| new org.opentrafficsim.editor.listeners.ChoiceListener(XsdTreeNode, XsdTreeNode, int, OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into ChoiceListener.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 58 | Medium |
| new org.opentrafficsim.editor.listeners.ChoiceListener(XsdTreeNode, XsdTreeNode, int, OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into ChoiceListener.option | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
| new org.opentrafficsim.editor.listeners.ChoiceListener(XsdTreeNode, XsdTreeNode, int, OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into ChoiceListener.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 59 | Medium |
org.opentrafficsim.editor.listeners.XsdTreeKeyListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.listeners.XsdTreeKeyListener(OtsEditor, JTreeTable) may expose internal representation by storing an externally mutable object into XsdTreeKeyListener.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 39 | Medium |
| new org.opentrafficsim.editor.listeners.XsdTreeKeyListener(OtsEditor, JTreeTable) may expose internal representation by storing an externally mutable object into XsdTreeKeyListener.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 40 | Medium |
org.opentrafficsim.editor.listeners.XsdTreeMouseListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.listeners.XsdTreeMouseListener(OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into XsdTreeMouseListener.attributesTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 57 | Medium |
| new org.opentrafficsim.editor.listeners.XsdTreeMouseListener(OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into XsdTreeMouseListener.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
| new org.opentrafficsim.editor.listeners.XsdTreeMouseListener(OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into XsdTreeMouseListener.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 56 | Medium |
org.opentrafficsim.editor.listeners.XsdTreeSelectionListener
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.listeners.XsdTreeSelectionListener(OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into XsdTreeSelectionListener.attributesTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 55 | Medium |
| new org.opentrafficsim.editor.listeners.XsdTreeSelectionListener(OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into XsdTreeSelectionListener.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 53 | Medium |
| new org.opentrafficsim.editor.listeners.XsdTreeSelectionListener(OtsEditor, JTreeTable, JTable) may expose internal representation by storing an externally mutable object into XsdTreeSelectionListener.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 54 | Medium |
org.opentrafficsim.editor.render.AttributeCellRenderer
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.render.AttributeCellRenderer.getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int) may expose internal representation by returning AttributeCellRenderer.checkBox | MALICIOUS_CODE | EI_EXPOSE_REP | 129 | Medium |
org.opentrafficsim.editor.render.AttributesCellEditor
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.opentrafficsim.editor.render.AttributesCellEditor.getTableCellEditorComponent(JTable, Object, boolean, int, int) may expose internal representation by returning AttributesCellEditor.checkBox | MALICIOUS_CODE | EI_EXPOSE_REP | 142 | Medium |
| new org.opentrafficsim.editor.render.AttributesCellEditor(JTable, OtsEditor) may expose internal representation by storing an externally mutable object into AttributesCellEditor.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 78 | Medium |
| org.opentrafficsim.editor.render.AttributesCellEditor$2 stored into non-transient field AttributesCellEditor.lastActionListener | BAD_PRACTICE | SE_BAD_FIELD_STORE | 127 | Medium |
org.opentrafficsim.editor.render.StringCellRenderer
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.opentrafficsim.editor.render.StringCellRenderer(JTreeTable) may expose internal representation by storing an externally mutable object into StringCellRenderer.treeTable | MALICIOUS_CODE | EI_EXPOSE_REP2 | 41 | Medium |
org.opentrafficsim.editor.render.XsdTreeCellRenderer
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.opentrafficsim.editor.render.XsdTreeCellRenderer at new org.opentrafficsim.editor.render.XsdTreeCellRenderer(OtsEditor) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 60 | Medium |
| new org.opentrafficsim.editor.render.XsdTreeCellRenderer(OtsEditor) may expose internal representation by storing an externally mutable object into XsdTreeCellRenderer.editor | MALICIOUS_CODE | EI_EXPOSE_REP2 | 59 | Medium |
| java.awt.image.BufferedImage stored into non-transient field XsdTreeCellRenderer.dropdown | BAD_PRACTICE | SE_BAD_FIELD_STORE | 64 | Medium |
