As the title says.
My background is in Economics/Finance(mostly), many topics in those fields (and I am sure other fields) require fairly complicated programming, enough to where one can easily screw something up. How do Academic journals defend against results that are generated by bugs?
As far as I understand nobody ever sees my code, it could be hundreds or even thousands lines of garbage code without a single function in it (not to mention no unit tests) laced with bugs, and I kept "fixing" things until my results "made sense", and then happily reported them. How could a journal tell that my results are trash?