Is there evidence for “because it’s boring, it’s very easy to make errors” There seems to be a common view in programming / software engineering:


  “because it’s boring, it’s very easy to make errors”


And then the solution to this is often to introduce some level(s) of abstraction to avoid what is classed as boring.

What's the evidence to justify this?



The quote is from lecturer of a Haskell course I am taking right now, https://afp-2017.github.io/index.html .

A quick Google reveals similar statements, such as


  Repetition easily induces mistakes


from "Secure Development for Mobile Apps: How to Design and Code Secure Mobile Applications with PHP and JavaScript" by J.D. Glaser

I think I have heard similar statements from professional software engineers, relating to justifying more levels of abstraction in code. However, I am unable to think of specific other instances.
Short answer
There is scientific evidence that boredom can increase error rates.  

Background
My gut feeling would tell me that boredom decreases vigilance, which then  would increase the chance of errors. Vigilance being defined as sustained attention (Oken, 2006). 

And indeed, vigilance has been directly linked to boredom, and more specifically, boredom decreases the amount of vigilance. In fact, an accepted measure of vigilance is the error rate in task performance (Pattyn et al., 2008), based on earlier observations that motor task performance decreases with lower vigilance levels (MacWorth, 1968). 

Another way to measure alertness or vigilance is with EEG. Generally, low EEG frequencies are associated with sleepiness and reduces alertness (Delta band with 0 - 4 Hz oscillations), while high frequencies are associated with alert states (Gamma band at >30 Hz). Figure 1 shows that EEGs with low frequencies are associated with higher error rates (Oken, 2006).


Fig. 1. Error rates plotted against EEG spectral frequencies. As time went by, the subject lost attentiveness, EEG frequencies went down and error rates went up. source: (Oken, 2006)   

References
- MacWorth, Can J Psychol (1964); 18: 209-23
- Oken et al., Clin Neurophysiol (2006); 117(9): 1885–901
- Pattyn et al., Physiology &amp; Behavior (2008); 93(1–2): 69-378