I took the side of 781, and he was justin66. My perspective is that you cannot take data, or a concept, that is fundamentally broken, add a little effort, and fix it.
For example, if a collaborator sends data for analysis where the sample size was too small for the effect, or worse, asked to find statistical differences between 1-2 samples per group, you can't fix that with any amount of algorithmic mumbo-jumbo. You can only fix it by redoing the experiment properly. Although we are asked to do this sort of thing almost daily (not always this blatantly).
His perspective is, and maybe I'm being a bit uncharitable, you take what you're given, do your best, clearly describe what you did and honestly note the limitations, and move on. Even if the result is something highly dubious, that is for the reviewers to decide.
But I personally think a little loud whining is called for in the sciences to discourage totally half-baked ideas and data from ever seeing the light of day. But the trouble is the pressures are so intense and funding is so tight, people feel compelled to halfass many things, which is the real problem.
EDIT: I should add I am not talking about data falsification or major ethical breaches like that. I'm talking about things that more amount to a form of pressure-induced willful stupidity, no dishonesty involved. I would speculate this is much more of a cause of the replication crisis than outright dishonesty.
People don't like to outright lie because it could cost them their careers. But they certainly can conveniently forget some basic scientific principles at times if it suits them and they can't get a decent story while being rigorous. And their excuse will be -- well, we clearly documented everything we did in the paper, and the reviewers thought it was OK (because the reviewers do the same sorts of thing). And this, folks, is how you get a lot of shitty papers.