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
89 36 0 0

io.github.prolobjectlink.prolog.jtrolog.JTrologEngine

Bug Category Details Line Priority
Found reliance on default encoding in io.github.prolobjectlink.prolog.jtrolog.JTrologEngine.persist(String): new java.io.PrintWriter(String) I18N DM_DEFAULT_ENCODING 127 High

jTrolog.engine.ChoicePoint

Bug Category Details Line Priority
jTrolog.engine.ChoicePoint.toString() concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 114 Medium

jTrolog.engine.Engine

Bug Category Details Line Priority
jTrolog.engine.Engine.gc_data(int) concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 279 Medium

jTrolog.engine.Engine$StackIterator

Bug Category Details Line Priority
jTrolog.engine.Engine$StackIterator.next() can't throw NoSuchElementException BAD_PRACTICE IT_NO_SUCH_ELEMENT 246 Medium

jTrolog.engine.LibraryAndTheoryManager

Bug Category Details Line Priority
jTrolog.engine.LibraryAndTheoryManager.unconsultLib(Library) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 251 Medium

jTrolog.engine.OperatorTable

Bug Category Details Line Priority
jTrolog.engine.OperatorTable.addOperator(String, int, int) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead PERFORMANCE DM_NUMBER_CTOR 49 Medium

jTrolog.engine.Prolog

Bug Category Details Line Priority
Dead store to l in jTrolog.engine.Prolog.abolish(String) STYLE DLS_DEAD_LOCAL_STORE 202 Medium
Found reliance on default encoding in jTrolog.engine.Prolog.main(String[]): new java.io.InputStreamReader(InputStream) I18N DM_DEFAULT_ENCODING 144 High
Class jTrolog.engine.Prolog defines non-transient non-serializable instance field currentEngine BAD_PRACTICE SE_BAD_FIELD Not available High
Class jTrolog.engine.Prolog defines non-transient non-serializable instance field currentPS BAD_PRACTICE SE_BAD_FIELD Not available High

jTrolog.engine.Solution

Bug Category Details Line Priority
jTrolog.engine.Solution.bindingsToString() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 81 Medium

jTrolog.engine.SolutionManager

Bug Category Details Line Priority
jTrolog.engine.SolutionManager.replaceUnknownManInTheMiddle(HashMap) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 95 Medium
jTrolog.engine.SolutionManager.reverseAnyNullLinks(HashMap) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 62 Medium

jTrolog.lib.IOLibrary

Bug Category Details Line Priority
Found reliance on default encoding in jTrolog.lib.IOLibrary.print_1(BindingsTable, Term): String.getBytes() I18N DM_DEFAULT_ENCODING 206 High
Found reliance on default encoding in jTrolog.lib.IOLibrary.readStream(InputStream): new java.io.InputStreamReader(InputStream) I18N DM_DEFAULT_ENCODING 254 High
Found reliance on default encoding in jTrolog.lib.IOLibrary.text_from_file_2(BindingsTable, Term, Term): new java.io.FileReader(String) I18N DM_DEFAULT_ENCODING 227 High
Found reliance on default encoding in jTrolog.lib.IOLibrary.text_from_file_2(BindingsTable, Term, Term): new java.io.InputStreamReader(InputStream) I18N DM_DEFAULT_ENCODING 225 High
Found reliance on default encoding in jTrolog.lib.IOLibrary.write_1(BindingsTable, Term): String.getBytes() I18N DM_DEFAULT_ENCODING 200 High
jTrolog.lib.IOLibrary.see_1(BindingsTable, Term) may fail to clean up java.io.InputStream EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 89 Medium
jTrolog.lib.IOLibrary.tell_1(BindingsTable, Term) may fail to clean up java.io.OutputStream EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 124 Medium

jTrolog.parser.Parser

Bug Category Details Line Priority
Found reliance on default encoding in new jTrolog.parser.Parser(InputStream): new java.io.InputStreamReader(InputStream) I18N DM_DEFAULT_ENCODING 108 High
Found reliance on default encoding in new jTrolog.parser.Parser(InputStream, Prolog): new java.io.InputStreamReader(InputStream) I18N DM_DEFAULT_ENCODING 86 High

jTrolog.parser.Tokenizer

Bug Category Details Line Priority
Class jTrolog.parser.Tokenizer defines non-transient non-serializable instance field pushBack2 BAD_PRACTICE SE_BAD_FIELD Not available High
jTrolog.parser.Tokenizer is Serializable but its superclass doesn't define an accessible void constructor BAD_PRACTICE SE_NO_SUITABLE_CONSTRUCTOR 45-469 High

jTrolog.terms.Clause

Bug Category Details Line Priority
new jTrolog.terms.Clause(Struct[], Struct, Struct) may expose internal representation by storing an externally mutable object into Clause.tail MALICIOUS_CODE EI_EXPOSE_REP2 37 Medium

jTrolog.terms.Double

Bug Category Details Line Priority
jTrolog.terms.Double doesn't override Float.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

jTrolog.terms.Float

Bug Category Details Line Priority
jTrolog.terms.Float defines equals and uses Object.hashCode() BAD_PRACTICE HE_EQUALS_USE_HASHCODE 76-78 High

jTrolog.terms.Int

Bug Category Details Line Priority
jTrolog.terms.Int defines equals and uses Object.hashCode() BAD_PRACTICE HE_EQUALS_USE_HASHCODE 85-87 High

jTrolog.terms.Long

Bug Category Details Line Priority
jTrolog.terms.Long doesn't override Int.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

jTrolog.terms.Struct

Bug Category Details Line Priority
jTrolog.terms.Struct.getVarList() may expose internal representation by returning Struct.varList MALICIOUS_CODE EI_EXPOSE_REP 47 Medium
new jTrolog.terms.Struct(String, Term[]) may expose internal representation by storing an externally mutable object into Struct.args MALICIOUS_CODE EI_EXPOSE_REP2 70 Medium
jTrolog.terms.Struct defines equals and uses Object.hashCode() BAD_PRACTICE HE_EQUALS_USE_HASHCODE 192-205 High

jTrolog.terms.StructAtom

Bug Category Details Line Priority
jTrolog.terms.StructAtom overrides equals in Struct and may not be symmetric CORRECTNESS EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC 37 Medium
jTrolog.terms.StructAtom defines equals and uses Object.hashCode() BAD_PRACTICE HE_EQUALS_USE_HASHCODE 37 High

jTrolog.terms.WrapStruct

Bug Category Details Line Priority
jTrolog.terms.WrapStruct doesn't override Struct.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

jTrolog.terms.WrapVar

Bug Category Details Line Priority
jTrolog.terms.WrapVar overrides equals in Var and may not be symmetric CORRECTNESS EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC 42 Medium