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.
If the student (or anybody else for that matter) did not make a novel and significant intellectual contribution to the project, then they should not be included on the author list of the paper. In your question, it seems like all the intellectual contribution was by the professor (and colleagues) and the students just carried out tasks assigned to them or made very minor contributions. As such, the students should be mentioned in the acknowledgement section but not given authorship.
That being said, if your supervisor is only using you for drill work, then maybe you should seek a better supervisor. A good supervisor should encourage their students to take an active role of novel intellectual contribution. If your supervisor is not encouraging you to do this, then they are not training you to be a researcher, they are training you to be a lab-hand (although I guess in some fields you have to be a lab-hand before you are can be trained as a researcher).