Software debugging is always time-consuming and labor-intensive. It has been estimated that the debugging process costs nearly 50% of developers’ time and efforts. The excessively high costs of debugging is motivating the research towards automated software debugging. Over the years, various techniques have been proposed to facilitate developers in detecting, locating, and fixing software bugs automatically. Although the effectiveness of these techniques have been demonstrated, their usefulness is still compromised in practice. For instance, fault localization techniques are still suffering from the limitation of a lack of contextual information. The effectiveness of search-based automated program repair techniques is greatly limited in the problem of search space explosion. Library API misuse detection techniques are still suffering from low precision and low recall in practical settings. In this thesis, we observe that the code change information can be leveraged to facilitate the design of better automated debugging techniques. First, modern software systems are commonly maintained by version control systems (VCS), and those code changes documented by VCS can facilitate the design of better automated debugging techniques. This is because version histories contain rich information, including bug-inducing changes, or changes that introduce bugs, and bug-fixing changes, or changes that repaire bugs. We observe that developers frequently look for information about bug-inducing changes during their debugging practices as such information is critical for them to understand and locate a bug’s root cause. Besides, bug-fixing changes contain rich knowledge about how developers repair real bugs in practice, from which substantial patterns can be learned to repair new bugs automatically. Second, code changes that are actively created via applying mutation operators are also helpful for designing automated bug detection tools. This is because “artificial bugs” can be manually crafted in such a way, and mutation analysis can be further conducted to validate whether they introduce real faults. Motivated by these observations, in this thesis, we first propose a technique, LOCUS, which leverages information-retrieval techniques to locate bug-inducing changes automatically based on bug reports. Second, we propose HSFL, which constructs historical spectra along the change histories starting from bug-inducing changes, to locate bugs at the statement level. We then propose CAPGEN, which is a context-aware patch generation system for automated program repair. Specifically, the mutation operators are designed and prioritized considering the context information guided by real and substantial bug-fixing changes. Finally, we propose MUTAPI, an automated approach to discovering library API misuse patterns. Specifically, it actively makes code changes to introduce “artificial bugs” that are likely to be caused by API misuse, and then leverages mutation analysis to validate whether these changes indeed introduce bugs. Our evaluation results show that all our proposed techniques outperform existing state-of-the-art approaches.
| Date of Award | 2019 |
|---|
| Original language | English |
|---|
| Awarding Institution | - The Hong Kong University of Science and Technology
|
|---|
Utilizing code change information for better automated debugging
WEN, M. (Author). 2019
Student thesis: Doctoral thesis