J.P. Morgan interview question

Find the bug in code