Pergunta de entrevista da empresa Quality Compliance Systems

How would you refactor this?