Project: <<unnamed project>>
FindBugs version: 0.9.1
Code analyzed:
Click on a warning row to see full context information.
| Code | Warning |
|---|---|
| IJU | TestCase org.abora.ug2java.TestWriteMethod implements setUp but doesn't call super.setUp() |
| Code | Warning |
|---|
| Code | Warning |
|---|
| Code | Warning |
|---|
| 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 |
| 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 |
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.
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.
Class is a JUnit TestCase and implements the setUp method. The setUp method should call super.setUp(), but doesn't.
Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.
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();