The thing that gets me most is.
Don't these students have any idea how diff works??
If you modify variable names, the diff will gladly show me, line by line, how amazingly similar two programs are. The first step to being caught is using the copy command on the computer and then modifying the program. Unless you really, really mash up the structure of the program diff is going to be enough to bust you on small changes (even to every line in the program).
You are better off, if you are going to copy a classmates program, to print it out and then manually type it back in.
This way you can move functions around, modify indents and formatting, change the order of statements where the order isn't terribly important. If you do that, diff won't bust you.
And the real secret is: I have 29 programs to grade for each assignment, I will only ever really catch cheaters if their programs have identical operations when run (or the same bugs, having identical bugs is a big flashing red light) and when I run them through diff it show me you took no effort AT ALL to obfuscate your copying. If you do this you deserve to be caught and punished because you didn't do the assignment, you just edited some text.
Note that, yes, I am saying that if you at least read the code with enough understanding to type it back in, you'll still get credit for the assignment. But if you are an extremely lazy cheat, you get caught.