Project Information
Project:
<<unnamed project>>
FindBugs version: 1.3.1
Code analyzed:
- /opt/local/javaplt/hudson/jobs/PLT FindBugs/workspace/plt/classes/base
- /opt/local/javaplt/hudson/jobs/PLT FindBugs/workspace/plt/classes/test
Metrics
20832 lines of code analyzed,
in 864 classes,
in 12 packages.
| High Priority Warnings |
6 |
0.29 |
| Medium Priority Warnings |
58 |
2.78 |
|
Total Warnings
|
64
|
3.07
|
(* Defects per Thousand lines of non-commenting source statements)
Contents
Summary
Warnings
Click on a warning row to see full context information.
|
DE
|
edu.rice.cs.plt.io.IOUtil.attemptClose(Closeable) might ignore java.io.IOException |
|
Bug type DE_MIGHT_IGNORE (click for details)
In class edu.rice.cs.plt.io.IOUtil In method edu.rice.cs.plt.io.IOUtil.attemptClose(Closeable) Exception class java.io.IOException At IOUtil.java:[line 1261]
|
|
DE
|
edu.rice.cs.plt.reflect.ClassLoaderTestCase.assertDoesNotLoadClass(ClassLoader, String) might ignore java.lang.ClassNotFoundException |
|
Bug type DE_MIGHT_IGNORE (click for details)
In class edu.rice.cs.plt.reflect.ClassLoaderTestCase In method edu.rice.cs.plt.reflect.ClassLoaderTestCase.assertDoesNotLoadClass(ClassLoader, String) Exception class java.lang.ClassNotFoundException At ClassLoaderTestCase.java:[line 59]
|
|
DE
|
edu.rice.cs.plt.reflect.PathClassLoaderTest.assertCannotGet(ClassLoader, String) might ignore java.lang.Exception |
|
Bug type DE_MIGHT_IGNORE (click for details)
In class edu.rice.cs.plt.reflect.PathClassLoaderTest In method edu.rice.cs.plt.reflect.PathClassLoaderTest.assertCannotGet(ClassLoader, String) Exception class java.lang.Exception At PathClassLoaderTest.java:[line 137]
|
|
Dm
|
edu.rice.cs.plt.debug.RMILogSink$ServerFactory$1.close() invokes System.exit(...), which shuts down the entire virtual machine |
|
Bug type DM_EXIT (click for details)
In class edu.rice.cs.plt.debug.RMILogSink$ServerFactory$1 In method edu.rice.cs.plt.debug.RMILogSink$ServerFactory$1.close() At RMILogSink.java:[line 157]
|
|
Dm
|
edu.rice.cs.plt.debug.TreeLogSink$4.run() invokes System.exit(...), which shuts down the entire virtual machine |
|
Bug type DM_EXIT (click for details)
In class edu.rice.cs.plt.debug.TreeLogSink$4 In method edu.rice.cs.plt.debug.TreeLogSink$4.run() At TreeLogSink.java:[line 75]
|
|
DP
|
edu.rice.cs.plt.reflect.EmptyClassLoader.<static initializer>() creates a edu.rice.cs.plt.reflect.EmptyClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.EmptyClassLoader In method edu.rice.cs.plt.reflect.EmptyClassLoader.<static initializer>() In class edu.rice.cs.plt.reflect.EmptyClassLoader At EmptyClassLoader.java:[line 46]
|
|
DP
|
edu.rice.cs.plt.reflect.PathClassLoader.getResourceInPath(String, Iterable) creates a edu.rice.cs.plt.reflect.PathClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.PathClassLoader In method edu.rice.cs.plt.reflect.PathClassLoader.getResourceInPath(String, Iterable) In class edu.rice.cs.plt.reflect.PathClassLoader At PathClassLoader.java:[line 82]
|
|
DP
|
edu.rice.cs.plt.reflect.PathClassLoader.getResourceInPathAsStream(String, Iterable) creates a edu.rice.cs.plt.reflect.PathClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.PathClassLoader In method edu.rice.cs.plt.reflect.PathClassLoader.getResourceInPathAsStream(String, Iterable) In class edu.rice.cs.plt.reflect.PathClassLoader At PathClassLoader.java:[line 100]
|
|
DP
|
edu.rice.cs.plt.reflect.ReflectUtil.<static initializer>() creates a edu.rice.cs.plt.reflect.ReflectUtil$1 classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtil In method edu.rice.cs.plt.reflect.ReflectUtil.<static initializer>() In class edu.rice.cs.plt.reflect.ReflectUtil$1 At ReflectUtil.java:[line 63]
|
|
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 |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtil In method edu.rice.cs.plt.reflect.ReflectUtil.loadLibraryAdapter(ClassLoader, Iterable, String, Class[], Object[]) In class edu.rice.cs.plt.reflect.PathClassLoader At ReflectUtil.java:[line 450]
|
|
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 |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtil In method edu.rice.cs.plt.reflect.ReflectUtil.loadLibraryAdapter(ClassLoader, Iterable, String, Class[], Object[]) In class edu.rice.cs.plt.reflect.PreemptingClassLoader At ReflectUtil.java:[line 451]
|
|
DP
|
edu.rice.cs.plt.reflect.ReflectUtil.mergeLoaders(ClassLoader, ClassLoader) creates a edu.rice.cs.plt.reflect.ComposedClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtil In method edu.rice.cs.plt.reflect.ReflectUtil.mergeLoaders(ClassLoader, ClassLoader) In class edu.rice.cs.plt.reflect.ComposedClassLoader At ReflectUtil.java:[line 459]
|
|
DP
|
edu.rice.cs.plt.reflect.ReflectUtil.mergeLoaders(ClassLoader, ClassLoader, boolean, String[]) creates a edu.rice.cs.plt.reflect.ComposedClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtil In method edu.rice.cs.plt.reflect.ReflectUtil.mergeLoaders(ClassLoader, ClassLoader, boolean, String[]) In class edu.rice.cs.plt.reflect.ComposedClassLoader At ReflectUtil.java:[line 481]
|
|
DP
|
edu.rice.cs.plt.reflect.ReflectUtil.mergeLoaders(ClassLoader, ClassLoader, boolean, String[]) creates a edu.rice.cs.plt.reflect.ShadowingClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtil In method edu.rice.cs.plt.reflect.ReflectUtil.mergeLoaders(ClassLoader, ClassLoader, boolean, String[]) In class edu.rice.cs.plt.reflect.ShadowingClassLoader At ReflectUtil.java:[line 480]
|
|
DP
|
edu.rice.cs.plt.reflect.ShadowingClassLoader.blackList(ClassLoader, String[]) creates a edu.rice.cs.plt.reflect.ShadowingClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ShadowingClassLoader In method edu.rice.cs.plt.reflect.ShadowingClassLoader.blackList(ClassLoader, String[]) In class edu.rice.cs.plt.reflect.ShadowingClassLoader At ShadowingClassLoader.java:[line 60]
|
|
DP
|
edu.rice.cs.plt.reflect.ShadowingClassLoader.whiteList(ClassLoader, String[]) creates a edu.rice.cs.plt.reflect.ShadowingClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.reflect.ShadowingClassLoader In method edu.rice.cs.plt.reflect.ShadowingClassLoader.whiteList(ClassLoader, String[]) In class edu.rice.cs.plt.reflect.ShadowingClassLoader At ShadowingClassLoader.java:[line 72]
|
|
DP
|
edu.rice.cs.plt.swing.SwingUtil.showApplet(String, URL, String, int, int, Map) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block |
|
Bug type DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED (click for details)
In class edu.rice.cs.plt.swing.SwingUtil In method edu.rice.cs.plt.swing.SwingUtil.showApplet(String, URL, String, int, int, Map) In class java.net.URLClassLoader At SwingUtil.java:[line 574]
|
|
HE
|
edu.rice.cs.plt.tuple.Octet defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Octet In method edu.rice.cs.plt.tuple.Octet.equals(Object) At Octet.java:[lines 82-86]
|
|
HE
|
edu.rice.cs.plt.tuple.Pair defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Pair In method edu.rice.cs.plt.tuple.Pair.equals(Object) At Pair.java:[lines 75-79]
|
|
HE
|
edu.rice.cs.plt.tuple.Quad defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Quad In method edu.rice.cs.plt.tuple.Quad.equals(Object) At Quad.java:[lines 78-82]
|
|
HE
|
edu.rice.cs.plt.tuple.Quint defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Quint In method edu.rice.cs.plt.tuple.Quint.equals(Object) At Quint.java:[lines 73-77]
|
|
HE
|
edu.rice.cs.plt.tuple.Septet defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Septet In method edu.rice.cs.plt.tuple.Septet.equals(Object) At Septet.java:[lines 79-83]
|
|
HE
|
edu.rice.cs.plt.tuple.Sextet defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Sextet In method edu.rice.cs.plt.tuple.Sextet.equals(Object) At Sextet.java:[lines 76-80]
|
|
HE
|
edu.rice.cs.plt.tuple.Triple defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Triple In method edu.rice.cs.plt.tuple.Triple.equals(Object) At Triple.java:[lines 75-79]
|
|
HE
|
edu.rice.cs.plt.tuple.Wrapper defines equals but not hashCode |
|
Bug type HE_EQUALS_NO_HASHCODE (click for details)
In class edu.rice.cs.plt.tuple.Wrapper In method edu.rice.cs.plt.tuple.Wrapper.equals(Object) At Wrapper.java:[lines 71-75]
|
|
SnVI
|
edu.rice.cs.plt.reflect.ReflectUtil$FieldBox is Serializable; consider declaring a serialVersionUID |
|
Bug type SE_NO_SERIALVERSIONID (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtil$FieldBox At ReflectUtil.java:[lines 511-542]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(byte[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(byte[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 406]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(char[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(char[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 371]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(double[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(double[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 581]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(float[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(float[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 546]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(int[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(int[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 476]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(long[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(long[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 511]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(Object[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(Object[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 301]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(short[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(short[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 441]
|
|
DMI
|
Invocation of toString on array in edu.rice.cs.plt.recur.RecurUtil.arrayToString(boolean[], RecurUtil$ArrayStringMode) |
|
Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details)
In class edu.rice.cs.plt.recur.RecurUtil In method edu.rice.cs.plt.recur.RecurUtil.arrayToString(boolean[], RecurUtil$ArrayStringMode) Local variable named array At RecurUtil.java:[line 336]
|
|
IL
|
There is an apparent infinite recursive loop in edu.rice.cs.plt.swing.SwingUtil.showApplet(String, Applet, int, int, URL) |
|
Bug type IL_INFINITE_RECURSIVE_LOOP (click for details)
In class edu.rice.cs.plt.swing.SwingUtil In method edu.rice.cs.plt.swing.SwingUtil.showApplet(String, Applet, int, int, URL) At SwingUtil.java:[line 593]
|
|
RCN
|
Nullcheck of parent at line 1765 of value previously dereferenced in edu.rice.cs.plt.io.IOUtil.isSafeThrowableClass(Class) |
|
Bug type RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE (click for details)
In class edu.rice.cs.plt.io.IOUtil In method edu.rice.cs.plt.io.IOUtil.isSafeThrowableClass(Class) Local variable named parent At IOUtil.java:[line 1765] Redundant null check at IOUtil.java:[line 1765]
|
|
EI
|
edu.rice.cs.plt.debug.ThreadSnapshot.snapshotTime() may expose internal representation by returning ThreadSnapshot._time |
|
Bug type EI_EXPOSE_REP (click for details)
In class edu.rice.cs.plt.debug.ThreadSnapshot In method edu.rice.cs.plt.debug.ThreadSnapshot.snapshotTime() Field edu.rice.cs.plt.debug.ThreadSnapshot._time At ThreadSnapshot.java:[line 136]
|
|
MS
|
edu.rice.cs.plt.reflect.ReflectUtilTest.MUTABLE_STATIC_FIELD isn't final but should be |
|
Bug type MS_SHOULD_BE_FINAL (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtilTest Field edu.rice.cs.plt.reflect.ReflectUtilTest.MUTABLE_STATIC_FIELD In ReflectUtilTest.java
|
|
MS
|
edu.rice.cs.plt.reflect.ReflectUtilTest.mutableNonstaticField isn't final but should be |
|
Bug type MS_SHOULD_BE_FINAL (click for details)
In class edu.rice.cs.plt.reflect.ReflectUtilTest Field edu.rice.cs.plt.reflect.ReflectUtilTest.mutableNonstaticField In ReflectUtilTest.java
|
|
IS
|
Inconsistent synchronization of edu.rice.cs.plt.io.ExpandingByteBuffer._eof; locked 85% of time |
|
Bug type IS2_INCONSISTENT_SYNC (click for details)
In class edu.rice.cs.plt.io.ExpandingByteBuffer Field edu.rice.cs.plt.io.ExpandingByteBuffer._eof Synchronized 85% of the time Unsynchronized access at ExpandingByteBuffer.java:[line 301] Synchronized access at ExpandingByteBuffer.java:[line 75] Synchronized access at ExpandingByteBuffer.java:[line 73] Synchronized access at ExpandingByteBuffer.java:[line 66] Synchronized access at ExpandingByteBuffer.java:[line 118] Synchronized access at ExpandingByteBuffer.java:[line 103] Synchronized access at ExpandingByteBuffer.java:[line 91] Synchronized access at ExpandingByteBuffer.java:[line 266]
|
|
IS
|
Inconsistent synchronization of edu.rice.cs.plt.io.ExpandingCharBuffer._eof; locked 85% of time |
|
Bug type IS2_INCONSISTENT_SYNC (click for details)
In class edu.rice.cs.plt.io.ExpandingCharBuffer Field edu.rice.cs.plt.io.ExpandingCharBuffer._eof Synchronized 85% of the time Unsynchronized access at ExpandingCharBuffer.java:[line 295] Synchronized access at ExpandingCharBuffer.java:[line 75] Synchronized access at ExpandingCharBuffer.java:[line 73] Synchronized access at ExpandingCharBuffer.java:[line 66] Synchronized access at ExpandingCharBuffer.java:[line 264] Synchronized access at ExpandingCharBuffer.java:[line 119] Synchronized access at ExpandingCharBuffer.java:[line 104] Synchronized access at ExpandingCharBuffer.java:[line 91]
|
|
STCAL
|
Call to method of static java.text.DateFormat in edu.rice.cs.plt.debug.TextLogSink.formatTime(Date) |
|
Bug type STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE (click for details)
In class edu.rice.cs.plt.debug.TextLogSink In method edu.rice.cs.plt.debug.TextLogSink.formatTime(Date) Called method java.text.DateFormat.format(Date) Field edu.rice.cs.plt.debug.TextLogSink.TIME_FORMATTER At TextLogSink.java:[line 96]
|
|
Dm
|
edu.rice.cs.plt.collect.WeakHashSetTest.runGCUntil(Condition) forces garbage collection; extremely dubious except in benchmarking code |
|
Bug type DM_GC (click for details)
In class edu.rice.cs.plt.collect.WeakHashSetTest In method edu.rice.cs.plt.collect.WeakHashSetTest.runGCUntil(Condition) At WeakHashSetTest.java:[line 260]
|
|
Dm
|
edu.rice.cs.plt.reflect.ClassLoaderTestCase.assertHasDifferentResource(ClassLoader, ClassLoader, String) invokes java.net.URL.equals(Object), which blocks to do domain name resolution |
|
Bug type DMI_BLOCKING_METHODS_ON_URL (click for details)
In class edu.rice.cs.plt.reflect.ClassLoaderTestCase In method edu.rice.cs.plt.reflect.ClassLoaderTestCase.assertHasDifferentResource(ClassLoader, ClassLoader, String) Called method java.net.URL.equals(Object) At ClassLoaderTestCase.java:[line 106]
|
|
Dm
|
edu.rice.cs.plt.tuple.TupleTest.testIdentityTriple() invokes inefficient new String(String) constructor |
|
Bug type DM_STRING_CTOR (click for details)
In class edu.rice.cs.plt.tuple.TupleTest In method edu.rice.cs.plt.tuple.TupleTest.testIdentityTriple() At TupleTest.java:[line 111]
|
|
Dm
|
edu.rice.cs.plt.tuple.TupleTest.testIdentityWrapper() invokes inefficient new String(String) constructor |
|
Bug type DM_STRING_CTOR (click for details)
In class edu.rice.cs.plt.tuple.TupleTest In method edu.rice.cs.plt.tuple.TupleTest.testIdentityWrapper() At TupleTest.java:[line 55]
|
|
Dm
|
edu.rice.cs.plt.tuple.TupleTest.testTriple() invokes inefficient new String(String) constructor |
|
Bug type DM_STRING_CTOR (click for details)
In class edu.rice.cs.plt.tuple.TupleTest In method edu.rice.cs.plt.tuple.TupleTest.testTriple() At TupleTest.java:[line 95]
|
|
Dm
|
edu.rice.cs.plt.tuple.TupleTest.testWrapper() invokes inefficient new String(String) constructor |
|
Bug type DM_STRING_CTOR (click for details)
In class edu.rice.cs.plt.tuple.TupleTest In method edu.rice.cs.plt.tuple.TupleTest.testWrapper() At TupleTest.java:[line 45]
|
|
SIC
|
Should edu.rice.cs.plt.collect.ConcreteRelationIndexTest$StubIndex be a _static_ inner class? |
|
Bug type SIC_INNER_SHOULD_BE_STATIC (click for details)
In class edu.rice.cs.plt.collect.ConcreteRelationIndexTest$StubIndex At ConcreteRelationIndexTest.java:[lines 278-307]
|
|
Eq
|
edu.rice.cs.plt.collect.ConcreteRelationIndex$ValueSet doesn't override DelegatingSet.equals(Object) |
|
Bug type EQ_DOESNT_OVERRIDE_EQUALS (click for details)
In class edu.rice.cs.plt.collect.ConcreteRelationIndex$ValueSet In method edu.rice.cs.plt.collect.DelegatingSet.equals(Object) At DelegatingSet.java:[line 51]
|
|
Eq
|
edu.rice.cs.plt.collect.DelegatingRelation doesn't override DelegatingSet.equals(Object) |
|
Bug type EQ_DOESNT_OVERRIDE_EQUALS (click for details)
In class edu.rice.cs.plt.collect.DelegatingRelation In method edu.rice.cs.plt.collect.DelegatingSet.equals(Object) At DelegatingSet.java:[line 51]
|
|
Eq
|
edu.rice.cs.plt.collect.ImmutableRelation doesn't override DelegatingSet.equals(Object) |
|
Bug type EQ_DOESNT_OVERRIDE_EQUALS (click for details)
In class edu.rice.cs.plt.collect.ImmutableRelation In method edu.rice.cs.plt.collect.DelegatingSet.equals(Object) At DelegatingSet.java:[line 51]
|
|
Eq
|
edu.rice.cs.plt.collect.ListenerSet doesn't override DelegatingSet.equals(Object) |
|
Bug type EQ_DOESNT_OVERRIDE_EQUALS (click for details)
In class edu.rice.cs.plt.collect.ListenerSet In method edu.rice.cs.plt.collect.DelegatingSet.equals(Object) At DelegatingSet.java:[line 51]
|
|
Eq
|
edu.rice.cs.plt.collect.SnapshotSynchronizedList doesn't override DelegatingList.equals(Object) |
|
Bug type EQ_DOESNT_OVERRIDE_EQUALS (click for details)
In class edu.rice.cs.plt.collect.SnapshotSynchronizedList In method edu.rice.cs.plt.collect.DelegatingList.equals(Object) At DelegatingList.java:[line 53]
|
|
Eq
|
edu.rice.cs.plt.collect.SnapshotSynchronizedSet doesn't override DelegatingSet.equals(Object) |
|
Bug type EQ_DOESNT_OVERRIDE_EQUALS (click for details)
In class edu.rice.cs.plt.collect.SnapshotSynchronizedSet In method edu.rice.cs.plt.collect.DelegatingSet.equals(Object) At DelegatingSet.java:[line 51]
|
|
IA
|
Ambiguous invocation of either an outer or inherited method edu.rice.cs.plt.concurrent.TaskController$State.start() in edu.rice.cs.plt.concurrent.TaskController$WaitingState.get() |
|
Bug type IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD (click for details)
In class edu.rice.cs.plt.concurrent.TaskController$WaitingState In method edu.rice.cs.plt.concurrent.TaskController$WaitingState.get() Inherited method edu.rice.cs.plt.concurrent.TaskController$State.start() Did you intend to invoke edu.rice.cs.plt.concurrent.TaskController.start() At TaskController.java:[line 323]
|
|
IA
|
Ambiguous invocation of either an outer or inherited method edu.rice.cs.plt.concurrent.TaskController$State.start() in edu.rice.cs.plt.concurrent.TaskController$WaitingState.get(long, TimeUnit) |
|
Bug type IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD (click for details)
In class edu.rice.cs.plt.concurrent.TaskController$WaitingState In method edu.rice.cs.plt.concurrent.TaskController$WaitingState.get(long, TimeUnit) Inherited method edu.rice.cs.plt.concurrent.TaskController$State.start() Did you intend to invoke edu.rice.cs.plt.concurrent.TaskController.start() At TaskController.java:[line 326]
|
|
NP
|
Possible null pointer dereference in edu.rice.cs.plt.concurrent.JVMBuilderTest.checkProcessOutput(Process, String, String, Iterable) due to return value of called method |
|
Bug type NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE (click for details)
In class edu.rice.cs.plt.concurrent.JVMBuilderTest In method edu.rice.cs.plt.concurrent.JVMBuilderTest.checkProcessOutput(Process, String, String, Iterable) Called method edu.rice.cs.plt.io.IOUtil.parsePath(String) Argument 1 might be null but must not be null Local variable stored in JVM register ? Method invoked at JVMBuilderTest.java:[line 71] Known null at JVMBuilderTest.java:[line 71]
|
|
REC
|
Exception is caught when Exception is not thrown in edu.rice.cs.plt.reflect.PathClassLoaderTest.assertCannotGet(ClassLoader, String) |
|
Bug type REC_CATCH_EXCEPTION (click for details)
In class edu.rice.cs.plt.reflect.PathClassLoaderTest In method edu.rice.cs.plt.reflect.PathClassLoaderTest.assertCannotGet(ClassLoader, String) At PathClassLoaderTest.java:[line 137]
|
|
ST
|
Write to static field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj from instance method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testComputeInProcess() |
|
Bug type ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD (click for details)
In class edu.rice.cs.plt.concurrent.ConcurrentUtilTest In method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testComputeInProcess() Field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj At ConcurrentUtilTest.java:[line 221]
|
|
ST
|
Write to static field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj from instance method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testComputeInThread() |
|
Bug type ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD (click for details)
In class edu.rice.cs.plt.concurrent.ConcurrentUtilTest In method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testComputeInThread() Field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj At ConcurrentUtilTest.java:[line 121]
|
|
ST
|
Write to static field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj from instance method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testComputeIncrementalInProcess() |
|
Bug type ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD (click for details)
In class edu.rice.cs.plt.concurrent.ConcurrentUtilTest In method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testComputeIncrementalInProcess() Field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj At ConcurrentUtilTest.java:[line 272]
|
|
ST
|
Write to static field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj from instance method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testRunInThread() |
|
Bug type ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD (click for details)
In class edu.rice.cs.plt.concurrent.ConcurrentUtilTest In method edu.rice.cs.plt.concurrent.ConcurrentUtilTest.testRunInThread() Field edu.rice.cs.plt.concurrent.ConcurrentUtilTest._obj At ConcurrentUtilTest.java:[line 105]
|
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.
Code explicitly invokes garbage collection.
Except for specific use in benchmarking, this is very dubious.
In the past, situations where people have explicitly invoked
the garbage collector in routines such as close or finalize methods
has led to huge performance black holes. Garbage collection
can be expensive. Any situation that forces hundreds or thousands
of garbage collections will bring the machine to a crawl.
Using the java.lang.String(String) constructor wastes memory
because the object so constructed will be functionally indistinguishable
from the String passed as a parameter. Just use the
argument String directly.
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.
The equals and hashCode
method of URL perform domain name resolution, this can result in a big performance hit.
See http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html for more information.
Consider using java.net.URI instead.
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.
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.
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.
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).
This class overrides equals(Object), but does not
override hashCode(). Therefore, the class may violate the
invariant that equal objects must have equal hashcodes.
An inner class is invoking a method that could be resolved to either a inherited method or a method defined in an outer class. By the Java semantics,
it will be resolved to invoke the inherited method, but this may not be want
you intend. If you really intend to invoke the inherited method,
invoke it by invoking the method on super (e.g., invoke super.foo(17)), and
thus it will be clear to other readers of your code and to FindBugs
that you want to invoke the inherited method, not the method in the outer class.
This method unconditionally invokes itself. This would seem to indicate
an infinite recursive loop that will result in a stack overflow.
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
- The class contains a mix of locked and unlocked accesses,
- At least one locked access was performed by one of the class's own methods, and
- 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.
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.
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.
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.
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.
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.
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.
This instance method writes to a static field. This is tricky to get
correct if multiple instances are being manipulated,
and generally bad practice.
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.