Atlassian Interview Question

I was asked to refactor some code