Shanggui Zhan , Xingqi Wang , Dan Wei , Xinjian Cao , Bin Chen
{"title":"锦上添花:增强代码使用多源输入和修复模板预先训练的基于模型的程序修复","authors":"Shanggui Zhan , Xingqi Wang , Dan Wei , Xinjian Cao , Bin Chen","doi":"10.1016/j.jss.2025.112590","DOIUrl":null,"url":null,"abstract":"<div><div>Automated Program Repair (APR) aims to automatically repair software bugs with minimal or no human intervention, enhancing software reliability. Template-based approaches have been widely studied among APR techniques and have shown promising results. However, these methods are limited by the scope of predefined templates, making it challenging to handle out-of-template bugs. To this end, researchers have integrated Code Pre-trained Models (CodePTMs) to augment template-based APR. Existing methods typically rely on a single representation of the source code, which limits their ability to capture complex semantic and syntactic features. To address this issue, we propose FTPR, a novel approach that combines multi-source inputs (i.e., comments, code segments, and ASTs) and fix templates to improve CodePTM-based APR. Our evaluation on Defects4J-v1.2 shows that FTPR outperforms previous state-of-the-art approaches, successfully fixing 85 bugs. Furthermore, we validate the generality of FTPR on Defects4J-v2.0 and QuixBugs, the latter of which includes two programming languages. FTPR fixes 53 and 32 bugs on these datasets, respectively, demonstrating the significant potential and value of applying multi-source inputs and fix templates to automated program repair.</div></div>","PeriodicalId":51099,"journal":{"name":"Journal of Systems and Software","volume":"231 ","pages":"Article 112590"},"PeriodicalIF":4.1000,"publicationDate":"2025-08-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"The icing on the cake: Enhancing Code Pre-trained models-based program repair with multi-source inputs and fix templates\",\"authors\":\"Shanggui Zhan , Xingqi Wang , Dan Wei , Xinjian Cao , Bin Chen\",\"doi\":\"10.1016/j.jss.2025.112590\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Automated Program Repair (APR) aims to automatically repair software bugs with minimal or no human intervention, enhancing software reliability. Template-based approaches have been widely studied among APR techniques and have shown promising results. However, these methods are limited by the scope of predefined templates, making it challenging to handle out-of-template bugs. To this end, researchers have integrated Code Pre-trained Models (CodePTMs) to augment template-based APR. Existing methods typically rely on a single representation of the source code, which limits their ability to capture complex semantic and syntactic features. To address this issue, we propose FTPR, a novel approach that combines multi-source inputs (i.e., comments, code segments, and ASTs) and fix templates to improve CodePTM-based APR. Our evaluation on Defects4J-v1.2 shows that FTPR outperforms previous state-of-the-art approaches, successfully fixing 85 bugs. Furthermore, we validate the generality of FTPR on Defects4J-v2.0 and QuixBugs, the latter of which includes two programming languages. FTPR fixes 53 and 32 bugs on these datasets, respectively, demonstrating the significant potential and value of applying multi-source inputs and fix templates to automated program repair.</div></div>\",\"PeriodicalId\":51099,\"journal\":{\"name\":\"Journal of Systems and Software\",\"volume\":\"231 \",\"pages\":\"Article 112590\"},\"PeriodicalIF\":4.1000,\"publicationDate\":\"2025-08-22\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Systems and Software\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0164121225002596\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Systems and Software","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0164121225002596","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
The icing on the cake: Enhancing Code Pre-trained models-based program repair with multi-source inputs and fix templates
Automated Program Repair (APR) aims to automatically repair software bugs with minimal or no human intervention, enhancing software reliability. Template-based approaches have been widely studied among APR techniques and have shown promising results. However, these methods are limited by the scope of predefined templates, making it challenging to handle out-of-template bugs. To this end, researchers have integrated Code Pre-trained Models (CodePTMs) to augment template-based APR. Existing methods typically rely on a single representation of the source code, which limits their ability to capture complex semantic and syntactic features. To address this issue, we propose FTPR, a novel approach that combines multi-source inputs (i.e., comments, code segments, and ASTs) and fix templates to improve CodePTM-based APR. Our evaluation on Defects4J-v1.2 shows that FTPR outperforms previous state-of-the-art approaches, successfully fixing 85 bugs. Furthermore, we validate the generality of FTPR on Defects4J-v2.0 and QuixBugs, the latter of which includes two programming languages. FTPR fixes 53 and 32 bugs on these datasets, respectively, demonstrating the significant potential and value of applying multi-source inputs and fix templates to automated program repair.
期刊介绍:
The Journal of Systems and Software publishes papers covering all aspects of software engineering and related hardware-software-systems issues. All articles should include a validation of the idea presented, e.g. through case studies, experiments, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to:
•Methods and tools for, and empirical studies on, software requirements, design, architecture, verification and validation, maintenance and evolution
•Agile, model-driven, service-oriented, open source and global software development
•Approaches for mobile, multiprocessing, real-time, distributed, cloud-based, dependable and virtualized systems
•Human factors and management concerns of software development
•Data management and big data issues of software systems
•Metrics and evaluation, data mining of software development resources
•Business and economic aspects of software development processes
The journal welcomes state-of-the-art surveys and reports of practical experience for all of these topics.