Wait, how do the logistics of this prank work? His buddy patched the plane's software on the fly (ha!) without anyone else noticing? Or he inserted some "prank" code into the main codebase, got it past what I'm sure is ton of code review hurdles without anyone noticing, then got it deployed to the plane before his pilot friend took flight that day?
If you build a system, you'll know its flaws. A common flaw with radar systems is them detecting something that's not a plane as a plane - e.g., the sun over the horizon.
If he built the software that automatically rejects such mistaken identifications, he also knows in which situations you'll get a false positive reading, and can tell his friend the perfect timing for the prank.