Is the magic number 1024 the same in all instances, for example. Or is it merely a coincidence that it's the same in a few places. Is the apparently repetitious code:
context = create_context();
context.action(params);
In several places really the same? Or is it a coincidence that right now none of them pass any parameters to create_context and use the same params in their call to action?Avoiding the repetition makes it hard to even ask that question. And disentangling the different cases later is riskier than keeping a few pieces of repeated code around for a while to understand the situation better.