Modify java snippet.