FindBugs Report

Project Information

Project: <<unnamed project>>

FindBugs version: 1.3.1

Code analyzed:



Metrics

118703 lines of code analyzed, in 2976 classes, in 73 packages.

Metric Total Density*
High Priority Warnings 72 0.61
Medium Priority Warnings 529 4.46
Total Warnings 601 5.06

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



Contents

Summary

Warning Type Number
Bad practice Warnings 238
Correctness Warnings 27
Malicious code vulnerability Warnings 172
Multithreaded correctness Warnings 16
Performance Warnings 28
Dodgy Warnings 120
Total 601

Warnings

Click on a warning row to see full context information.

Bad practice Warnings

Code&nbsp; Warning
DE edu.rice.cs.drjava.model.compiler.CompilerErrorModel._calculatePositions() might ignore java.io.IOException
DE edu.rice.cs.drjava.model.repl.InteractionsModel.loadHistory(FileOpenSelector) might ignore edu.rice.cs.util.OperationCanceledException
DE edu.rice.cs.drjava.ui.AboutDialog$1.mouseClicked(MouseEvent) might ignore java.lang.Exception
DE edu.rice.cs.drjava.ui.AboutDialog$3.mouseClicked(MouseEvent) might ignore java.lang.Exception
DE edu.rice.cs.drjava.ui.BrowserHistoryPanel$BrowserHistoryListUserObj.toString() might ignore javax.swing.text.BadLocationException
DE edu.rice.cs.drjava.ui.MainFrame._warnFileOpen(File) might ignore java.io.IOException
DE edu.rice.cs.drjava.ui.PreviewFrame._updateActions() might ignore java.lang.Exception
DE edu.rice.cs.drjava.ui.PreviewFrame.showPage() might ignore java.awt.print.PrinterException
DE edu.rice.cs.drjava.ui.RegionsListPanel$RegionListUserObj.toString() might ignore javax.swing.text.BadLocationException
DE edu.rice.cs.drjava.ui.RegionsTreePanel$RegionTreeUserObj.toString() might ignore javax.swing.text.BadLocationException
DE edu.rice.cs.javalanglevels.LanguageLevelVisitor._getSymbolData_FromFileSystem(String, SourceInfo, boolean, boolean) might ignore java.io.IOException
Dm edu.rice.cs.drjava.model.AbstractGlobalModel.shutdown(boolean) invokes System.exit(...), which shuts down the entire virtual machine
Dm edu.rice.cs.drjava.ui.SimpleInteractionsWindow.close() invokes System.exit(...), which shuts down the entire virtual machine
Dm edu.rice.cs.util.newjvm.AbstractSlaveJVM.shutdown() invokes System.exit(...), which shuts down the entire virtual machine
Dm junit.awtui.TestRunner$2.actionPerformed(ActionEvent) invokes System.exit(...), which shuts down the entire virtual machine
Dm junit.awtui.TestRunner$9.actionPerformed(ActionEvent) invokes System.exit(...), which shuts down the entire virtual machine
Dm junit.swingui.TestRunner.terminate() invokes System.exit(...), which shuts down the entire virtual machine
Dm junit.textui.TestRunner.runFailed(String) invokes System.exit(...), which shuts down the entire virtual machine
DP edu.rice.cs.drjava.model.JarJDKToolsLibrary.makeFromFile(File, GlobalModel) creates a edu.rice.cs.plt.reflect.PathClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.drjava.model.JarJDKToolsLibrary.makeFromFile(File, GlobalModel) creates a edu.rice.cs.plt.reflect.PathClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.drjava.model.JarJDKToolsLibrary.makeFromFile(File, GlobalModel) creates a edu.rice.cs.plt.reflect.PreemptingClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.drjava.model.JarJDKToolsLibrary.makeFromFile(File, GlobalModel) creates a edu.rice.cs.plt.reflect.ShadowingClassLoader classloader, which should be performed within a doPrivileged block
DP new edu.rice.cs.drjava.model.junit.DrJavaTestSuiteLoader(JUnitModelCallback) creates a edu.rice.cs.drjava.model.junit.DrJavaTestCaseClassLoader classloader, which should be performed within a doPrivileged block
DP new edu.rice.cs.drjava.model.repl.newjvm.ClassPathManager() creates a edu.rice.cs.plt.reflect.PathClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.dynamicjava.interpreter.ExpressionChecker.visit(AnonymousAllocation) creates a edu.rice.cs.dynamicjava.interpreter.TreeClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.dynamicjava.interpreter.ExpressionChecker.visit(AnonymousInnerAllocation) creates a edu.rice.cs.dynamicjava.interpreter.TreeClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.dynamicjava.interpreter.StatementChecker.visit(ClassDeclaration) creates a edu.rice.cs.dynamicjava.interpreter.TreeClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.plt.reflect.PathClassLoader.findResource(String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.plt.reflect.PathClassLoader.findResources(String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.plt.reflect.ReflectUtil.loadLibraryAdapter(ClassLoader, Iterable, String, Class[], Object[]) creates a edu.rice.cs.plt.reflect.PathClassLoader classloader, which should be performed within a doPrivileged block
DP edu.rice.cs.plt.reflect.ReflectUtil.loadLibraryAdapter(ClassLoader, Iterable, String, Class[], Object[]) creates a edu.rice.cs.plt.reflect.PreemptingClassLoader classloader, which should be performed within a doPrivileged block
DP new junit.runner.LoadingTestCollector() creates a junit.runner.TestCaseClassLoader classloader, which should be performed within a doPrivileged block
DP junit.runner.ReloadingTestSuiteLoader.createLoader() creates a junit.runner.TestCaseClassLoader classloader, which should be performed within a doPrivileged block
Eq edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc defines compareTo(Object) and uses Object.equals()
Eq edu.rice.cs.drjava.model.compiler.CompilerError defines compareTo(Object) and uses Object.equals()
Eq edu.rice.cs.drjava.model.DummyOpenDefDoc defines compareTo(Object) and uses Object.equals()
Eq edu.rice.cs.drjava.ui.config.KeyStrokeOptionComponent defines compareTo(Object) and uses Object.equals()
Eq net.java.plaf.Environment$JavaVersion defines compareTo(Object) and uses Object.equals()
ES Comparison of String parameter using == or != in edu.rice.cs.drjava.model.definitions.reducedmodel.Brace.findBrace(String)
ES Comparison of String objects using == or != in edu.rice.cs.javalanglevels.tree.ModifiersAndVisibility.equals(Object)
ES Comparison of String objects using == or != in edu.rice.cs.javalanglevels.tree.PrimitiveType.equals(Object)
ES Comparison of String objects using == or != in edu.rice.cs.javalanglevels.tree.StringLiteral.equals(Object)
ES Comparison of String objects using == or != in edu.rice.cs.javalanglevels.tree.TypeVariable.equals(Object)
ES Comparison of String objects using == or != in edu.rice.cs.javalanglevels.tree.VoidReturn.equals(Object)
ES Comparison of String objects using == or != in edu.rice.cs.javalanglevels.tree.Word.equals(Object)
ES Comparison of String parameter using == or != in net.java.plaf.windows.xp.DefaultTreeCellRenderer.firePropertyChange(String, Object, Object)
HE edu.rice.cs.dynamicjava.symbol.TypeSystem$TypeWrapper defines equals and uses Object.hashCode()
HE edu.rice.cs.plt.tuple.Octet defines equals but not hashCode
HE edu.rice.cs.plt.tuple.Pair defines equals but not hashCode
HE edu.rice.cs.plt.tuple.Quad defines equals but not hashCode
HE edu.rice.cs.plt.tuple.Quint defines equals but not hashCode
HE edu.rice.cs.plt.tuple.Septet defines equals but not hashCode
HE edu.rice.cs.plt.tuple.Sextet defines equals but not hashCode
HE edu.rice.cs.plt.tuple.Triple defines equals but not hashCode
HE edu.rice.cs.plt.tuple.Wrapper defines equals but not hashCode
HE koala.dynamicjava.interpreter.TypeUtil$1 inherits equals and uses Object.hashCode()
HE koala.dynamicjava.interpreter.TypeUtil$2 inherits equals and uses Object.hashCode()
HE koala.dynamicjava.interpreter.TypeUtil$3 inherits equals and uses Object.hashCode()
HE koala.dynamicjava.interpreter.TypeUtil$4 inherits equals and uses Object.hashCode()
HE koala.dynamicjava.parser.impl.Parser$CompileTimeQualifiedName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.parser.impl.Parser$CompileTimeSuperExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.AddAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.AddExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.AmbiguousName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.AndExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.AnonymousAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.AnonymousInnerAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ArrayAccess inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ArrayAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ArrayInitializer inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ArrayTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.AssertStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BitAndAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BitAndExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BitOrAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BitOrExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BlockStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BooleanLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BooleanTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.BreakStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ByteTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.CastExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.CatchStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.CharacterLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.CharTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ClassDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ClassInitializer inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ComplementExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ConditionalExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ConstructorCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ConstructorDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ContinueStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.DivideAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.DivideExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.DoStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.DoubleLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.DoubleTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.EmptyStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.EnumDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.EqualExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ExclusiveOrAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ExclusiveOrExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.FieldDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.FloatLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.FloatTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ForEachStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.FormalParameter inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ForStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.GreaterExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.GreaterOrEqualExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.IfThenElseStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.IfThenStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ImportDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.InnerAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.InstanceInitializer inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.InstanceOfExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.IntegerLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.InterfaceDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.IntTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.LabeledStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.LessExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.LessOrEqualExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.LongLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.LongTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.MethodDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.MinusExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.MultiplyAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.MultiplyExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.Node defines equals and uses Object.hashCode()
HE koala.dynamicjava.tree.NotEqualExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.NotExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.NullLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ObjectFieldAccess inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ObjectMethodCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.OrExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.PackageDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.PlusExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.PostDecrement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.PostIncrement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.PreDecrement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.PreIncrement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ReferenceTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.RemainderAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.RemainderExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ReturnStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ShiftLeftAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ShiftLeftExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ShiftRightAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ShiftRightExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ShortTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SimpleAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SimpleAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SimpleFieldAccess inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SimpleMethodCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.StaticFieldAccess inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.StaticMethodCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.StringLiteral inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SubtractAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SubtractExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SuperFieldAccess inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SuperMethodCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SwitchBlock inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SwitchStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.SynchronizedStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ThisExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.ThrowStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.GenericClassDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.GenericInterfaceDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.GenericReferenceTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.HookTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicAnonymousAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicAnonymousInnerAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicConstructorDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicInnerAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicMethodDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicObjectMethodCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicSimpleAllocation inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicStaticMethodCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.PolymorphicSuperMethodCall inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.tiger.TypeParameter inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.TryStatement inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.TypeExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.UnsignedShiftRightAssignExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.UnsignedShiftRightExpression inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.VariableAccess inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.VariableDeclaration inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.VoidTypeName inherits equals and uses Object.hashCode()
HE koala.dynamicjava.tree.WhileStatement inherits equals and uses Object.hashCode()
HE org.apache.bcel.generic.ArrayType defines equals and uses Object.hashCode()
HE org.apache.bcel.generic.BasicType defines equals and uses Object.hashCode()
IC Initialization of edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates accesses class edu.rice.cs.drjava.model.definitions.reducedmodel.Free, which isn't initialized yet
IC Initialization of edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates accesses class edu.rice.cs.drjava.model.definitions.reducedmodel.InsideBlockComment, which isn't initialized yet
IC Initialization of edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates accesses class edu.rice.cs.drjava.model.definitions.reducedmodel.InsideDoubleQuote, which isn't initialized yet
IC Initialization of edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates accesses class edu.rice.cs.drjava.model.definitions.reducedmodel.InsideLineComment, which isn't initialized yet
IC Initialization of edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates accesses class edu.rice.cs.drjava.model.definitions.reducedmodel.InsideSingleQuote, which isn't initialized yet
IC Initialization of edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates accesses class edu.rice.cs.drjava.model.definitions.reducedmodel.Stutter, which isn't initialized yet
NP edu.rice.cs.dynamicjava.symbol.ExtendedTypeSystem$11.defaultCase(Type) has Boolean return type and returns explicit null
NP edu.rice.cs.dynamicjava.symbol.ExtendedTypeSystem$11$1.forIntersectionType(IntersectionType) has Boolean return type and returns explicit null
NP edu.rice.cs.dynamicjava.symbol.ExtendedTypeSystem$11$1.forVariableType(VariableType) has Boolean return type and returns explicit null
NP edu.rice.cs.dynamicjava.symbol.ExtendedTypeSystem$11$3.forUnionType(UnionType) has Boolean return type and returns explicit null
NP edu.rice.cs.dynamicjava.symbol.ExtendedTypeSystem$11$3.forVariableType(VariableType) has Boolean return type and returns explicit null
NP edu.rice.cs.dynamicjava.symbol.JavaClass.equals(Object) does not check for null argument
NP edu.rice.cs.dynamicjava.symbol.TreeClass.equals(Object) does not check for null argument
NP edu.rice.cs.plt.iter.SequenceIterable.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentityOctet.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentityPair.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentityQuad.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentityQuint.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentitySeptet.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentitySextet.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentityTriple.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.IdentityWrapper.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Octet.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Pair.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Quad.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Quint.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Septet.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Sextet.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Triple.equals(Object) does not check for null argument
NP edu.rice.cs.plt.tuple.Wrapper.equals(Object) does not check for null argument
NP koala.dynamicjava.tree.Node.equals(Object) does not check for null argument
OS junit.runner.BaseTestRunner.readPreferences() may fail to close stream
RV edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.saveFileAs(FileSaveSelector) ignores exceptional return value of java.io.File.renameTo(File)
RV edu.rice.cs.drjava.model.AbstractGlobalModel$ProjectFileGroupingState.getClassFiles() ignores exceptional return value of java.io.File.mkdirs()
RV edu.rice.cs.drjava.ui.JarOptionsDialog$10.construct() ignores exceptional return value of java.io.File.createNewFile()
RV edu.rice.cs.drjava.ui.JarOptionsDialog$10.construct() ignores exceptional return value of java.io.File.delete()
RV edu.rice.cs.drjava.ui.MainFrame._rename() ignores exceptional return value of java.io.File.delete()
RV edu.rice.cs.util.FileOps.renameFile(File, File) ignores exceptional return value of java.io.File.delete()
RV edu.rice.cs.util.FileOps.saveFile(FileOps$FileSaver) ignores exceptional return value of java.io.File.delete()
RV org.apache.bcel.classfile.JavaClass.dump(File) ignores exceptional return value of java.io.File.mkdirs()
SnVI com.rc.retroweaver.runtime.Enum_ is Serializable; consider declaring a serialVersionUID
SnVI edu.rice.cs.plt.reflect.ReflectUtil$FieldBox is Serializable; consider declaring a serialVersionUID
SnVI net.java.plaf.util.FlexibleImageIcon is Serializable; consider declaring a serialVersionUID
SnVI net.java.plaf.windows.WindowsLookAndFeel is Serializable; consider declaring a serialVersionUID
SnVI org.apache.bcel.classfile.JavaClass is Serializable; consider declaring a serialVersionUID
SnVI org.apache.bcel.util.ClassPath$Dir is Serializable; consider declaring a serialVersionUID
SnVI org.apache.bcel.util.ClassPath$Zip is Serializable; consider declaring a serialVersionUID
UI Usage of GetResource in junit.runner.TestCaseClassLoader.readExcludedPackages() may be unsafe if class is extended

Correctness Warnings

Code&nbsp; Warning
BC Impossible cast from koala.dynamicjava.tree.tiger.GenericInterfaceDeclaration to koala.dynamicjava.tree.tiger.GenericClassDeclaration in edu.rice.cs.dynamicjava.interpreter.TreeCompiler.compileClass(Node)
DMI Invocation of toString on an array in edu.rice.cs.javalanglevels.VariableData.toString()
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(byte[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(char[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(double[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(float[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(int[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(long[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(Object[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(short[], RecurUtil$ArrayStringMode)
DMI Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(boolean[], RecurUtil$ArrayStringMode)
Eq edu.rice.cs.drjava.ui.BreakpointsPanel$BreakpointRegionTreeUserObj overrides equals in RegionsTreePanel$RegionTreeUserObj and may not be symmetric
Eq edu.rice.cs.drjava.ui.BrowserHistoryPanel$BrowserHistoryListUserObj overrides equals in RegionsListPanel$RegionListUserObj and may not be symmetric
Eq edu.rice.cs.drjava.ui.FindResultsPanel$FindResultsRegionTreeUserObj overrides equals in RegionsTreePanel$RegionTreeUserObj and may not be symmetric
MF Field XPTabbedPaneUI.propertyChangeListener masks field in superclass javax.swing.plaf.basic.BasicTabbedPaneUI
NP Possible null pointer dereference of image in edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc$2.make()
NP Possible null pointer dereference of MovingDocumentRegion._doc in edu.rice.cs.drjava.model.MovingDocumentRegion.equals(Object)
NP Possible null pointer dereference of MovingDocumentRegion._file in edu.rice.cs.drjava.model.MovingDocumentRegion.equals(Object)
NP Method call in edu.rice.cs.drjava.project.ProjectFileParser.evaluateExpression(SEList, ProjectFileIR, ProjectFileParser$DocFileListVisitor) passes null for unconditionally dereferenced parameter of ProjectFileIR.setProjectRoot(File)
NP Method call in edu.rice.cs.drjava.project.ProjectFileParser.evaluateExpression(SEList, ProjectFileIR, ProjectFileParser$DocFileListVisitor) passes null for unconditionally dereferenced parameter of ProjectFileIR.setWorkingDirectory(File)
NP Possible null pointer dereference of attributes in new org.apache.bcel.classfile.JavaClass(int, int, String, int, int, int, ConstantPool, int[], Field[], Method[], Attribute[], byte)
RCN Nullcheck of ProjectProfile._projectRoot at line 221 of value previously dereferenced in edu.rice.cs.drjava.project.ProjectProfile.write()
RCN Nullcheck of children at line 104 of value previously dereferenced in net.java.plaf.windows.common.ButtonBarLayout.layoutContainer(Container)
UMAC Uncallable method edu.rice.cs.drjava.model.AbstractGlobalModel$1.changeRegionHelper(Breakpoint, Breakpoint) defined in anonymous class
UMAC Uncallable method edu.rice.cs.util.FileOps$2.getDescription() defined in anonymous class
UMAC Uncallable method edu.rice.cs.util.FileOps$3.getDescription() defined in anonymous class
UwF Unwritten field: edu.rice.cs.drjava.ui.DebugPanel.dtcr

Malicious code vulnerability Warnings

Code&nbsp; Warning
EI edu.rice.cs.drjava.model.AlreadyOpenException.getOpenDocuments() may expose internal representation by returning AlreadyOpenException._openDocs
EI edu.rice.cs.javalanglevels.MethodData.getParams() may expose internal representation by returning MethodData._params
EI edu.rice.cs.javalanglevels.MethodData.getThrown() may expose internal representation by returning MethodData._thrown
EI edu.rice.cs.javalanglevels.MethodData.getTypeParameters() may expose internal representation by returning MethodData._typeParameters
EI edu.rice.cs.javalanglevels.SymbolData.getTypeParameters() may expose internal representation by returning SymbolData._typeParameters
EI edu.rice.cs.javalanglevels.tree.ArrayInitializer.getItems() may expose internal representation by returning ArrayInitializer._items
EI edu.rice.cs.javalanglevels.tree.Body.getStatements() may expose internal representation by returning Body._statements
EI edu.rice.cs.javalanglevels.tree.ClassOrInterfaceType.getTypeArguments() may expose internal representation by returning ClassOrInterfaceType._typeArguments
EI edu.rice.cs.javalanglevels.tree.CompoundWord.getWords() may expose internal representation by returning CompoundWord._words
EI edu.rice.cs.javalanglevels.tree.ConstructorDef.getParameters() may expose internal representation by returning ConstructorDef._parameters
EI edu.rice.cs.javalanglevels.tree.ConstructorDef.getThrows() may expose internal representation by returning ConstructorDef._throws
EI edu.rice.cs.javalanglevels.tree.ExpressionList.getExpressions() may expose internal representation by returning ExpressionList._expressions
EI edu.rice.cs.javalanglevels.tree.MethodDef.getParams() may expose internal representation by returning MethodDef._params
EI edu.rice.cs.javalanglevels.tree.MethodDef.getThrows() may expose internal representation by returning MethodDef._throws
EI edu.rice.cs.javalanglevels.tree.MethodDef.getTypeParams() may expose internal representation by returning MethodDef._typeParams
EI edu.rice.cs.javalanglevels.tree.ModifiersAndVisibility.getModifiers() may expose internal representation by returning ModifiersAndVisibility._modifiers
EI edu.rice.cs.javalanglevels.tree.SourceFile.getImportStatements() may expose internal representation by returning SourceFile._importStatements
EI edu.rice.cs.javalanglevels.tree.SourceFile.getPackageStatements() may expose internal representation by returning SourceFile._packageStatements
EI edu.rice.cs.javalanglevels.tree.SourceFile.getTypes() may expose internal representation by returning SourceFile._types
EI edu.rice.cs.javalanglevels.tree.SwitchStatement.getCases() may expose internal representation by returning SwitchStatement._cases
EI edu.rice.cs.javalanglevels.tree.TryCatchStatement.getCatchBlocks() may expose internal representation by returning TryCatchStatement._catchBlocks
EI edu.rice.cs.javalanglevels.tree.TypeDefBase.getInterfaces() may expose internal representation by returning TypeDefBase._interfaces
EI edu.rice.cs.javalanglevels.tree.TypeDefBase.getTypeParameters() may expose internal representation by returning TypeDefBase._typeParameters
EI edu.rice.cs.javalanglevels.tree.VariableDeclaration.getDeclarators() may expose internal representation by returning VariableDeclaration._declarators
EI edu.rice.cs.util.swing.FileSelectionEvent.getFiles() may expose internal representation by returning FileSelectionEvent._changed
EI edu.rice.cs.util.swing.LayeredIcon.getLayers() may expose internal representation by returning LayeredIcon._layers
EI edu.rice.cs.util.swing.LayeredIcon.getXOffsets() may expose internal representation by returning LayeredIcon._xoffs
EI edu.rice.cs.util.swing.LayeredIcon.getYOffsets() may expose internal representation by returning LayeredIcon._xoffs
EI koala.dynamicjava.tree.tiger.GenericClassDeclaration.getTypeParameters() may expose internal representation by returning GenericClassDeclaration._typeParameters
EI koala.dynamicjava.tree.tiger.GenericInterfaceDeclaration.getTypeParameters() may expose internal representation by returning GenericInterfaceDeclaration._typeParameters
EI koala.dynamicjava.tree.tiger.PolymorphicConstructorDeclaration.getTypeParameters() may expose internal representation by returning PolymorphicConstructorDeclaration._typeParameters
EI koala.dynamicjava.tree.tiger.PolymorphicMethodDeclaration.getTypeParameters() may expose internal representation by returning PolymorphicMethodDeclaration._typeParameters
EI org.apache.bcel.classfile.Code.getAttributes() may expose internal representation by returning Code.attributes
EI org.apache.bcel.classfile.Code.getCode() may expose internal representation by returning Code.code
EI org.apache.bcel.classfile.Code.getExceptionTable() may expose internal representation by returning Code.exception_table
EI org.apache.bcel.classfile.ConstantPool.getConstantPool() may expose internal representation by returning ConstantPool.constant_pool
EI org.apache.bcel.classfile.Deprecated.getBytes() may expose internal representation by returning Deprecated.bytes
EI org.apache.bcel.classfile.ExceptionTable.getExceptionIndexTable() may expose internal representation by returning ExceptionTable.exception_index_table
EI org.apache.bcel.classfile.FieldOrMethod.getAttributes() may expose internal representation by returning FieldOrMethod.attributes
EI org.apache.bcel.classfile.InnerClasses.getInnerClasses() may expose internal representation by returning InnerClasses.inner_classes
EI org.apache.bcel.classfile.JavaClass.getAttributes() may expose internal representation by returning JavaClass.attributes
EI org.apache.bcel.classfile.JavaClass.getFields() may expose internal representation by returning JavaClass.fields
EI org.apache.bcel.classfile.JavaClass.getInterfaceIndices() may expose internal representation by returning JavaClass.interfaces
EI org.apache.bcel.classfile.JavaClass.getInterfaceNames() may expose internal representation by returning JavaClass.interface_names
EI org.apache.bcel.classfile.JavaClass.getMethods() may expose internal representation by returning JavaClass.methods
EI org.apache.bcel.classfile.LineNumberTable.getLineNumberTable() may expose internal representation by returning LineNumberTable.line_number_table
EI org.apache.bcel.classfile.LocalVariableTable.getLocalVariableTable() may expose internal representation by returning LocalVariableTable.local_variable_table
EI org.apache.bcel.classfile.StackMap.getStackMap() may expose internal representation by returning StackMap.map
EI org.apache.bcel.classfile.StackMapEntry.getTypesOfLocals() may expose internal representation by returning StackMapEntry.types_of_locals
EI org.apache.bcel.classfile.StackMapEntry.getTypesOfStackItems() may expose internal representation by returning StackMapEntry.types_of_stack_items
EI org.apache.bcel.classfile.Synthetic.getBytes() may expose internal representation by returning Synthetic.bytes
EI org.apache.bcel.classfile.Unknown.getBytes() may expose internal representation by returning Unknown.bytes
EI2 new edu.rice.cs.drjava.model.AlreadyOpenException(OpenDefinitionsDocument[]) may expose internal representation by storing an externally mutable object into AlreadyOpenException._openDocs
EI2 new edu.rice.cs.drjava.model.compiler.CompilerErrorModel(CompilerError[], GlobalModel) may expose internal representation by storing an externally mutable object into CompilerErrorModel._errors
EI2 new edu.rice.cs.drjava.model.definitions.indent.QuestionHasCharPrecedingOpenBrace(char[], IndentRule, IndentRule) may expose internal representation by storing an externally mutable object into QuestionHasCharPrecedingOpenBrace._prefix
EI2 edu.rice.cs.drjava.ui.CompilerErrorPanel.reset(File[]) may expose internal representation by storing an externally mutable object into CompilerErrorPanel._excludedFiles
EI2 new edu.rice.cs.javalanglevels.MethodData(String, ModifiersAndVisibility, TypeParameter[], SymbolData, VariableData[], String[], SymbolData, JExpression) may expose internal representation by storing an externally mutable object into MethodData._params
EI2 new edu.rice.cs.javalanglevels.MethodData(String, ModifiersAndVisibility, TypeParameter[], SymbolData, VariableData[], String[], SymbolData, JExpression) may expose internal representation by storing an externally mutable object into MethodData._thrown
EI2 new edu.rice.cs.javalanglevels.MethodData(String, ModifiersAndVisibility, TypeParameter[], SymbolData, VariableData[], String[], SymbolData, JExpression) may expose internal representation by storing an externally mutable object into MethodData._typeParameters
EI2 edu.rice.cs.javalanglevels.MethodData.setParams(VariableData[]) may expose internal representation by storing an externally mutable object into MethodData._params
EI2 edu.rice.cs.javalanglevels.MethodData.setThrown(String[]) may expose internal representation by storing an externally mutable object into MethodData._thrown
EI2 new edu.rice.cs.javalanglevels.parser.ParseException(Token, int[][], String[]) may expose internal representation by storing an externally mutable object into ParseException.expectedTokenSequences
EI2 new edu.rice.cs.javalanglevels.parser.ParseException(Token, int[][], String[]) may expose internal representation by storing an externally mutable object into ParseException.tokenImage
EI2 new edu.rice.cs.javalanglevels.SymbolData(String, ModifiersAndVisibility, TypeParameter[], SymbolData, LinkedList, Data) may expose internal representation by storing an externally mutable object into SymbolData._typeParameters
EI2 edu.rice.cs.javalanglevels.SymbolData.setTypeParameters(TypeParameter[]) may expose internal representation by storing an externally mutable object into SymbolData._typeParameters
EI2 new edu.rice.cs.javalanglevels.tree.ArrayInitializer(SourceInfo, VariableInitializerI[]) may expose internal representation by storing an externally mutable object into ArrayInitializer._items
EI2 new edu.rice.cs.javalanglevels.tree.Body(SourceInfo, BodyItemI[]) may expose internal representation by storing an externally mutable object into Body._statements
EI2 new edu.rice.cs.javalanglevels.tree.ClassOrInterfaceType(SourceInfo, String, Type[]) may expose internal representation by storing an externally mutable object into ClassOrInterfaceType._typeArguments
EI2 new edu.rice.cs.javalanglevels.tree.CompoundWord(SourceInfo, Word[]) may expose internal representation by storing an externally mutable object into CompoundWord._words
EI2 new edu.rice.cs.javalanglevels.tree.ConstructorDef(SourceInfo, Word, ModifiersAndVisibility, FormalParameter[], ReferenceType[], BracedBody) may expose internal representation by storing an externally mutable object into ConstructorDef._parameters
EI2 new edu.rice.cs.javalanglevels.tree.ConstructorDef(SourceInfo, Word, ModifiersAndVisibility, FormalParameter[], ReferenceType[], BracedBody) may expose internal representation by storing an externally mutable object into ConstructorDef._throws
EI2 new edu.rice.cs.javalanglevels.tree.ExpressionList(SourceInfo, Expression[]) may expose internal representation by storing an externally mutable object into ExpressionList._expressions
EI2 new edu.rice.cs.javalanglevels.tree.MethodDef(SourceInfo, ModifiersAndVisibility, TypeParameter[], ReturnTypeI, Word, FormalParameter[], ReferenceType[]) may expose internal representation by storing an externally mutable object into MethodDef._params
EI2 new edu.rice.cs.javalanglevels.tree.MethodDef(SourceInfo, ModifiersAndVisibility, TypeParameter[], ReturnTypeI, Word, FormalParameter[], ReferenceType[]) may expose internal representation by storing an externally mutable object into MethodDef._throws
EI2 new edu.rice.cs.javalanglevels.tree.MethodDef(SourceInfo, ModifiersAndVisibility, TypeParameter[], ReturnTypeI, Word, FormalParameter[], ReferenceType[]) may expose internal representation by storing an externally mutable object into MethodDef._typeParams
EI2 new edu.rice.cs.javalanglevels.tree.ModifiersAndVisibility(SourceInfo, String[]) may expose internal representation by storing an externally mutable object into ModifiersAndVisibility._modifiers
EI2 new edu.rice.cs.javalanglevels.tree.SourceFile(SourceInfo, PackageStatement[], ImportStatement[], TypeDefBase[]) may expose internal representation by storing an externally mutable object into SourceFile._importStatements
EI2 new edu.rice.cs.javalanglevels.tree.SourceFile(SourceInfo, PackageStatement[], ImportStatement[], TypeDefBase[]) may expose internal representation by storing an externally mutable object into SourceFile._packageStatements
EI2 new edu.rice.cs.javalanglevels.tree.SourceFile(SourceInfo, PackageStatement[], ImportStatement[], TypeDefBase[]) may expose internal representation by storing an externally mutable object into SourceFile._types
EI2 new edu.rice.cs.javalanglevels.tree.SwitchStatement(SourceInfo, Expression, SwitchCase[]) may expose internal representation by storing an externally mutable object into SwitchStatement._cases
EI2 new edu.rice.cs.javalanglevels.tree.TryCatchStatement(SourceInfo, Block, CatchBlock[]) may expose internal representation by storing an externally mutable object into TryCatchStatement._catchBlocks
EI2 new edu.rice.cs.javalanglevels.tree.TypeDefBase(SourceInfo, ModifiersAndVisibility, Word, TypeParameter[], ReferenceType[], BracedBody) may expose internal representation by storing an externally mutable object into TypeDefBase._interfaces
EI2 new edu.rice.cs.javalanglevels.tree.TypeDefBase(SourceInfo, ModifiersAndVisibility, Word, TypeParameter[], ReferenceType[], BracedBody) may expose internal representation by storing an externally mutable object into TypeDefBase._typeParameters
EI2 new edu.rice.cs.javalanglevels.tree.VariableDeclaration(SourceInfo, ModifiersAndVisibility, VariableDeclarator[]) may expose internal representation by storing an externally mutable object into VariableDeclaration._declarators
EI2 new edu.rice.cs.util.swing.FileSelectionEvent(Object, File[], boolean[], File, File) may expose internal representation by storing an externally mutable object into FileSelectionEvent._areNew
EI2 new edu.rice.cs.util.swing.FileSelectionEvent(Object, File[], boolean[], File, File) may expose internal representation by storing an externally mutable object into FileSelectionEvent._changed
EI2 new edu.rice.cs.util.swing.LayeredIcon(Icon[], int[], int[]) may expose internal representation by storing an externally mutable object into LayeredIcon._layers
EI2 new edu.rice.cs.util.swing.LayeredIcon(Icon[], int[], int[]) may expose internal representation by storing an externally mutable object into LayeredIcon._xoffs
EI2 new edu.rice.cs.util.swing.LayeredIcon(Icon[], int[], int[]) may expose internal representation by storing an externally mutable object into LayeredIcon._yoffs
EI2 new koala.dynamicjava.parser.impl.ParseException(Token, int[][], String[]) may expose internal representation by storing an externally mutable object into ParseException.expectedTokenSequences
EI2 new koala.dynamicjava.parser.impl.ParseException(Token, int[][], String[]) may expose internal representation by storing an externally mutable object into ParseException.tokenImage
EI2 new koala.dynamicjava.tree.tiger.GenericClassDeclaration(int, String, ReferenceTypeName, List, List, String, int, int, int, int, TypeParameter[]) may expose internal representation by storing an externally mutable object into GenericClassDeclaration._typeParameters
EI2 new koala.dynamicjava.tree.tiger.GenericInterfaceDeclaration(int, String, List, List, String, int, int, int, int, TypeParameter[]) may expose internal representation by storing an externally mutable object into GenericInterfaceDeclaration._typeParameters
EI2 new koala.dynamicjava.tree.tiger.PolymorphicConstructorDeclaration(int, String, List, List, ConstructorCall, List, String, int, int, int, int, TypeParameter[]) may expose internal representation by storing an externally mutable object into PolymorphicConstructorDeclaration._typeParameters
EI2 new koala.dynamicjava.tree.tiger.PolymorphicMethodDeclaration(int, TypeName, String, List, List, BlockStatement, String, int, int, int, int, TypeParameter[]) may expose internal representation by storing an externally mutable object into PolymorphicMethodDeclaration._typeParameters
EI2 org.apache.bcel.classfile.Code.setAttributes(Attribute[]) may expose internal representation by storing an externally mutable object into Code.attributes
EI2 org.apache.bcel.classfile.Code.setCode(byte[]) may expose internal representation by storing an externally mutable object into Code.code
EI2 org.apache.bcel.classfile.Code.setExceptionTable(CodeException[]) may expose internal representation by storing an externally mutable object into Code.exception_table
EI2 org.apache.bcel.classfile.ConstantPool.setConstantPool(Constant[]) may expose internal representation by storing an externally mutable object into ConstantPool.constant_pool
EI2 new org.apache.bcel.classfile.Deprecated(int, int, byte[], ConstantPool) may expose internal representation by storing an externally mutable object into Deprecated.bytes
EI2 org.apache.bcel.classfile.Deprecated.setBytes(byte[]) may expose internal representation by storing an externally mutable object into Deprecated.bytes
EI2 org.apache.bcel.classfile.ExceptionTable.setExceptionIndexTable(int[]) may expose internal representation by storing an externally mutable object into ExceptionTable.exception_index_table
EI2 org.apache.bcel.classfile.FieldOrMethod.setAttributes(Attribute[]) may expose internal representation by storing an externally mutable object into FieldOrMethod.attributes
EI2 org.apache.bcel.classfile.InnerClasses.setInnerClasses(InnerClass[]) may expose internal representation by storing an externally mutable object into InnerClasses.inner_classes
EI2 new org.apache.bcel.classfile.JavaClass(int, int, String, int, int, int, ConstantPool, int[], Field[], Method[], Attribute[], byte) may expose internal representation by storing an externally mutable object into JavaClass.attributes
EI2 new org.apache.bcel.classfile.JavaClass(int, int, String, int, int, int, ConstantPool, int[], Field[], Method[], Attribute[], byte) may expose internal representation by storing an externally mutable object into JavaClass.fields
EI2 new org.apache.bcel.classfile.JavaClass(int, int, String, int, int, int, ConstantPool, int[], Field[], Method[], Attribute[], byte) may expose internal representation by storing an externally mutable object into JavaClass.interfaces
EI2 new org.apache.bcel.classfile.JavaClass(int, int, String, int, int, int, ConstantPool, int[], Field[], Method[], Attribute[], byte) may expose internal representation by storing an externally mutable object into JavaClass.methods
EI2 org.apache.bcel.classfile.JavaClass.setAttributes(Attribute[]) may expose internal representation by storing an externally mutable object into JavaClass.attributes
EI2 org.apache.bcel.classfile.JavaClass.setFields(Field[]) may expose internal representation by storing an externally mutable object into JavaClass.fields
EI2 org.apache.bcel.classfile.JavaClass.setInterfaceNames(String[]) may expose internal representation by storing an externally mutable object into JavaClass.interface_names
EI2 org.apache.bcel.classfile.JavaClass.setInterfaces(int[]) may expose internal representation by storing an externally mutable object into JavaClass.interfaces
EI2 org.apache.bcel.classfile.JavaClass.setMethods(Method[]) may expose internal representation by storing an externally mutable object into JavaClass.methods
EI2 org.apache.bcel.classfile.LineNumberTable.setLineNumberTable(LineNumber[]) may expose internal representation by storing an externally mutable object into LineNumberTable.line_number_table
EI2 org.apache.bcel.classfile.LocalVariableTable.setLocalVariableTable(LocalVariable[]) may expose internal representation by storing an externally mutable object into LocalVariableTable.local_variable_table
EI2 org.apache.bcel.classfile.StackMap.setStackMap(StackMapEntry[]) may expose internal representation by storing an externally mutable object into StackMap.map
EI2 new org.apache.bcel.classfile.StackMapEntry(int, int, StackMapType[], int, StackMapType[], ConstantPool) may expose internal representation by storing an externally mutable object into StackMapEntry.types_of_locals
EI2 new org.apache.bcel.classfile.StackMapEntry(int, int, StackMapType[], int, StackMapType[], ConstantPool) may expose internal representation by storing an externally mutable object into StackMapEntry.types_of_stack_items
EI2 org.apache.bcel.classfile.StackMapEntry.setTypesOfLocals(StackMapType[]) may expose internal representation by storing an externally mutable object into StackMapEntry.types_of_locals
EI2 org.apache.bcel.classfile.StackMapEntry.setTypesOfStackItems(StackMapType[]) may expose internal representation by storing an externally mutable object into StackMapEntry.types_of_stack_items
EI2 new org.apache.bcel.classfile.Synthetic(int, int, byte[], ConstantPool) may expose internal representation by storing an externally mutable object into Synthetic.bytes
EI2 org.apache.bcel.classfile.Synthetic.setBytes(byte[]) may expose internal representation by storing an externally mutable object into Synthetic.bytes
EI2 new org.apache.bcel.classfile.Unknown(int, int, byte[], ConstantPool) may expose internal representation by storing an externally mutable object into Unknown.bytes
EI2 org.apache.bcel.classfile.Unknown.setBytes(byte[]) may expose internal representation by storing an externally mutable object into Unknown.bytes
EI2 new org.objectweb.asm.ClassReader(byte[], int, int) may expose internal representation by storing an externally mutable object into ClassReader.b
FI edu.rice.cs.drjava.RemoteControlServer$RCServerThread.finalize() is public; should be protected
MS edu.rice.cs.drjava.config.OptionConstants.FIND_RESULTS_COLORS is a mutable array
MS edu.rice.cs.drjava.config.OptionConstants.choices should be moved out of an interface and made package protected
MS edu.rice.cs.drjava.DrJavaRoot.LANGUAGE_LEVEL_EXTENSIONS is a mutable array
MS edu.rice.cs.drjava.model.AbstractGlobalModel._log isn't final but should be
MS edu.rice.cs.drjava.model.compiler.CompilerModel.EXTENSIONS is a mutable array
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.COMMENTED_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.DOUBLE_QUOTED_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.KEYWORD_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.MAIN_FONT should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.NORMAL_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.NUMBER_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.SINGLE_QUOTED_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.TYPE_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringView.DEBUGGER_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.DOUBLE_QUOTED_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.ERROR_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.INTERACTIONS_SYSTEM_ERR_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.INTERACTIONS_SYSTEM_IN_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.INTERACTIONS_SYSTEM_OUT_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.MAIN_FONT isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.NORMAL_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.NUMBER_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.SINGLE_QUOTED_COLOR isn't final and can't be protected from malicious code
MS edu.rice.cs.drjava.model.definitions.ColoringView.COMMENTED_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringView.KEYWORD_COLOR should be package protected
MS edu.rice.cs.drjava.model.definitions.ColoringView.TYPE_COLOR should be package protected
MS edu.rice.cs.drjava.RemoteControlClient._serverRunning should be package protected
MS edu.rice.cs.drjava.RemoteControlClient._serverUser should be package protected
MS edu.rice.cs.drjava.RemoteControlClient.REMOTE_CONTROL_TIMEOUT isn't final but should be
MS public static edu.rice.cs.drjava.Version.getBuildTime() may expose internal representation by returning Version.BUILD_TIME
MS edu.rice.cs.javalanglevels.LanguageLevelVisitor.errors should be package protected
MS edu.rice.cs.javalanglevels.parser.JExprParserTokenManager.jjnewLexState should be package protected
MS edu.rice.cs.javalanglevels.parser.JExprParserTokenManager.jjstrLiteralImages should be package protected
MS koala.dynamicjava.parser.impl.ParserTokenManager.jjnewLexState should be package protected
MS koala.dynamicjava.parser.impl.ParserTokenManager.jjstrLiteralImages should be package protected
MS public static koala.dynamicjava.Version.getBuildTime() may expose internal representation by returning Version.BUILD_TIME
MS org.apache.bcel.Constants.ACCESS_NAMES is a mutable array
MS org.apache.bcel.Constants.ATTRIBUTE_NAMES is a mutable array
MS org.apache.bcel.Constants.CONSTANT_NAMES is a mutable array
MS org.apache.bcel.Constants.INTERFACES_IMPLEMENTED_BY_ARRAYS is a mutable array
MS org.apache.bcel.Constants.ITEM_NAMES is a mutable array
MS org.apache.bcel.Constants.OPCODE_NAMES is a mutable array
MS org.apache.bcel.Constants.SHORT_TYPE_NAMES is a mutable array
MS org.apache.bcel.Constants.TYPE_NAMES is a mutable array
MS org.apache.bcel.Constants.NO_OF_OPERANDS is a mutable array
MS org.apache.bcel.Constants.TYPE_OF_OPERANDS is a mutable array

Multithreaded correctness Warnings

Code&nbsp; Warning
IS Inconsistent synchronization of edu.rice.cs.plt.io.ExpandingByteBuffer._eof; locked 85% of time
IS Inconsistent synchronization of edu.rice.cs.plt.io.ExpandingCharBuffer._eof; locked 85% of time
IS Inconsistent synchronization of junit.awtui.TestRunner.fRunner; locked 50% of time
IS Inconsistent synchronization of junit.swingui.TestRunner.fRunner; locked 66% of time
LI Incorrect lazy initialization and update of static field junit.runner.BaseTestRunner.fPreferences in junit.runner.BaseTestRunner.getPreferences()
SC new edu.rice.cs.drjava.model.DefaultLightWeightParsingControl(AbstractGlobalModel) invokes Thread.start()
SC new edu.rice.cs.drjava.RemoteControlServer(MainFrame) invokes edu.rice.cs.drjava.RemoteControlServer$RCServerThread.start()
SC new edu.rice.cs.plt.concurrent.DelayedInterrupter(Thread, int) invokes Thread.start()
STCAL Call to method of static java.text.DateFormat in edu.rice.cs.drjava.project.ProjectFileParser$DocFilePropertyVisitor.forCons(Cons)
STCAL Call to method of static java.text.DateFormat in edu.rice.cs.drjava.project.ProjectProfile.encodeDocFile(DocFile, String, boolean)
STCAL Call to method of static java.text.DateFormat in edu.rice.cs.plt.debug.AbstractLog.formatTime(Date)
SWL edu.rice.cs.drjava.model.debug.jpda.JPDADebugger.startUp() calls Thread.sleep() with a lock held
SWL edu.rice.cs.drjava.model.debug.jpda.JPDADebugger.startUp() calls Thread.sleep() with a lock held
UG edu.rice.cs.drjava.model.debug.jpda.JPDADebugger.getCurrentThread() is unsynchronized, edu.rice.cs.drjava.model.debug.jpda.JPDADebugger.setCurrentThread(ThreadReference) is synchronized
VO edu.rice.cs.drjava.ui.DefinitionsPane.FIND_RESULTS_PAINTERS is a volatile reference to an array; the array elements are non-volatile
VO edu.rice.cs.drjava.ui.DefinitionsPane.FIND_RESULTS_PAINTERS_USAGE is a volatile reference to an array; the array elements are non-volatile

Performance Warnings

Code&nbsp; Warning
Dm koala.dynamicjava.interpreter.error.ExecutionError.printStackTrace(PrintWriter) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
SBSC Method edu.rice.cs.dynamicjava.interpreter.ExpressionChecker.resolveAmbiguousName(AmbiguousName) concatenates strings using + in a loop
SBSC Method edu.rice.cs.dynamicjava.interpreter.ExpressionChecker.visit(ReferenceTypeName) concatenates strings using + in a loop
SBSC Method edu.rice.cs.dynamicjava.interpreter.ExpressionChecker.visit(GenericReferenceTypeName) concatenates strings using + in a loop
SBSC Method edu.rice.cs.dynamicjava.interpreter.StatementChecker.resolveClassName(String, Node) concatenates strings using + in a loop
SBSC Method edu.rice.cs.javalanglevels.parser.ParseException.getMessage() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.parser.impl.ParseException.getMessage() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.parser.wrapper.CustomParseException.getShortMessage() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.tree.tiger.GenericClassDeclaration.toStringHelper() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.tree.tiger.GenericInterfaceDeclaration.toStringHelper() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.tree.tiger.GenericReferenceTypeName.toStringHelper() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.tree.tiger.PolymorphicConstructorDeclaration.toStringHelper() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.tree.tiger.PolymorphicMethodDeclaration.toStringHelper() concatenates strings using + in a loop
SBSC Method koala.dynamicjava.tree.TreeUtilities.listToName(List) concatenates strings using + in a loop
SBSC Method koala.dynamicjava.util.LocalizedMessageReader.getMessage(String, String[]) concatenates strings using + in a loop
SIC Should edu.rice.cs.drjava.ui.DefinitionsPane$FindResultsColorOptionListener be a _static_ inner class?
SIC Should edu.rice.cs.drjava.ui.MainFrame$DecoratedAction be a _static_ inner class?
SIC Should edu.rice.cs.javalanglevels.BodyTypeChecker$NoAssignmentAllowedInExpression be a _static_ inner class?
SIC Should edu.rice.cs.util.ReaderWriterLock$DeadlockException be a _static_ inner class?
SIC Should junit.swingui.TestSelector$ParallelSwapper be a _static_ inner class?
SIC Should net.java.plaf.windows.common.TextComponentMenu$DelegateAction be a _static_ inner class?
SIC Should net.java.plaf.windows.common.WindowsMenuBarUI$MenuLayout be a _static_ inner class?
SIC Should net.java.plaf.windows.common.WindowsTitledBorderPatch$WindowsTitleBorder be a _static_ inner class?
SS Unread field: edu.rice.cs.drjava.ui.DrJavaErrorWindow.ERRORS_FOOTER_HTML; should this field be static?
SS Unread field: edu.rice.cs.drjava.ui.DrJavaErrorWindow.HEADER_HTML; should this field be static?
SS Unread field: edu.rice.cs.drjava.ui.DrJavaErrorWindow.NO_ERRORS_HTML; should this field be static?
SS Unread field: edu.rice.cs.drjava.ui.PreviewFrame.PAGE_ZOOM; should this field be static?
SS Unread field: edu.rice.cs.drjava.ui.PreviewFrame.TOOLBAR_HEIGHT; should this field be static?

Dodgy Warnings

Code&nbsp; Warning
BC Unchecked/unconfirmed cast from edu.rice.cs.drjava.model.compiler.CompilerError to edu.rice.cs.drjava.model.junit.JUnitError in edu.rice.cs.drjava.ui.JUnitPanel$JUnitErrorListPane.selectItem(CompilerError)
BC Unchecked/unconfirmed cast from java.awt.Container to javax.swing.JComboBox in net.java.plaf.windows.xp.XPComboBoxUI$XPComboBoxLayoutManager.layoutContainer(Container)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
DMI Hard coded reference to an absolute pathname in edu.rice.cs.drjava.model.JarJDKToolsLibrary.search(GlobalModel)
Eq edu.rice.cs.drjava.project.DocFile doesn't override java.io.File.equals(Object)
Eq edu.rice.cs.dynamicjava.symbol.Java5Class doesn't override JavaClass.equals(Object)
Eq edu.rice.cs.util.sexp.Tokens$BooleanToken doesn't override Tokens$SExpToken.equals(Object)
Eq edu.rice.cs.util.sexp.Tokens$NumberToken doesn't override Tokens$SExpToken.equals(Object)
Eq net.java.plaf.windows.common.WindowsTextFieldCaret doesn't override javax.swing.text.DefaultCaret.equals(Object)
FE Test for floating point equality in edu.rice.cs.util.StringOps.memSizeToString(long)
ICAST int division result cast to double or float in edu.rice.cs.drjava.ui.DefinitionsPane.centerViewOnOffset(int)
IM Computation of average could overflow in org.apache.bcel.classfile.LineNumberTable.getSourceLine(int)
NP Possible null pointer dereference in edu.rice.cs.drjava.model.junit.DefaultJUnitModel._rawJUnitOpenDefDocs(List, boolean) due to return value of called method
NP Load of known null value in edu.rice.cs.javalanglevels.BodyTypeChecker.getCommonSuperType(SymbolData, SymbolData)
NP Possible null pointer dereference in edu.rice.cs.plt.collect.HashMultiset.count(Object) due to return value of called method
NP Possible null pointer dereference in edu.rice.cs.plt.collect.HashRelation.removeFromIndex(Object, Object) due to return value of called method
NP Possible null pointer dereference in edu.rice.cs.plt.collect.HashRelation.removeFromIndex(Object, Object) due to return value of called method
NP Possible null pointer dereference in edu.rice.cs.plt.collect.OneToOneHashMap.remove(Object, Object) due to return value of called method
QF Complicated, subtle or wrong increment in for-loop edu.rice.cs.javalanglevels.Bob.reassignLotsaVariableDatas(LinkedList, LinkedList)
QF Complicated, subtle or wrong increment in for-loop edu.rice.cs.javalanglevels.ExpressionTypeChecker.reassignLotsaVariableDatas(LinkedList, LinkedList)
RCN Redundant nullcheck of active which is known to be null in edu.rice.cs.drjava.model.AbstractGlobalModel._loadProject(ProjectFileIR)
RCN Redundant nullcheck of outerT, which is known to be non-null in edu.rice.cs.dynamicjava.interpreter.TreeCompiler.compileConstructor(ConstructorDeclaration, Type)
RCN Redundant nullcheck of in_value, which is known to be non-null in new edu.rice.cs.javalanglevels.tree.StringLiteral(SourceInfo, String)
RCN Redundant nullcheck of in_name, which is known to be non-null in new edu.rice.cs.javalanglevels.tree.Type(SourceInfo, String)
RCN Redundant nullcheck of in_name, which is known to be non-null in new edu.rice.cs.javalanglevels.tree.VoidReturn(SourceInfo, String)
RCN Redundant nullcheck of in_text, which is known to be non-null in new edu.rice.cs.javalanglevels.tree.Word(SourceInfo, String)
RCN Redundant nullcheck of supered which is known to be null in koala.dynamicjava.parser.impl.Parser.TypeArguments()
RCN Redundant nullcheck of supered which is known to be null in koala.dynamicjava.parser.impl.Parser.TypeArguments()
RCN Redundant nullcheck of model, which is known to be non-null in net.java.plaf.windows.common.WindowsRadioButtonUI.selectRadioButton(ActionEvent, boolean)
REC Exception is caught when Exception is not thrown in com.rc.retroweaver.runtime.IterableMethods.iterator(Object)
REC Exception is caught when Exception is not thrown in edu.rice.cs.drjava.config.OptionConstants$LookAndFeels.getLookAndFeels()
REC Exception is caught when Exception is not thrown in edu.rice.cs.drjava.model.AbstractGlobalModel$ConcreteOpenDefDoc.verifyExists()
REC Exception is caught when Exception is not thrown in edu.rice.cs.drjava.model.junit.DefaultJUnitModel._rawJUnitOpenDefDocs(List, boolean)
REC Exception is caught when Exception is not thrown in edu.rice.cs.drjava.ui.JarOptionsDialog$7.convertFileToString(File)
REC Exception is caught when Exception is not thrown in edu.rice.cs.drjava.ui.PreviewFrame$6.stateChanged(ChangeEvent)
REC Exception is caught when Exception is not thrown in junit.awtui.Logo.loadImage(String)
REC Exception is caught when Exception is not thrown in junit.awtui.TestRunner.loadFrameIcon()
SF Switch statement found in org.apache.bcel.classfile.Utility.codeToString(ByteSequence, ConstantPool, boolean) where one case falls through to the next case
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.COMMENTED_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.DEBUGGER_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.DOUBLE_QUOTED_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.ERROR_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.INTERACTIONS_SYSTEM_ERR_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.INTERACTIONS_SYSTEM_IN_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.INTERACTIONS_SYSTEM_OUT_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.KEYWORD_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.NORMAL_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.NUMBER_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.SINGLE_QUOTED_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.TYPE_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.COMMENTED_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.DEBUGGER_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.DOUBLE_QUOTED_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.ERROR_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.INTERACTIONS_SYSTEM_ERR_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.INTERACTIONS_SYSTEM_IN_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.INTERACTIONS_SYSTEM_OUT_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.KEYWORD_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.NORMAL_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.NUMBER_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.SINGLE_QUOTED_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.model.definitions.ColoringView.TYPE_COLOR from instance method edu.rice.cs.drjava.model.definitions.ColoringView.updateColors()
ST Write to static field edu.rice.cs.drjava.ui.AboutDialog.LICENSE from instance method edu.rice.cs.drjava.ui.AboutDialog.buildGUI(Container)
ST Write to static field edu.rice.cs.drjava.ui.DefinitionsPane.BREAKPOINT_PAINTER from instance method edu.rice.cs.drjava.ui.DefinitionsPane$BreakpointColorOptionListener.optionChanged(OptionEvent)
ST Write to static field edu.rice.cs.drjava.ui.DefinitionsPane.DISABLED_BREAKPOINT_PAINTER from instance method edu.rice.cs.drjava.ui.DefinitionsPane$DisabledBreakpointColorOptionListener.optionChanged(OptionEvent)
ST Write to static field edu.rice.cs.drjava.ui.AbstractDJPane.ERROR_PAINTER from instance method edu.rice.cs.drjava.ui.DefinitionsPane$ErrorColorOptionListener.optionChanged(OptionEvent)
ST Write to static field edu.rice.cs.drjava.ui.AbstractDJPane.MATCH_PAINTER from instance method edu.rice.cs.drjava.ui.DefinitionsPane$MatchColorOptionListener.optionChanged(OptionEvent)
ST Write to static field edu.rice.cs.drjava.ui.DefinitionsPane.THREAD_PAINTER from instance method edu.rice.cs.drjava.ui.DefinitionsPane$ThreadColorOptionListener.optionChanged(OptionEvent)
ST Write to static field edu.rice.cs.drjava.ui.DrJavaErrorPopup._parentFrame from instance method new edu.rice.cs.drjava.ui.DrJavaErrorPopup(JFrame, Throwable)
ST Write to static field edu.rice.cs.drjava.ui.ErrorPanel._listHighlightPainter from instance method edu.rice.cs.drjava.ui.ErrorPanel$ErrorListPane$CompilerErrorColorOptionListener.optionChanged(OptionEvent)
ST Write to static field edu.rice.cs.drjava.ui.LineEnumRule.SIZE from instance method new edu.rice.cs.drjava.ui.LineEnumRule(DefinitionsPane)
ST Write to static field edu.rice.cs.drjava.ui.LineEnumRule.SIZE from instance method edu.rice.cs.drjava.ui.LineEnumRule.updateFont()
ST Write to static field edu.rice.cs.drjava.ui.LineEnumRule.SIZE from instance method edu.rice.cs.drjava.ui.LineEnumRule.paintComponent(Graphics)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._classesToBeParsed from instance method new edu.rice.cs.javalanglevels.AdvancedVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._hierarchy from instance method new edu.rice.cs.javalanglevels.AdvancedVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._newSDs from instance method new edu.rice.cs.javalanglevels.AdvancedVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.errors from instance method new edu.rice.cs.javalanglevels.AdvancedVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.symbolTable from instance method new edu.rice.cs.javalanglevels.AdvancedVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.targetVersion from instance method new edu.rice.cs.javalanglevels.AdvancedVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.visitedFiles from instance method new edu.rice.cs.javalanglevels.AdvancedVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._endOfClassVarDefs from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._fileIn from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._fileInColumn from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._fileInLine from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._fileOut from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._llv from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._safeSupportCode from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.Augmentor._targetVersion from instance method new edu.rice.cs.javalanglevels.Augmentor(JavaVersion, boolean, BufferedReader, BufferedWriter, LanguageLevelVisitor)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._classesToBeParsed from instance method new edu.rice.cs.javalanglevels.ElementaryVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._hierarchy from instance method new edu.rice.cs.javalanglevels.ElementaryVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._newSDs from instance method new edu.rice.cs.javalanglevels.ElementaryVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.errors from instance method new edu.rice.cs.javalanglevels.ElementaryVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.symbolTable from instance method new edu.rice.cs.javalanglevels.ElementaryVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.targetVersion from instance method new edu.rice.cs.javalanglevels.ElementaryVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.visitedFiles from instance method new edu.rice.cs.javalanglevels.ElementaryVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._classesToBeParsed from instance method new edu.rice.cs.javalanglevels.IntermediateVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._hierarchy from instance method new edu.rice.cs.javalanglevels.IntermediateVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._newSDs from instance method new edu.rice.cs.javalanglevels.IntermediateVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.errors from instance method new edu.rice.cs.javalanglevels.IntermediateVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.symbolTable from instance method new edu.rice.cs.javalanglevels.IntermediateVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.targetVersion from instance method new edu.rice.cs.javalanglevels.IntermediateVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.visitedFiles from instance method new edu.rice.cs.javalanglevels.IntermediateVisitor(File, LinkedList, Symboltable, Hashtable, LinkedList, Hashtable, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._newSDs from instance method edu.rice.cs.javalanglevels.LanguageLevelConverter.convert(File[])
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.continuations from instance method new edu.rice.cs.javalanglevels.LanguageLevelVisitor(File, String, LinkedList, LinkedList, LinkedList, Hashtable)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor._classesToBeParsed from instance method new edu.rice.cs.javalanglevels.LanguageLevelVisitor(File, String, LinkedList, LinkedList, LinkedList, Hashtable, Hashtable)
ST Write to static field edu.rice.cs.javalanglevels.parser.JExprParser._currentFile from instance method new edu.rice.cs.javalanglevels.parser.JExprParser(File)
ST Write to static field edu.rice.cs.javalanglevels.TypeChecker._targetVersion from instance method new edu.rice.cs.javalanglevels.TypeChecker(File, String, LinkedList, Symboltable, LinkedList, LinkedList, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.TypeChecker.errors from instance method new edu.rice.cs.javalanglevels.TypeChecker(File, String, LinkedList, Symboltable, LinkedList, LinkedList, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.TypeChecker.symbolTable from instance method new edu.rice.cs.javalanglevels.TypeChecker(File, String, LinkedList, Symboltable, LinkedList, LinkedList, JavaVersion)
ST Write to static field edu.rice.cs.javalanglevels.LanguageLevelVisitor.symbolTable from instance method edu.rice.cs.javalanglevels.TypeChecker.getSymbolData(String, JExpression, boolean, boolean)
ST Write to static field junit.runner.BaseTestRunner.fgFilterStack from instance method junit.runner.BaseTestRunner.processArguments(String[])

Details

BC_IMPOSSIBLE_CAST: Impossible cast

This cast will always throw a ClassCastException.

BC_UNCONFIRMED_CAST: Unchecked/unconfirmed cast

This cast is unchecked, and not all instances of the type casted from can be cast to the type it is being cast to. Ensure that your program logic ensures that this cast will not fail.

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.

DM_BOOLEAN_CTOR: Method invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead

Creating new instances of java.lang.Boolean wastes memory, since Boolean objects are immutable and there are only two useful values of this type.  Use the Boolean.valueOf() method (or Java 1.5 autoboxing) to create Boolean objects instead.

DM_EXIT: Method invokes System.exit(...)

Invoking System.exit shuts down the entire Java virtual machine. This should only been done when it is appropriate. Such calls make it hard or impossible for your code to be invoked by other code. Consider throwing a RuntimeException instead.

DMI_HARDCODED_ABSOLUTE_FILENAME: Code contains a hard coded reference to an absolute pathname

This code constructs a File object using a hard coded to an absolute pathname (e.g., new File("/home/dannyc/workspace/j2ee/src/share/com/sun/enterprise/deployment");

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.

DMI_INVOKING_TOSTRING_ON_ANONYMOUS_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.

DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED: Classloaders should only be created inside doPrivileged block

This code creates a classloader, which requires a security manager. If this code will be granted security permissions, but might be invoked by code that does not have security permissions, then the classloader creation needs to occur inside a doPrivileged block.

EI_EXPOSE_REP: May expose internal representation by returning reference to mutable object

Returning a reference to a mutable object value stored in one of the object's fields exposes 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. Returning a new copy of the object is better approach in many situations.

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.

EQ_COMPARETO_USE_OBJECT_EQUALS: Class defines compareTo(...) and uses Object.equals()

This class defines a compareTo(...) method but inherits its equals() method from java.lang.Object. Generally, the value of compareTo should return zero if and only if equals returns true. If this is violated, weird and unpredictable failures will occur in classes such as PriorityQueue. In Java 5 the PriorityQueue.remove method uses the compareTo method, while in Java 6 it uses the equals method.

From the JavaDoc for the compareTo method in the Comparable interface:

It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."

EQ_DOESNT_OVERRIDE_EQUALS: Class doesn't override equals in superclass

This class extends a class that defines an equals method and adds fields, but doesn't define an equals method itself. Thus, equality on instances of this class will ignore the identity of the subclass and the added fields. Be sure this is what is intended, and that you don't need to override the equals method. Even if you don't need to override the equals method, consider overriding it anyone to document the fact that the equals method for the subclass just return the result of invoking super.equals(o).

EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC: equals method overrides equals in superclass and may not be symmetric

This class defines an equals method that overrides an equals method in a superclass. Both equals methods methods use instanceof in the determination of whether two objects are equals. This is fraught with peril, since it is important that the equals method is symetrical (in other words, a.equals(b) == b.equals(a)). If B is a subtype of A, and A's equals method checks that the argument is an instanceof A, and B's equals method checks that the argument is an instanceof B, it is quite likely that the equivalence relation defined by these methods is not symmetric.

ES_COMPARING_STRINGS_WITH_EQ: Comparison of String objects using == or !=

This code compares java.lang.String objects for reference equality using the == or != operators. Unless both strings are either constants in a source file, or have been interned using the String.intern() method, the same string value may be represented by two different String objects. Consider using the equals(Object) method instead.

ES_COMPARING_PARAMETER_STRING_WITH_EQ: Comparison of String parameter using == or !=

This code compares a java.lang.String parameter for reference equality using the == or != operators. Requiring callers to pass only String constants or interned strings to a method is unnecessarily fragile, and rarely leads to measurable performance gains. Consider using the equals(Object) method instead.

FE_FLOATING_POINT_EQUALITY: Test for floating point equality

This operation compares two floating point values for equality. Because floating point calculations may involve rounding, calculated float and double values may not be accurate. For values that must be precise, such as monetary values, consider using a fixed-precision type such as BigDecimal. For values that need not be precise, consider comparing for equality within some range, for example: if ( Math.abs(x - y) < .0000001 ). See the Java Language Specification, section 4.2.4.

FI_PUBLIC_SHOULD_BE_PROTECTED: Finalizer should be protected, not public

A class's finalize() method should have protected access, not public.

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 
  }

HE_EQUALS_NO_HASHCODE: Class defines equals() but not hashCode()

This class overrides equals(Object), but does not override hashCode().  Therefore, the class may violate the invariant that equal objects must have equal hashcodes.

HE_INHERITS_EQUALS_USE_HASHCODE: Class inherits equals() and uses Object.hashCode()

This class inherits equals(Object) from an abstract superclass, and 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 want to define a hashCode method, and/or don't believe the object will ever be put into a HashMap/Hashtable, define the hashCode() method to throw UnsupportedOperationException.

IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION: Superclass uses subclass during initialization

During the initialization of a class, the class makes an active use of a subclass. That subclass will not yet be initialized at the time of this use. For example, in the following code, foo will be null.

public class CircularClassInitialization {
	static class InnerClassSingleton extends CircularClassInitialization {
		static InnerClassSingleton singleton = new InnerClassSingleton();
	}
	
	static CircularClassInitialization foo = InnerClassSingleton.singleton;
}

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;

IM_AVERAGE_COMPUTATION_COULD_OVERFLOW: Computation of average could overflow

The code computes the average of two integers using either division or signed right shift, and then uses the result as the index of an array. If the values being averaged are very large, this can overflow (resulting in the computation of a negative average). Assuming that the result is intended to be nonnegative, you can use an unsigned right shift instead. In other words, rather that using (low+high)/2, use (low+high) >>> 1

This bug exists in many earlier implementations of binary search and merge sort. Martin Buchholz found and fixed it in the JDK libraries, and Joshua Bloch widely publicized the bug pattern.

IS2_INCONSISTENT_SYNC: Inconsistent synchronization

The fields of this class appear to be accessed inconsistently with respect to synchronization.  This bug report indicates that the bug pattern detector judged that

  1. The class contains a mix of locked and unlocked accesses,
  2. At least one locked access was performed by one of the class's own methods, and
  3. The number of unsynchronized field accesses (reads and writes) was no more than one third of all accesses, with writes being weighed twice as high as reads

A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.

You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.

Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held.  Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.

This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.

LI_LAZY_INIT_UPDATE_STATIC: Incorrect lazy initialization and update of static field

This method contains an unsynchronized lazy initialization of a static field. After the field is set, the object stored into that location is further accessed. The setting of the field is visible to other threads as soon as it is set. If the futher accesses in the method that set the field serve to initialize the object, then you have a very serious multithreading bug, unless something else prevents any other thread from accessing the stored object until it is fully initialized.

MF_CLASS_MASKS_FIELD: Class defines field that masks a superclass field

This class defines a field with the same name as a visible instance field in a superclass. This is confusing, and may indicate an error if methods update or access one of the fields when they wanted the other.

MS_MUTABLE_ARRAY: Field is a mutable array

A final static field references an array and can be accessed by malicious code or by accident from another package. This code can freely modify the contents of the array.

MS_CANNOT_BE_FINAL: Field isn't final and can't be protected from malicious code

A mutable static field could be changed by malicious code or by accident from another package. Unfortunately, the way the field is used doesn't allow any easy fix to this problem.

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_OOI_PKGPROTECT: Field should be moved out of an interface and made package protected

A final static field that is defined in an interface references a mutable object such as an array or hashtable. This mutable object could be changed by malicious code or by accident from another package. To solve this, the field needs to be moved to a class and made package protected 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.

MS_EXPOSE_REP: Public static method may expose internal representation by returning array

A public static method returns a reference to an array that is part of the static state of the class. Any code that calls this method can freely modify the underlying array. One fix is to return a copy of the array.

NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT: equals() method does not check for null argument

This implementation of equals(Object) violates the contract defined by java.lang.Object.equals() because it does not check for null being passed as the argument. All equals() methods should return false if passed a null value.

NP_LOAD_OF_KNOWN_NULL_VALUE: Load of known null value

The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull.

NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS: Method call passes null for unconditionally dereferenced parameter

A possibly-null value is passed at a call site where all known target methods will unconditionally dereference it. This is very likely to result in a null pointer exception.

NP_BOOLEAN_RETURN_NULL: Method with Boolean return type returns explicit null

A method that returns either Boolean.TRUE, Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean, and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException.

NP_NULL_ON_SOME_PATH: Possible null pointer dereference

A reference value dereferenced here might be null at runtime.  This may lead to a NullPointerException when the code is executed.

NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE: Possible null pointer dereference due to return value of called method

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  The value may be null because it was return from a method which is known to return possibly-null values.

OS_OPEN_STREAM: Method may fail to close stream

The method creates an IO stream object, does not assign it to any fields, pass it to other methods that might close it, or return it, and does not appear to close the stream on all paths out of the method.  This may result in a file descriptor leak.  It is generally a good idea to use a finally block to ensure that streams are closed.

QF_QUESTIONABLE_FOR_LOOP: Complicated, subtle or wrong increment in for-loop

Are you sure this for loop is incrementing the correct variable? It appears that another variable is being initialized and checked by the for loop.

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.

RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE: Redundant nullcheck of value known to be non-null

This method contains a redundant check of a known non-null value against the constant null.

RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE: Redundant nullcheck of value known to be null

This method contains a redundant check of a known null value against the constant null.

REC_CATCH_EXCEPTION: Exception is caught when Exception is not thrown

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value

This method returns a value that is not checked. The return value should be checked since it can indication an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

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();

SC_START_IN_CTOR: Constructor invokes Thread.start()

The constructor starts a thread. This is likely to be wrong if the class is ever extended/subclassed, since the thread will be started before the subclass constructor is started.

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.

SE_NO_SERIALVERSIONID: Class is Serializable, but doesn't define serialVersionUID

This class implements the Serializable interface, but does not define a serialVersionUID field.  A change as simple as adding a reference to a .class object will add synthetic fields to the class, which will unfortunately change the implicit serialVersionUID (e.g., adding a reference to String.class will generate a static field class$java$lang$String). Also, different source code to bytecode compilers may use different naming conventions for synthetic variables generated for references to class objects or inner classes. To ensure interoperability of Serializable across versions, consider adding an explicit serialVersionUID.

SS_SHOULD_BE_STATIC: Unread field: should this field be static?

This class contains an instance final field that is initialized to a compile-time static value. Consider making the field 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.

STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE: Call to static DateFormat

As the JavaDoc states, DateFormats are inherently unsafe for multithreaded use. The detector has found a call to an instance of DateFormat that has been obtained via a static field. This looks suspicous.

For more information on this see Sun Bug #6231579 and Sun Bug #6178997.

SWL_SLEEP_WITH_LOCK_HELD: Method calls Thread.sleep() with a lock held

This method calls Thread.sleep() with a lock held. This may result in very poor performance and scalability, or a deadlock, since other threads may be waiting to acquire the lock. It is a much better idea to call wait() on the lock, which releases the lock and allows other threads to run.

UG_SYNC_SET_UNSYNC_GET: Unsynchronized get method, synchronized set method

This class contains similarly-named get and set methods where the set method is synchronized and the get method is not.  This may result in incorrect behavior at runtime, as callers of the get method will not necessarily see a consistent state for the object.  The get method should be made synchronized.

UI_INHERITANCE_UNSAFE_GETRESOURCE: Usage of GetResource may be unsafe if class is extended

Calling this.getClass().getResource(...) could give results other than expected if this class is extended by a class in another package.

UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS: Uncallable method defined in anonymous class

This anonymous class defined a method that is not directly invoked and does not override a method in a superclass. Since methods in other classes cannot directly invoke methods declared in an anonymous class, it seems that this method is uncallable. The method might simply be dead code, but it is also possible that the method is intended to override a method declared in a superclass, and due to an typo or other error the method does not, in fact, override the method it is intended to.

UWF_UNWRITTEN_FIELD: Unwritten field

This field is never written.  All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.

VO_VOLATILE_REFERENCE_TO_ARRAY: A volatile reference to an array doesn't treat the array elements as volatile

This declares a volatile reference to an array, which might not be what you want. With a volatile reference to an array, reads and writes of the reference to the array are treated as volatile, but the array elements are non-volatile. To get volatile array elements, you will need to use one of the atomic array classes in java.util.concurrent (provided in Java 5.0).