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.
Most StringBuffer instances that occur as local variables can be migrated to StringBuilder safely. I have created JBPM-2148 to follow up.