Works only when the CompilationInfo was created by JavaSource using
the compatibility bridge, when the CompilationInfo was created by the parsing api
it returns null. Use CompilationInfo.getSnapshot() instead.