Judge Francis Gilbert QC was hearing the case of William Lennox, 18, who is accused of assaulting his girlfriend.

But after being handed the charge sheet, he found himself reading out: “On 29th October, knowing or believing that blah, blah, blah was assisting in an investigation, did an act, namely yakkity schmakitty, intended to intimidate blah, blah, blah.”

Asking prosecuting barrister Emma Birt whether he had been given the correct document, the lawyer insisted that there had been a mistake and that she had not handed over the proper paper.

A spokesman for the Crown Prosecution Service (CPS) later said that “two cases against the defendant were merged on the computer, [and] the ‘dummy’ indictment overwrote the correct one.

“The error was identified well in advance of the hearing.”

However, in court Judge Gilbert was not impressed and, after bailing the accused, told those assembled: “I hope the CPS will act a little bit more seriously in future.”