class Foo { void test() { StringBuilder sb = new StringBuilder(); sb.append(sb); sb.append("bar"); sb.append("baz"); } }