Add a name-resolution and scope analysis for Java