Refactoring java recipe.