The author describes how, when he was a PhD student, the lab he worked in prevented data fraud by entrusting research data to an undergraduate student who had no stake in the outcome and no information about the experiment.
The author describes how coding errors can be avoided by cross-checking the code with the same data before publication and publishing the original data.