Improving Bug Localization and Fixing by Mining Crash Reports and Using Large Language Models
bug localization, bug fixing, mining crash reports, large language models
Crash reports and stack traces are widely used by developers to investigate the root causes of software failures. However, identifying the faulty source code based on these reports is often complex, especially when dealing with large volumes of data. Recent research has proposed methods for grouping crash reports by similarity and using stack trace information to assist in bug localization. Although these techniques have shown promising results in retrospective studies, mostly with open-source projects, little is known about their practical impact in real-world software development environments in daily life. This thesis investigates the use of a stack trace-based crash report mining approach to support bug localization and program repair in an industrial context. Over 18 months, the bug localization approach was applied in collaboration with development teams responsible for three large-scale Java web systems. More than 750,000 crash reports were grouped, and more than 130 real bug fix tasks were opened and analyzed. Our findings indicate that the approach effectively reduces the cognitive effort required to locate buggy components, achieving over 90\% recall and approximately 82\% mean average precision. Developer feedback revealed that factors such as critical business requirements and error reproducibility influence the prioritization of crash groups and that the ranked list of suspicious files and methods remains useful even when the root cause lies outside the predicted scope. Based on these results, the thesis also explores how Large Language Models (LLMs) can complement crash report-based bug localization by providing automated suggestions for fixing defects. By combining crash report analysis with LLM capabilities, this work aims to enhance the efficiency of bug resolution processes in real-world software projects.