If you're complaining about the legality of incorporating the leaked code, you aren't ready for a world where free software rules. The end game of free and, to a lesser extent, of open source software is to live in a world where copyright and patents no longer apply to software. Basically, software will be treated like mathematics.
Incorporating the leaked code if it is indeed highly useful brings us closer to that world. It's forced expropriation but I think we need some of that, especially since companies like Oracle are trying to limit how much open source software they produce.
I wouldn't be surprised if there's an outlaw version of FreeBSD or IllumOS that's released over Freenet or Bittorrent or patches are encrypted and traded over IRC if the leaked code proves to be very useful. In fact I would hope that that happens.