How could the possibly have been trained on the proprietary source code of games made many years ago?
I'm afraid, the companies in question, have been more than happy to ingest pirated material.
And the forefront models have intentionally been trained on quite a bit of reverse-engineering.
[0] https://en.wikipedia.org/wiki/List_of_commercial_video_games...