This will throw a null pointer exception when referencedJob.getStatistics().getQuery() is null 