Thomson Reuters Interview Question

The piece of code to analyse could be tricky