Defence? Of course it is - not
Not true with software, if he created it he would have intermediate builds, maybe a few test routines, lots of documentation, possibly a flow chart or two, various code that failed and basically his archives or project management software should provide a history of code from an empty project to the finished item.
Alternatively when someone creates something by copying existing work then little if any of this would exist.
In order for a third party to prove plagiarism they would need access to his code to compare it with the alleged source.
I know nothing about the specifics of this case and have no opinion either way, I’m just pointing out that it not hard to disprove plagiarism in software design.