Pergunta de entrevista da empresa Atlassian

I was asked to refactor some code