Honestly, there are many fantastic resources on the net, and I wouldn't dissuade your students from using any of them.
Of course, there are lazy students and there's many lazy professionals. At the end of the day, those that don't take the time to learn this stuff and understand it are cheating themselves and when it comes to exam time, they'll fail.
Is that their fault because they're lazy? I think I'm about as lazy as some of the laziest programmers out there and I go out of my way every day to save effort and become more efficient with my coding. Being lazy can be a good thing if it is applied properly. It's hard work being lazy... but that doesn't make me copy and paste someone else's code without understanding what it's doing and why it's doing it that way - because I love to tinker and figure new things out.
All you need to get them to do is realize that there are a large amount of "professional" programmers out there that are considered script kiddies that just cut and paste code from other sources. The answers they get from sources online may not be the "right" way to do something for the task they're trying to complete and may not even be the best way to do something. Hell, it may be the worst performing hack that gets the task done by sheer brute force.
As long as the student has the smarts to understand what they're looking at and understands how the code is achieving it's purpose and why it's doing it that way and they're learning from it, I'd say that it's not a problem.
Of course, how do you separate those that have a thirst to learn and would dearly love to surround themselves with all the wealth of knowledge of the online developer community from those that would just grab someone else's code and attempt to pass it off as their own?
I would say that it depends entirely on the student - you know them better than anyone else. Maybe you let one or two in on it because you know they'll use it properly and tell them to keep it to themselves. Your call.