Just ask. Don't give an ultimatum that if you don't see the code, you're going to walk out the door. There may be legitimate reasons they can't show it. If you feel this is a deal breaker, just decline the next interview.

Although they weren't selling commercial software, I have seen code during an interview and I didn't even have to ask. They wanted to know if I understood it.

Cleaning up code is always going to be part of the job. You may feel you hold very high standards for your current coding practices, but in a year or so, you may not be so pleased with it.

Don't be so harsh. A picture may contain a thousand words, but it only shows one side of the story.

Edit: I think a key here is are they going to put you into a position to write poor code. That could be the reason for a current code base that is low quality or it may be the previous programmers weren't as skilled. Cleanup isn't always fun, but it is tolerable if you know the company is going to put you into a position to successful and do quality work.