Modifined java snippets