FindBugs Report

Project Information

Project: <<unnamed project>>

FindBugs version: 0.9.1

Code analyzed:

Contents

Warnings

Click on a warning row to see full context information.

Correctness Warnings

Code  Warning
IJU TestCase org.abora.ug2java.TestWriteMethod implements setUp but doesn't call super.setUp()

Internationalization Warnings

Code  Warning

Multithreaded Correctness Warnings

Code  Warning

Malicious Code Vulnerability Warnings

Code  Warning

Performance Warnings

Code  Warning
SBSC Method org.abora.ug2java.ClassParser.parseJavaSafeVarNameDeclaration(org.abora.ug2java.stscanner.SmalltalkScanner) concatenates strings using + in a loop
SBSC Method org.abora.ug2java.util.NameSupport.idToString(String) concatenates strings using + in a loop

Style Warnings

Code  Warning
CD Class org.abora.ug2java.JavaClass has a circular dependency with other classes.
CD Class org.abora.ug2java.JavaMethod has a circular dependency with other classes.
CD Class org.abora.ug2java.transform.method.intra.TransformSignals has a circular dependency with other classes.
DLS Dead store to local variable in method org.abora.ug2java.transform.method.intra.TransformCastIntoOthers.transform(org.abora.ug2java.JavaMethod,java.util.List,int)
DLS Dead store to local variable in method org.abora.ug2java.transform.method.intra.TransformCastIntoOthers2.transform(org.abora.ug2java.JavaMethod,java.util.List,int)
DLS Dead store to local variable in method org.abora.ug2java.transform.method.intra.TransformPrintOnBase.transform(org.abora.ug2java.JavaMethod,java.util.List,int)
DLS Dead store to local variable in method org.abora.ug2java.transform.method.intra.TransformStringAsTextWriteStream.transform(org.abora.ug2java.JavaMethod,java.util.List,int)
Nm The method name org.abora.ug2java.TestWriteMethod.XtestCastIntoMultipleTypes() doesn't start with an lower case letter

Details

CD_CIRCULAR_DEPENDENCY: Test for circular dependencies among classes.

This class has a circular dependency with other classes. This makes building these classes difficult, as each is dependent on the other to build correctly. Consider using interfaces to break the hard dependency.

DLS_DEAD_LOCAL_STORE: Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

IJU_SETUP_NO_SUPER: TestCase implements setUp but doesn't call super.setUp()

Class is a JUnit TestCase and implements the setUp method. The setUp method should call super.setUp(), but doesn't.

NM_METHOD_NAMING_CONVENTION: Method names should start with an lower case letter

Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.

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