Despite Java’s automatic reclamation of memory, memory leaks remain an important problem. For example, we frequently encounter memory leaks that cause production servers to crash. These servers represent an increasingly common class of Java applications: they are large scale and they make heavy use of frameworks. For these applications, existing tools require too much expertise, and, even for experts, require many hours interpreting low-level details. In addition, they are often too expensive to use in practice. We present an automated, adaptive, and scalable tool for diagnosing memory leaks, called LeakBot. LeakBot incorporates three new techniques. First, it automatically ranks data structures by their likelihood of containing leaks. This process dramatically prunes the set of candidate structures, using object reference graph properties and knowledge of how leaks occur. Second, it uses Coevolving Regions to identify suspicious regions within a data structure and characterize their...