学位论文详细信息
Anti-Patterns for Automatic Program Repairs
Automated Program Repair;Anti-Patterns;Staged Program Repair;Machine Learning;Software Engineering;Overfitted Patches;Generate-and-Validate
Liu, Taiyueadvisor:Tan, Lin ; affiliation1:Faculty of Engineering ; Tan, Lin ;
University of Waterloo
关键词: Master Thesis;    Staged Program Repair;    Software Engineering;    Generate-and-Validate;    Machine Learning;    Automated Program Repair;    Anti-Patterns;    Overfitted Patches;   
Others  :  https://uwspace.uwaterloo.ca/bitstream/10012/10893/3/LIU_TAIYUE.pdf
瑞士|英语
来源: UWSPACE Waterloo Institutional Repository
PDF
【 摘 要 】

Automated program repair has been a heated topic in software engineering. In recent years, we have witnessed many successful applications such as Genprog, SPR, RSRepair, etc. Given a bug and its test suite, which includes both passed test cases and failed test cases, these tools aim to automatically generate a patch that fixes the bug without developers' efforts. All these tools adopt a ;;Generate-and-Validate;; approach, which assumes a tool-generated patch to be correct as long as it passes all its test cases. However, if test suites are of poor quality that cannot cover all the situations, incorrect tool-generated patches might pass all their test cases and be regarded as correct patches. We call suchpatches that are incorrect but can pass whose test suites as overfitted patches.In order to investigate the reasons why overfitted patches are generated and to reduce overfitted patches, we perform a deep analysis on the patches composed by developers, and the patches (i.e., the correct and the overfitted patches) that are generated by Genprog and SPR. In this thesis, we propose two orthogonal approaches to filter out overfitted patches: 1) To preserve correct tool-generated patches and filter out only overfitted patches, we propose some patterns, named anti-patterns, that can efficiently distinguish correct patches against overfitted patches. We select nine bugs from the Genprog benchmark data set to evaluate the anti-patterns. By embedding the anti-patterns into SPR and filtering out overfitted patches, on average, developers can review 44.7% less tool-generated patches to reach correct patches. Meanwhile, by filtering out overfitted patches at runtime, the anti-patterns speed up SPR's efficiency by 1.34 times on average. 2) We leverage machine learning techniques with meaningful features to predict the correctness of tool-generated patches. Our results show that the machine learning approach cannot preserve correct patches well. In other words, machine learning techniques would mis-classify correct patches as overfitted patches and filter them out. Thus, we believe the machine learning approach requires significant future work, e.g., more representative features and effective classification algorithms, to be useful in practice. These two orthogonal approaches provide automatic program repair tools with valuable guidance on how to avoid generating overfitted patches.

【 预 览 】
附件列表
Files Size Format View
Anti-Patterns for Automatic Program Repairs 330KB PDF download
  文献评价指标  
  下载次数:21次 浏览次数:13次