I have heard many different philosophies about cheating, including ignoring it because it takes too much time to catch cheaters. Avoiding conflict at all costs is a common philosophy, and unfortunately, confronting cheating always involves a conflict.
My philosophy is that homework is a very valuable learning tool, and a crucial part of learning and assessment. A 3 hour exam, although useful, has weaknesses as a measuring device and can only measure certain aspects of what students learn. This of course varies by subject.
And it is hard to catch cheaters in software engineering and computer science. So I try for deterrence.
Software reuse can definitely muddy the waters. Java adds to the mud because there are so many great examples and libraries out there. In the "real world", taking methods or classes from the Web is valuable and a valid practice.
Clarifying expectations helps a lot. I put the following statement on assignments:
Students sometimes object that they can work together in the "real world." My response is that universities are not trying to simulate the real world, we are trying to prepare students to pull their own weight in the real world.
If the evidence of copying is strong enough, I usually notify George Mason's honor committee and recommend faiulres of the class. If the evidence is inconclusive, I will usually warn students and remind them of the policy.
There are interesting social dynamics. Sometimes addressing cheating makes us part of the process of assimilating into western culture because what constitutes cheating and how to address it varies dramatically in different cultures.
I realize that I am a bit of an extremist on this issue. I take honesty, integrity, and honor very seriously.
Jeff Offutt, Nov 2006, GMU