============old code
sourceFileName = jc.getSourceFileName();
// bcel seems to behave differently on Windows, returning <Unknown>,
// which gives us problems when writing/reading XML traces
if (sourceFileName.equalsIgnoreCase("<Unknown>") ||
sourceFileName.equalsIgnoreCase("Unknown")) {
sourceFileName = name.replace('.', File.separatorChar) + ".java";
}
if (packageName.length() > 0) {
sourceFileName = packageName.replace('.', File.separatorChar) +
File.separator + sourceFileName;
}
============
According to: http://jakarta.apache.org/bcel/apidocs/org/apache/bcel/classfile/JavaClass.html
JavaClass.getSourceFileName() will return absolute path. It means that sourceFileName will already have information about package so if construction with packageName.length will cause sourceFileName to contains these kind of content:
java.util.concurrent\java\util\concurrent\RentrantLock.java which is obviously incorrect. These bug occurs in DeadlockAnalyzer. Patch in attachment.
Patch