As usual, there is merit to the opposite side too. Don't create some huge abstraction with class hierarchies and virtual methods and stuff, just to avoid cutting and pasting a ten-line function somewhere.
Often it's a good idea to start by cutting and pasting, and then afterwards figure out what ended up being sharable.
Often it's a good idea to start by cutting and pasting, and then afterwards figure out what ended up being sharable.