According to the Mishna (71b), if a person slaughters his korban Pesah on Shabbat with the wrong intent, invalidating the sacrifice, he will be held liable for desecrating Shabbat and will have to bring a sin-offering. If he mistakenly slaughtered a different sacrifice with the intention that it was the korban Pesah, if the animal could not possibly have been a korban Pesah (e.g. it was the wrong type of animal), all are in agreement that he is liable, and he will need to bring a sin offering. If, however, the animal was one that looked as though it could have been a korban Pesah, we find a disagreement between Rabbi Eliezer, who finds him liable for the act and Rabbi Yehoshua who says he is not liable, since he thought that he was performing a permissible act.
The Gemara discusses whether the cases discussed were where the person changed his intention about the sacrifice consciously or if it was done in error. After some discussion the Gemara concludes that in the first case, where the korban Pesah was slaughtered with the wrong intent, we are talking about a case where the person consciously changed his mind about the korban. In the second case, where a different sacrifice was slaughtered with the thought that it was a korban Pesah, we are talking about a case where it was done in error.
The Gemara relates that Rav Yitzhak bar Yosef once found Rabbi Abbahu standing among a multitude [okhlosa] of people, and he said to him: What is the meaning of our mishna? Rabbi Abbahu said to him: The first clause is referring to one who intentionally uprooted the animal’s status, whereas the latter clause is referring to one who erred about it. Rav Yitzhak bar Yosef learned this statement from him forty times, and it seemed to him as though it were resting in his pouch; i.e. he repeated it many times until the mishna became crystal clear to him and etched in his memory.
This idea (which appears in several versions throughout the Talmud) is connected with the system of study that was prevalent in the time of the Gemara, which was based largely on memorization based on rote repetition. On occasion, when a scholar heard an unusual interpretation that he wanted to commit to memory, he would repeat it a large number of times in order to remember it exactly. In our case, the suggestion that the two cases of the Mishna should be understood as referring to two separate situations (one where the person erred, the other where the person intentionally changed the sacrifice) is one that is not usually accepted, leading Rav Yitzhak bar Yosef to decide to commit it to memory.