It's a really good question.
Historically, up through the OCP 7, the exam creation team worked hard to remove any such questions. For the OCP 8, we participated in the 1st phase of exam creation, but we didn't participate in the final question review process. I would hope that the final reviewers removed any such questions, but I wouldn't guarantee it.
But in the end, I don't think there's any way around the fact that while you're taking the exam, you have to read the code. What I will say is that for most candidates, there is plenty of time during the exam.