Infor Interview Question

Q: Refactor this piece of code, removing dead code, etc.