The hypothesis that ulcers are caused by bacteria underlay many experiments at the beginning of 20th century. Yet, by late 1950s, this etiological theory was largely abandoned. The received view is that a 1954 study, which showed (erroneously) the absence of bacteria in over 1180 stomachs, is largely to blame. We decided to take a closer look at this narrative, and using digital textual analysis, we demostrated evidence that the bacterial research was on the wane at least ten years prior to the fateful study. To describe the fate of the germ theory of ulcer genesis, we created a concept of 'declining research programs' - strands of research that fewer and fewer scientists actively pursue. The main takeaway message from our study is that the method we used helps with identifying declining research programs, which in turn promotes further research in integrated history and philosophy of science on questions such as "when is a research program pursuitworthy?" or "in what circumstances do research programs flourish or vanish?"