BMC Software Interview Question

How do you refactor code?