Extracting concise bug-fixing patches from human-written patches in version control systems

Yanjie Jiang, Hui Liu*, Nan Niu, Lu Zhang, Yamin Hu

*此作品的通讯作者

科研成果: 书/报告/会议事项章节会议稿件同行评审

27 引用 (Scopus)

摘要

High-quality and large-scale repositories of real bugs and their concise patches collected from real-world applications are critical for research in software engineering community. In such a repository, each real bug is explicitly associated with its fix. Therefore, on one side, the real bugs and their fixes may inspire novel approaches for finding, locating, and repairing software bugs; on the other side, the real bugs and their fixes are indispensable for rigorous and meaningful evaluation of approaches for software testing, fault localization, and program repair. To this end, a number of such repositories, e.g., Defects4J, have been proposed. However, such repositories are rather small because their construction involves expensive human intervention. Although bug-fixing code commits as well as associated test cases could be retrieved from version control systems automatically, existing approaches could not yet automatically extract concise bug-fixing patches from bug-fixing commits because such commits often involve bug-irrelevant changes. In this paper, we propose an automatic approach, called BugBuilder, to extracting complete and concise bug-fixing patches from human-written patches in version control systems. It excludes refactorings by detecting refactorings involved in bug-fixing commits, and reapplying detected refactorings on the faulty version. It enumerates all subsets of the remaining part and validates them on test cases. If none of the subsets has the potential to be a complete bug-fixing patch, the remaining part as a whole is taken as a complete and concise bug-fixing patch. Evaluation results on 809 real bug-fixing commits in Defects4J suggest that BugBuilder successfully generated complete and concise bug-fixing patches for forty percent of the bug-fixing commits, and its precision (99%) was even higher than human experts.

源语言英语
主期刊名Proceedings - 2021 IEEE/ACM 43rd International Conference on Software Engineering, ICSE 2021
出版商IEEE Computer Society
686-698
页数13
ISBN(电子版)9780738113197
DOI
出版状态已出版 - 5月 2021
活动43rd IEEE/ACM International Conference on Software Engineering, ICSE 2021 - Virtual, Online, 西班牙
期限: 22 5月 202130 5月 2021

出版系列

姓名Proceedings - International Conference on Software Engineering
ISSN(印刷版)0270-5257

会议

会议43rd IEEE/ACM International Conference on Software Engineering, ICSE 2021
国家/地区西班牙
Virtual, Online
时期22/05/2130/05/21

指纹

探究 'Extracting concise bug-fixing patches from human-written patches in version control systems' 的科研主题。它们共同构成独一无二的指纹。

引用此