Sanhedrin, Chapter Seven, Mishnah Five
Mishnah five deals with the blasphemer and the special circumstances of his trial.
1) The blasphemer is punished only if he utters [the divine] name.
2) Rabbi Joshua b. Korcha said: The whole day [of the trial] the witnesses are examined by means of a substitute for the divine name:, may Yose smite Yose.
3) When the trial was finished, the accused was not executed on this evidence, but all persons were removed [from court], and the chief witness was told, State literally what you heard.
4) Thereupon he did so, [using the divine name].
5) The judges then arose and tore their garments, which were not to be resewn.
6) The second witness stated: I too have heard thus [but not uttering the divine name], and the third says: I too heard thus.
With regards to the blasphemer the Torah states (Lev. 24:15): Anyone who blasphemes his God shall bear his guilt. If he also pronounces the name of the Lord, he shall be put to death. From these verses the Rabbis learned that the blasphemer was obligated for the death penalty only if he used Gods four letter name.
The problem with putting the blasphemer on trial is that when the witnesses testify and repeat what they heard, they too will be blaspheming Gods name. Although they certainly would not receive the death penalty for doing so, it was nevertheless seen to be unacceptable for even a witness to repeat what he heard, especially in a public trial. Therefore, during the courts deliberation they used a code word, may Yose smite Yose. However, in order to complete the trial the witnesses needed to state what they heard explicitly at least one time. Therefore, at the end of the trial they would remove everyone from the court and only the witnesses and the judges would remain. They would then ask the eldest witness to say explicitly what he heard. So painful was it for the judges to hear Gods name being blasphemed that they would tear their clothes and not repair them. This was a typical sign of mourning. The remaining witnesses would not need to say exactly what they heard, thereby repeating the blasphemy. Rather they would merely say that they heard what the first person heard.