I downloaded the set of book projects from the BlueJ website to use as a test set. In the chapter11 directory is a project called "imageviewer-final". Load that up and look at the ImageViewer class. Down near the very bottom, there is a for-each loop that breaks the parser. The scope highlighting makes the problem obvious, but it is definitely a parser problem, not a scope highlighting problem. I've attached a screenshot. The parser thinks that the method ends at the close-parenthesis on that line (and there is a problem with the for-loop ending at the colon too), and hence all the scope highlighting after that point is screwed up. Removing the "final" qualifier from the variable declaration in the for-loop header fixes the problem, so that must be what is confusing the parser.