java bug2 snippets