Squirt is correct
Here I go again with my "as a writer" line, but, as a writer I can tell you that, no matter how original you think your story is at the time you write it, you will always have someone read it and tell you it's a rip-off of something that you've never heard of in your life.
It happens to me all the time. I think my novel, Ravaj, is probably one of the more original sci-fi books I've managed to get my hands on, but the general idea is fairly cliched by now. It isn't so much what you tell, but how you tell it. If you tell an old story in such a way that your version is not even recognisable, or with an original perspective or twist, it will be extremely successful. Essentially, there is no such thing as an original plot. I don't believe that Stargate and Star Trek plagiarise ideas, probably not even in a very superficial way, although I wouldn't be at all surprised to know that the writers watch each others' shows, just as I read other sci-fi writers' books. However, if plagiarism does occur, it is either because Michael Greeburg said "Hey, wow, what a cool idea Ronald D Moore had! I bet that I could turn that into a really awesome Stargate episode" or vice versa; or they saw the show, thought that it was a cool idea and, when writing an episode for their own series, subconsiously integrated the concepts into it. I know what this is like; I have done it many times, and it isn't until later that you read back and suddenly think "Man, how could I now have realised what a blatant rip-off that looks like?"