Java Parser: Fixes issue #374 with OS $1 replacement