A NullPointerException may occur while producing the diagnostic output requested using the -TJ option, which traces the process of binding calls to extension functions.
The problem occurs because the trace attempts to output information in the expression tree that has not yet been initialized at this stage of the compilation.
A patch is being placed in Subversion. It is in two parts
(a) a change to JavaExtensionLibrary to avoid calling explain() on the arguments to the function call being bound
(b) a patch to VariableReference.explain() to check whether the display name of the variable has been initialized before trying to display it.