Chapter 1 Mishna 9
פרק א משנה ט

Shimon ben Shatach would say: "interrogate the witnesses extensively, and be cautious with your words, lest through them they learn to lie."
שִׁמְעוֹן בֶּן שָׁטָח אוֹמֵר, הֱוֵי מַרְבֶּה לַחְקֹר אֶת הָעֵדִים, וֶהֱוֵי זָהִיר בִּדְבָרֶיךָ, שֶׁמָּא מִתּוֹכָם יִלְמְדוּ לְשַׁקֵּרן


~Level 1~
Tiferet Yisrael - "interrogate the witnesses extensively" - perhaps through this they will contradict themselves.
~Level 1~
Rabeinu Yonah - investigate and question them much. Through this, you will uncover the secret. For "When words are many, sin is not absent" (Mishlei 10:19). And from their words you will learn whether or not they are lying.
~Level 2~
Chida - Roshei Avot - "investigate much" (marbe lachkor) - possibly included in his words is that the examination of witnesses he does now should be different from previous examinations of witnesses. This is the meaning of "investigate much". That the examination be different for all witnesses. For if they are all in one standard way, they may learn to lie. Since they know of previous examinations and prepared themselves.
~Level 1~
Bartenura - "and be cautious with your words, lest through them they learn to lie" - the judge should not say: "perhaps it happened in such and such a way", or "if it happened like this, he would not be guilty". For from those words, the plaintiff, defendant, or witnesses may learn to say something that did not happen (lie).
~Level 1~
Rashi - be careful when you examine the witnesses, perhaps through your words, they will sense what is in your mind and will understand how to lie saying what did not happen.
~Level 1~
Rabeinu Yonah - when you question them on the matter, you might speak in a way that they will understand from what angle their beloved friend will be found guilty. Thus, from your words, they will learn how to lie to absolve him.
~Level 3~
Ben Ish Chai - Chasdei Avot (on Mishna 1: "be deliberate in judgment") - The Tanna (Sage) came to teach the proper way for the judges of Israel on how to conduct themselves properly so that a calamity of corruption of justice will not occur through them, namely, to take out money from one person wrongly, due to frauds. Such as, when one claims a fraudulent claim to steal the money of his fellow.

Even more, one needs to be careful that a false oath is not uttered in his court, whereby a swindler swears falsely and wins his case, thus causing a desecration of the honor of torah.. All these mishaps can occur if the judge does not put to heart to contemplate the claims the litigants place before him. For if he does not examine properly with the eyes of his intellect and to think of tricks to bring out the trickery to light, so that they will not need to swear a torah oath.

In truth, one needs to be a Chacham (wise man) and Navon (understanding). For when he detects one of the litigants is a fraud, he needs to find a way to speak with him.

For example, there was a true story where one person was walking on the street and he saw a gold coin on the ground. The street was very long. He took it and put it in his pocket. Another person was on the other end of the street and saw him from far picking up the gold coin. He approached him and said:

"That gold coin you picked up from the ground is mine. It fell from me a few minutes ago when I was walking here and I had just sensed it and came back to search for it on this street and I saw that you picked it up. Give it to me. It is mine."

The other claimed: "you are lying. The gold coin did not fall from you. This coin fell from someone else and I acquired it as a lost object".

They both came to the Rav for a judgment and spoke their words. The swindler said he was willing to swear with a sefer torah that three minutes before he was walking on that street and the gold coin fell from him and no one else walked there for four minutes. Therefore, without a doubt that gold coin is mine.

In his wisdom, the Rav detected that this claimant is a fraud and that he wants to swear falsely with a sefer torah. The Rav thought how to bring out this fraudery to light so that the sinner will not profit to steal the gold coin from he who rightly acquired it and will not swear a false oath.

What did he do? He told the fraud: "go and stand outside and close the door. I would like to question the defendant privately to clarify the matter." He went out immediately and shut the door. The fraud stood outside next to the door in order to listen to what the Rav speaks to the defendant. The Rav spoke with a slightly louder than normal voice, not whispering, so that the fraud will hear. For he understood that certainly the fraud is lending his ear to listen behind the door.

He told the defendant: "let me see the gold coin". He gave it to him. After the Rav took it, he told the defendant: "look, this gold coin has a siman muvhak (distinguishing sign). It has a small hole on the right side. If so, why should this person take an oath? Let's ask him to give a siman (sign) and if he says this siman of the hole on the right side, certainly it is his. And we can give it to him without an oath. And if he does not give a sign, it is yours and I will give it to you."

He smiled as he said this in order that he understand that he is speaking in order to trick the trickster. For the defendant can see that there is no hole on the coin.

Afterwards, he yelled and called out the swindler standing outside and told him to enter. He told him: "the gold coin is in my hand and it has a siman (distinguishing sign). now, if it is yours, tell me the siman and you can take it without an oath."

The fraud said: "good thing. I will tell you the siman it has. It has a small hole on the right side!"

The Rav asked: "this is the sign and there is none other?". He replied: "yes, it has no sign other than the hole on the right side".

The Rav laughed and opened his hand to reveal the coin. He told the fraud: "see. this gold coin which you claim from this man does not have any hole. If so, it is not yours. For according to your words, your coin has a hole and this one does not. Thus, it must have fallen from someone else and this man acquired it."

The fraud was humiliated and left.