I would hate to find myself in a situation like that, but bad code isn't the only thing to look out for. I would dread finding out 80% of their code came from open source and that they made it a point to not contribute the changes back to the community. This would really rile my feathers. Particularly if they asked applicants about their open source contributions.
Jump at the chance to look at the codebase. A whole day coding, I get the concern there, but yes, otherwise, I urge you a thousand times, look at the codebase.