reorder stacktrace elements to match java stacktrace