I think you are taking the Code Repetition principle too far. Think of the point of avoiding Code Repetition. The point is to reduce the amount of code that has to be checked when there is a change in the logic, and to increase comprehension by factoring out obviously similarly-intended blocks.
The downfalls of factoring out in order to avoid Repetition are that if one of the shared blocks has to change, now you need even more complex inheritance or some switching between standard and non-standard implementation.
So carefully weigh the possibility of the logic for even one of these blocks changing without the others against the comprehension benefits gained by factoring this commonality out. If one implementation could split from the others you may very well be better off simply repeating the code.
While maintaining this repeated code, as it becomes more complex and your problem domain becomes more defined, you may then find it more appropriate to factor the repeated, now more complex, but also more defined sections out.
I usually try to maintain text-editor same-ness for a while until I can see whether something that looks to be repetitive turns out to be worth factoring. I just keep the repetition, but I keep my eye toward the future of that block by keeping it textually easy to match up later.
A lot of the time, the same-ness, and the possible factoring, starts to dissipate, as real, capricious, business rules and highly dependent, often arbitrary logic; like dealing with the oddities of several common database implementations (ANSI_NULLS or some such comes to mind) are added; forcing what seemed like a pure logic into a twisted mess, trying to provide reasonable, defensible decision logic when confronted with the mess of the state of the industry.
It seems to me that if people tried to factor out what you are trying to factor, we would have an entire library of worthless constructs like
Do1Then2If2False Do1IfTrueDo2.
It has to more complex and more clear that the block is not going to change to warrant factoring it out.
It's software. You can go back and edit a couple blocks that are the same right now. It'll take 5 minutes. And you may save hours of wasted factoring, and then hours more of wasted inheritance and switching development, by just leaving it, and making sure you have a good , anti-RSI keyboard.
void MethodThatDoAction1ThenAction2AndAction3IfValueAndThenAction4()
. I would rather see more meaning in:CodeBlock1()
.AbstractInterruptibleBatchPreparedStatementSetter
which is only a tad smaller than your method.