Xerox interview question

How would you deal with really bad code?