{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,8]],"date-time":"2026-10-08T11:33:47Z","timestamp":1791459227350,"version":"4.3.4"},"reference-count":69,"publisher":"Association for Computing Machinery (ACM)","issue":"3","license":[{"start":{"date-parts":[[2025,2,23]],"date-time":"2025-02-23T00:00:00Z","timestamp":1740268800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/501100012166","name":"National Key R&D Program of China","doi-asserted-by":"crossref","award":["2022YFA1005101"],"award-info":[{"award-number":["2022YFA1005101"]}],"id":[{"id":"10.13039\/501100012166","id-type":"DOI","asserted-by":"crossref"}]},{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"crossref","award":["62402506"],"award-info":[{"award-number":["62402506"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Research Foundation from NUDT","award":["ZK24-05"],"award-info":[{"award-number":["ZK24-05"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2025,3,31]]},"abstract":"<jats:p>Despite its effectiveness in ensuring software quality, code review remains a labor-intensive and time-consuming task. In order to alleviate this burden on developers, researchers have proposed the automation of code review activities, particularly focusing on automating code revisions. This automation can benefit both code authors, as they are relieved from the manual task of code revision, and code reviewers, as they are spared from addressing minor code flaws through manual comments. While current code revision approaches have shown promising results, they typically operate within a single phase, in which the code requiring revision is treated as the input of a deep learning model, and the revised code is directly generated through a sequence-to-sequence transformation. Consequently, these approaches tackle both the challenges of localization (i.e., where to revise) and revision (i.e., how to revise) simultaneously. Attempting to handle the entire complex process with a single model goes against the principle of \u201cDivide-and-Conquer,\u201d which encourages breaking down complex problems into smaller sub-problems and addressing them individually. In fact, we have observed that existing code revision approaches often yield inaccurate results in both the localization and revision phases. In this article, we present a two-phase code revision approach that aims to overcome the aforementioned limitations by adhering to the \u201cDivide-and-Conquer\u201d principle. Our approach comprises two key components: a localizer, responsible for identifying the specific parts of the input code that require revisions, and a reviser, tasked with generating the revised code based on the localization result. Extensive experiments conducted on two widely used datasets demonstrate the substantial superiority of our approach over existing code revision approaches. For instance, when revising code based on the code reviewer\u2019s comments, our approach achieves a success rate of over 20% in implementing the ground-truth code revisions. In comparison, the widely used pre-trained model CodeT5 achieves a success rate of less than 16% on the same test set, which contains 16K+ cases.<\/jats:p>","DOI":"10.1145\/3697013","type":"journal-article","created":{"date-parts":[[2024,9,24]],"date-time":"2024-09-24T15:53:36Z","timestamp":1727193216000},"page":"1-26","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":13,"title":["Divide-and-Conquer: Automating Code Revisions via Localization-and-Revision"],"prefix":"10.1145","volume":"34","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-1469-2063","authenticated-orcid":false,"given":"Shangwen","family":"Wang","sequence":"first","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5905-4677","authenticated-orcid":false,"given":"Bo","family":"Lin","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8084-8009","authenticated-orcid":false,"given":"Liqian","family":"Chen","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4204-7424","authenticated-orcid":false,"given":"Xiaoguang","family":"Mao","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,2,23]]},"reference":[{"key":"e_1_3_2_2_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2013.6606617"},{"key":"e_1_3_2_3_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2015.7332454"},{"key":"e_1_3_2_4_2","doi-asserted-by":"publisher","unstructured":"Amiangshu Bosu and Jeffrey C. Carver. 2013. Impact of peer code review on peer impression formation: A survey. In 2013 ACM\/IEEE International Symposium on Empirical Software Engineering and Measurement. IEEE 133\u2013142. DOI: 10.1109\/ESEM.2013.23","DOI":"10.1109\/ESEM.2013.23"},{"key":"e_1_3_2_5_2","unstructured":"Islem Bouzenia Premkumar Devanbu and Michael Pradel. 2024. RepairAgent: An autonomous LLM-based agent for program repair. arXiv:2403.17134."},{"key":"e_1_3_2_6_2","doi-asserted-by":"publisher","DOI":"10.1145\/3540250.3549162"},{"key":"e_1_3_2_7_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2015.131"},{"key":"e_1_3_2_8_2","doi-asserted-by":"publisher","unstructured":"Florian Deissenboeck and Markus Pizka. 2006. Concise and consistent naming. Software Quality Journal 14 (2006) 261\u2013282. DOI: 10.1007\/s11219-006-9219-1","DOI":"10.1007\/s11219-006-9219-1"},{"key":"e_1_3_2_9_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597926.3598067"},{"key":"e_1_3_2_10_2","unstructured":"Yihong Dong Xue Jiang Zhi Jin and Ge Li. 2023. Self-collaboration code generation via ChatGPT. arXiv:2304.07590."},{"key":"e_1_3_2_11_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00128"},{"key":"e_1_3_2_12_2","doi-asserted-by":"publisher","unstructured":"Zhangyin Feng Daya Guo Duyu Tang Nan Duan Xiaocheng Feng Ming Gong Linjun Shou Bing Qin Ting Liu Daxin Jiang and Ming Zhou. 2020. CodeBERT: A pre-trained model for programming and natural languages. In Findings of the Association for Computational Linguistics: EMNLP \u201920 1536\u20131547. DOI: 10.18653\/v1\/2020.findings-emnlp.139","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2006.16"},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","unstructured":"Luca Gazzola Daniela Micucci and Leonardo Mariani. 2019. Automatic software repair: A survey. IEEE Transactions on Software Engineering 45 1 (2019) 34\u201367. DOI: 10.1109\/TSE.2017.2755013","DOI":"10.1109\/TSE.2017.2755013"},{"key":"e_1_3_2_15_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC58990.2023.00026"},{"key":"e_1_3_2_16_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3608134"},{"key":"e_1_3_2_17_2","volume-title":"International Conference on Learning Representations","author":"Guo Daya","year":"2021","unstructured":"Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie LIU, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun Deng, Colin Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. 2021. GraphCode BERT: Pre-training code representations with data flow. In International Conference on Learning Representations. DOI: https:\/\/openreview.net\/forum?id=jLoC4ez43PZ"},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/3540250.3549119"},{"key":"e_1_3_2_19_2","unstructured":"Hamel Husain Ho-Hsiang Wu Tiferet Gazit Miltiadis Allamanis and Marc Brockschmidt. 2019. CodeSearchNet challenge: Evaluating the state of semantic code search. arXiv:1909.09436."},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3613892"},{"key":"e_1_3_2_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/2610384.2628055"},{"key":"e_1_3_2_22_2","volume-title":"The Art of Computer Programming","author":"Knuth Donald Ervin","year":"1997","unstructured":"Donald Ervin Knuth. 1997. The Art of Computer Programming, Vol. 3. Pearson Education."},{"key":"e_1_3_2_23_2","first-page":"1137","volume-title":"14th International Joint Conference on Artificial Intelligence","author":"Kohavi Ron","year":"1995","unstructured":"Ron Kohavi. 1995. A study of cross-validation and bootstrap for accuracy estimation and model selection. In 14th International Joint Conference on Artificial Intelligence. Montreal, Canada, 1137\u20131145."},{"key":"e_1_3_2_24_2","unstructured":"Anil Koyuncu Tegawend\u00e9 F. Bissyand\u00e9 Dongsun Kim Kui Liu Jacques Klein Martin Monperrus and Yves Le Traon. 2019. D & C: A divide-and-conquer approach to IR-based bug localization. arXiv:1902.02703."},{"key":"e_1_3_2_25_2","first-page":"707","volume-title":"Soviet Physics Doklady","author":"Levenshtein Vladimir I.","year":"1966","unstructured":"Vladimir I. Levenshtein. 1966. Binary codes capable of correcting deletions, insertions, and reversals. In Soviet Physics Doklady, Vol. 10. Soviet Union, 707\u2013710."},{"key":"e_1_3_2_26_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE51524.2021.9678724"},{"key":"e_1_3_2_27_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00179"},{"key":"e_1_3_2_28_2","doi-asserted-by":"publisher","DOI":"10.1145\/3540250.3549081"},{"key":"e_1_3_2_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3616339"},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","unstructured":"Bo Lin Shangwen Wang Zhongxin Liu Xin Xia and Xiaoguang Mao. 2022. Predictive comment updating with heuristics and AST-path-based neural learning: A two-phase approach. IEEE Transactions on Software Engineering 49 4 (2022) 1640\u20131660. DOI: 10.1109\/TSE.2022.3185458","DOI":"10.1109\/TSE.2022.3185458"},{"key":"e_1_3_2_31_2","doi-asserted-by":"publisher","DOI":"10.1145\/3650212.3680381"},{"key":"e_1_3_2_32_2","doi-asserted-by":"publisher","unstructured":"Bo Lin Shangwen Wang Ming Wen and Xiaoguang Mao. 2022. Context-aware code change embedding for better patch correctness assessment. ACM Transactions on Software Engineering and Methodology (TOSEM) 31 3 (2022) 1\u201329. DOI: 10.1145\/3505247","DOI":"10.1145\/3505247"},{"key":"e_1_3_2_33_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380338"},{"key":"e_1_3_2_34_2","doi-asserted-by":"publisher","unstructured":"Junyi Lu Lei Yu Xiaojia Li Li Yang and Chun Zuo. 2023. LLaMA-Reviewer: Advancing code review automation with large language models through parameter-efficient fine-tuning. In 2023 IEEE 34th International Symposium on Software Reliability Engineering (ISSRE). IEEE 647\u2013658. DOI: 10.1109\/ISSRE59848.2023.00026","DOI":"10.1109\/ISSRE59848.2023.00026"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","unstructured":"Laura MacLeod Michaela Greiler Margaret-Anne Storey Christian Bird and Jacek Czerwonka. 2017. Code reviewing in the trenches: Challenges and best practices. IEEE Software 35 4 (2017) 34\u201342. DOI: 10.1109\/MS.2017.265100500","DOI":"10.1109\/MS.2017.265100500"},{"key":"e_1_3_2_36_2","doi-asserted-by":"publisher","DOI":"10.1145\/2597073.2597076"},{"key":"e_1_3_2_37_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2015.7081827"},{"key":"e_1_3_2_38_2","doi-asserted-by":"publisher","DOI":"10.1145\/2491411.2494584"},{"key":"e_1_3_2_39_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2015.74"},{"key":"e_1_3_2_40_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00180"},{"key":"e_1_3_2_41_2","doi-asserted-by":"publisher","unstructured":"Colin Raffel Noam Shazeer Adam Roberts Katherine Lee Sharan Narang Michael Matena Yanqi Zhou Wei Li and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research 21 (2020) 1\u201367. DOI: 10.5555\/3455716.3455856","DOI":"10.5555\/3455716.3455856"},{"key":"e_1_3_2_42_2","doi-asserted-by":"publisher","DOI":"10.1145\/2970276.2970283"},{"key":"e_1_3_2_43_2","unstructured":"Shuo Ren Daya Guo Shuai Lu Long Zhou Shujie Liu Duyu Tang Neel Sundaresan Ming Zhou Ambrosio Blanco and Shuai Ma. 2020. CodeBLEU: A method for automatic evaluation of code synthesis. arXiv:2009.10297."},{"key":"e_1_3_2_44_2","doi-asserted-by":"publisher","DOI":"10.1145\/2491411.2491444"},{"key":"e_1_3_2_45_2","doi-asserted-by":"publisher","unstructured":"Peter C. Rigby Daniel M. German Laura Cowen and Margaret-Anne Storey. 2014. Peer review on open-source software projects: Parameters statistical models and theory. ACM Transactions on Software Engineering and Methodology (TOSEM) 23 4 (2014) 1\u201333. DOI: 10.1145\/2594458","DOI":"10.1145\/2594458"},{"key":"e_1_3_2_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/3183519.3183525"},{"key":"e_1_3_2_47_2","doi-asserted-by":"crossref","unstructured":"Rico Sennrich Barry Haddow and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In 54th Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics (ACL) 1715\u20131725.","DOI":"10.18653\/v1\/P16-1162"},{"key":"e_1_3_2_48_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER48275.2020.9054794"},{"key":"e_1_3_2_49_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2018.8330203"},{"key":"e_1_3_2_50_2","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510067"},{"key":"e_1_3_2_51_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2015.7081824"},{"key":"e_1_3_2_52_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00021"},{"key":"e_1_3_2_53_2","doi-asserted-by":"publisher","unstructured":"Michele Tufano Cody Watson Gabriele Bavota Massimiliano Di Penta Martin White and Denys Poshyvanyk. 2019. An empirical study on learning bug-fixing patches in the wild via neural machine translation. ACM Transactions on Software Engineering and Methodology 28 4 (2019) 19:1\u201319:29. DOI: 10.1145\/3340544","DOI":"10.1145\/3340544"},{"key":"e_1_3_2_54_2","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510621"},{"key":"e_1_3_2_55_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE43902.2021.00027"},{"key":"e_1_3_2_56_2","unstructured":"Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion Jones Aidan N. Gomez \u0141ukasz Kaiser and Illia Polosukhin. 2017. Attention is all you need. 30 (2017). Retrieved from https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2017\/file\/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf"},{"key":"e_1_3_2_57_2","unstructured":"Oriol Vinyals Meire Fortunato and Navdeep Jaitly. 2015. Pointer networks. In Advances in Neural Information Processing Systems Vol. 28. Curran Associates Inc. Retrieved from https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2015\/file\/29921001f2f04bd3baee84a12e98098f-Paper.pdf"},{"key":"e_1_3_2_58_2","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3616323"},{"key":"e_1_3_2_59_2","doi-asserted-by":"publisher","DOI":"10.1145\/3622815"},{"key":"e_1_3_2_60_2","unstructured":"Shangwen Wang Kui Liu Bo Lin Li Li Jacques Klein Xiaoguang Mao and Tegawend\u00e9 F. Bissyand\u00e9. 2021. Beep: Fine-grained fix localization by learning to predict buggy code elements. arXiv:2111.07739."},{"key":"e_1_3_2_61_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597203"},{"key":"e_1_3_2_62_2","doi-asserted-by":"publisher","DOI":"10.1145\/3324884.3416590"},{"key":"e_1_3_2_63_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.emnlp-main.685"},{"key":"e_1_3_2_64_2","doi-asserted-by":"crossref","unstructured":"F. Wilcoxon. 1945. Individual comparisons by ranking methods. Biometrics Bulletin 1 6 (1945) 80\u201383.","DOI":"10.2307\/3001968"},{"key":"e_1_3_2_65_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00129"},{"key":"e_1_3_2_66_2","doi-asserted-by":"publisher","unstructured":"Yue Yu Huaimin Wang Gang Yin and Tao Wang. 2016. Reviewer recommendation for pull-requests in GitHub: What can we learn from code review and bug assignment? Information and Software Technology 74 (2016) 204\u2013218. DOI: 10.1016\/j.infsof.2016.01.004","DOI":"10.1016\/j.infsof.2016.01.004"},{"key":"e_1_3_2_67_2","doi-asserted-by":"publisher","DOI":"10.1145\/3533767.3534390"},{"key":"e_1_3_2_68_2","doi-asserted-by":"publisher","DOI":"10.1145\/3551349.3556955"},{"key":"e_1_3_2_69_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC58990.2023.00036"},{"key":"e_1_3_2_70_2","doi-asserted-by":"publisher","unstructured":"Daming Zou Jingjing Liang Yingfei Xiong Michael D. Ernst and Lu Zhang. 2019. An empirical study of fault localization families and their combinations. IEEE Transactions on Software Engineering (2019). DOI: 10.1109\/TSE.2019.2892102","DOI":"10.1109\/TSE.2019.2892102"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3697013","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3697013","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T18:43:16Z","timestamp":1750272196000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3697013"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,2,23]]},"references-count":69,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2025,3,31]]}},"alternative-id":["10.1145\/3697013"],"URL":"https:\/\/doi.org\/10.1145\/3697013","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,2,23]]},"assertion":[{"value":"2024-01-24","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-09-02","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-02-23","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}