* People make mistakes in any line, but they often unconsciously review them and spot the mistake while they're writing the next line. In the case of the last line there's no such automatic review.
* (plausible in some of the examples, not all of them) The last line was added by copy–paste at a later date than all the others.
I came in to say something similar. I've lost count of the number of times I did that myself.
That said, the automatic review and error spotting invariably prompts me to review the entire thing with greater attention once done with the whole. So the reason the last line doesn't get a proper review may also turn out to be the lack of hard deadline (I've been blessed by seldom having one).
* Getting interrupted partway through the edits. I call this the "working out of your home office when you have kids" error.
Now, I don't copy-paste-edit similar lines anymore. I find that editing is often slower than typing the line from scratch.
A vim user that makes heavy use of recording and/or search-replace will be able to do large copy-paste-edits very quickly.
In fact, I think this might be another potential source of error. Depending on how the recording is done, or how an edit is scripted, it's very likely that the first and last lines are the two special cases. The first line, however, will be given the most scrutiny. This leaves another potential source of "last-line" errors; the use of editor features that make such a line the exception.
I'm interrupted by my boss far, far more often than I'm interrupted by my kid. A dozen times a day isn't unusual.
As I recall I think most of the brackety languages actually do ignore it now? So it's a good way to mitigate at least that small problem.
In fact, over on #hhvm I was told that Facebook's Hack style guide requires a trailing comma, which I think is a good thing and will catch a lot of silly errors.
Anyway, when I made my own Vim syntax highlighter for JSON, I spent a fair amount of effort in getting such a trailing comma highlighted as an error: https://github.com/elzr/vim-json
In retrospect, I've had quite a few of these - once pointed out as a pattern, it's fairly easy to see it's a "thing".
I wonder what sort of IDE or other tooling could be put in place to hint those errors out of existence.
I try to discipline myself to retype code instead of copy-pasting (unless it's lengthy, then I should refactor instead of copy-pasting). It always saves more time that it takes to retype. But sometimes I'm lazy.
Programmer A makes a change that adds a list of things out of one thing and checks in. Programmer B checked out the "one thing" version and made an update to it. They check in, and they now need to deal with a merge conflict into a list of things that they now need to expend mental energy understanding. Mistakes get made.
An increased number of errors on "return" lines.
Which naturally should be more frequently last lines than otherwise.
Of course, the ideal way to avoid such problems is to embrace the lack of patience and properly structure the code. :)