Fixing bug to compiler in Java