The actions of paedophile hunting vigilantes have been criticised by a York Crown Court judge.