I noticed a lot of StringBuffer use in the codebase. I think that in Java 5, all string concatenations are automatically changed at runtime to StringBuilder [which is faster than StringBuffer]. Unless we are worried about thread concurrency in a given class, I don't think we should be using StringBuffer explicitly.
See:
http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html
http://peterbacklund.blogspot.com/2007/02/stringbuilder-vs-stringbuffer-and-java.html
Most StringBuffer instances that occur as local variables can be migrated to StringBuilder safely. I have created JBPM-2148 to follow up.