It is highly unlikely that they are going to provide you with a sample of the code, so really what you need to figure out is how you can answer your questions without seeing the code. You're trying to make sure that they value good coding practices, so ask them about that.
Here are some example questions that should help you understand how much value the company puts on maintaining quality code over time. There are plenty of other things that you can ask specific to your situtationsituation and priorities.
- What sort of source control do you use?
- How does the team report bugs?
- Do you conduct peer reviews on code?
- How do you ensure that code written by one developer will be easy to read and understand by another?
- How do you maintain legacy code over time?
- How do you keep your team members up-to-date on the best coding practices and techniques?
- Do you use any static analysis tools, such as Checkstyle, to enforce coding standards? (@Ryan)
- How long is your code freeze before a release? (@Sandra Walters)
- What is your test framework? (@m24p)
- At what point in development did you start implementing good coding practices? (@dotancohen)
EDIT:
Some folks are pointing out that just because the interviewer tells you something, doesn't mean it's entirely true. Their standards for peer review may not match yours, or maybe the manager doesn't know as much about histheir team's coding practices as he thinksthey think. This is true of everything you are told at an interview, across all topics, and you have to rely on trust at a certain point. If you really would feel more comfortable seeing some code, then by all means, ask! I just don't think you can presume the answer will be yes.