As is fairly obvious, someone with a personal, vested interest in a disputed property will not be permitted to testify about that case. Can a person declare that he renounces any claim to the property in question, and then be allowed to testify?
The Gemara appears to assume that a person can remove his self-interest and be able to testify about real estate, but there is a baraita that appears to contradict this. According to the baraita, if a Sefer Torah is stolen in a city, the thief who is caught cannot be tried by residents of the city, nor can they testify against him. The reason for this is, apparently, because the Sefer Torah is communal property; since everyone in the city has a share in it, they cannot testify about it. According to the Gemara’s reasoning, however, shouldn’t two people be able to renounce their share of the Sefer Torah and act as witnesses? In response the Gemara says that a Sefer Torah is unique because it is used for public readings in the synagogue. Therefore, even someone who does not have ownership of it still has a personal interest in it.
A question raised by the rishonim is how residents of the city could be called upon to testify even if they renounce ownership in the Sefer Torah. Since they were invalid witnesses at the time of the incident, how can a change in status affect their ability to testify?
The Ra’avad suggests that we must distinguish between different kinds of problems with witnesses. If there is an intrinsic problem with a witness (e.g. he is related to one of the people in the case), even if that problem is removed the witness cannot testify about knowledge that he gained at a time that he could not be a witness. In our case, however, he could not be trusted at first because of a monetary interest in the case. Once that monetary interest is removed, we can accept testimony even on what he learned at an earlier time.