Should undergraduate students be included on papers containing data they collected? Assume one or more undergraduate students are given a topic by an academic supervsior to use for their undergraduate honors thesis. The task is designed, programmed and set-up by the supervisor, who shows the students how to use the equipment and to conduct rudimentary data analysis/summaries. The students then collect the data and report them in a written, submitted thesis. Later, the academic supervisor analyses the data (from the summaries obtained), writes a manuscript in conjunction with his/her colleagues, and wishes to submit for publication. My question is: should the undergraduates who collected the data, and who did not contribute to the writing of the manuscript at all, be listed as authors? It seems that this decision is often left to personal preference. Thanks.
A few comments:


Were they asked to contribute to the paper or was the paper written without their knowledge? If they refused to contribute, then they shouldn't be a named author. If they weren't asked, then it's not their fault they didn't contribute ;)
I think the word undergraduate is a red herring. Substitute it with the word PhD student or RA or Prof from the lab next door, does this change your view? A person's title shouldn't influence their inclusion.
How much work are we talking about here? When I provide statistical advice, I'm happy to give up a few hours of my time for free. But once I'm spending days on the project, then I expect (and make it clear) to be am named author. 
If data collection was "trivial", then I would suggest it shouldn't be used as an undergraduate project. Also, I presume that there was some skill in collecting the data?