BMC Software interview question

How do you refactor code?