Fixed printing of java code that calls functions