Well, rhythmically, it's just a sequence of a bunch of successive quarter notes in 4-4 time, and that's so basic that there are plenty of pieces of music you could compare it to. It's not even remotely unusual enough a pattern to suggest that there's any direct reference intended between these two specific examples. I mean, the Kreutzer etudes that Jack Benny was constantly mangling on his violin as a running gag also have the same simple rhythmic pattern, but I don't think Herrmann was referencing them. There's also a part of John Williams's Close Encounters
score that has much the same rhythmic pattern -- though it's possible that there might've been an actual stylistic influence from Herrmann there.
There are only so many ways to put notes together in a euphonious way. Lots of bits of music sound kind of like other bits of music, and most of the time it's a coincidence. Heck, plenty of things in life in general will always remind you of other things, because there are plenty of recurring patterns and limitations in the world. So you can't assume that every similarity you notice is evidence of an intentional reference. The overwhelming majority of the time, it won't be.