Add Java sample, fix string-case bug in Haskell sample