Everything I've read has said that OS X featured parts of FreeBSD, never heard of NetBSD being used. (Yes, they are sibling projects and probably share more code than I'm aware.)
But, let me guess, "everything you've read" does not include the source code?
Are we talking the "part of OSX" that is called "Darwin"? If so, the code is all online. Easiest way to determine how much code is from NetBSD is to read it. And diff it against NetBSD's CVS repo.
Sort of. Running diff alone will tell you when code is similar or the same, but it won't tell you whether that similarity is because code moved directly from NetBSD to Darwin (or vice versa if that happened) or because they share many common ancestors (from the graphic, that would be at least BSD 4.3, BSD 4.4, BSD NET/2, 386BSD,..)
Are we talking the "part of OSX" that is called "Darwin"? If so, the code is all online. Easiest way to determine how much code is from NetBSD is to read it. And diff it against NetBSD's CVS repo.