mallet java code