To the original poster:
I too have been in several programming classes while working on my computer science degree. What you're describing is pretty rampant everywhere. Unfortunately, professors don't have the time to look through everyone's code to see if there are similarities between two different individual's assignments. Out of all the classes that I've taken, I've only had one professor that would actually look at the code. The rest would just compile and run it once. When they're grading several hundred of these types of assignments, it would be easy for them to overlook things like what has happened to you. I'm not saying it's right, and I'm not condoning the action in any way....it's just what happens.
Kudos on blowing the whistle on them, though. Hopefully the professor will take the opportunity to actually do something about it in order to discourage the practice in the future. Let us know what happens.
Don't tell me this is why we are having such a hard time finding programmers in our area to hire. Sure, we get plenty of resumes, but when we screen them with an ad hoc 'exam' consisting of 5 undergrad-level questions... a good 90% of them show they lack the skills to understand what they are putting on paper. Ouch.