Missing Feature
The StmtGraph.buildTraps() API should only be used for the serialization for Jimple and should therefore be moved to the JimplePrinter. This also requires the adjustment of some code depending on this API (e.g. Body.getTraps() and uses in test cases).
Additionally, to avoid the "invalid StmtGraph because a trap's end stmt was not visited" exception when printing traps, add a nop statement in cases where a trap's end stmt is missing.