i do this all the time in vim. all it takes is one extra keystroke 'p' to do this.
if i were to take a guess, the programmer first typed out all the if conditional expressions, then went in and pasted 'goto fail' out of a buffer after each one, and accidentally did it twice there.
that's bullshit. you don't know that it didn't happen - there's no telling what he did with the code in the time between commits. he could moved things around 20 times, finally ending up in the same place, with the exception of the accidentally pasted a line.
plese use some imagination before jumping to conclusions. a diff tracks changes at points in time, not an editing session.
do YOU understand how diff works? it tracks changes between two points in time, it doesn't track how you got there or what you did in between.
he could have easily yanked a goto line 'yy' for use elsewhere or by accident and pasted it by accident with 'p' right after he yanked it.
i see two very similar lines, 49 and 53, which were probably copy/pasted and edited. it is completely reasonable to assume he accidentally did it with another line further down the file.
he could have refactored this code multiple times before re-committing this file, moving blocks around or editing lines. there's plenty of opportunity to introduce errors.
that's true but there are other, material changes in the file including conditional logic very close to the bug - to me that says there was at least some additional editing going on, giving opportunity to introduce an error.
if the entire diff was just + goto fail; that would be extremely suspicious, but that doesn't seem to be the case.
if i were to take a guess, the programmer first typed out all the if conditional expressions, then went in and pasted 'goto fail' out of a buffer after each one, and accidentally did it twice there.