Divide-and-Conquer: Automating Code Revisions via Localization-and-Revision

计算机科学 分而治之算法 程序设计语言 软件工程 编码(集合论) 集合(抽象数据类型)
作者
Shangwen Wang,Bo Lin,Liqian Chen,Xiaoguang Mao
出处
期刊:ACM Transactions on Software Engineering and Methodology [Association for Computing Machinery]
被引量:2
标识
DOI:10.1145/3697013
摘要

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 “Divide-and-Conquer”, 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 paper, we present a two-phase code revision approach that aims to overcome the aforementioned limitations by adhering to the “Divide-and-Conquer” 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’s 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.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
小鱼发布了新的文献求助20
1秒前
陈1完成签到 ,获得积分10
1秒前
1秒前
你猜完成签到,获得积分10
1秒前
Yummy发布了新的文献求助20
1秒前
1秒前
易安发布了新的文献求助30
3秒前
呜呜呜发布了新的文献求助10
3秒前
3秒前
科研通AI6.2的应助被舍文华采纳,获得10
3秒前
无极微光的应助被凡倾宇采纳,获得20
4秒前
菠萝卟完成签到,获得积分10
4秒前
安详冬日发布了新的文献求助10
5秒前
无涯发布了新的文献求助10
5秒前
昏睡的映易完成签到,获得积分10
5秒前
优雅永不过时完成签到 ,获得积分10
5秒前
梁白开发布了新的文献求助10
6秒前
小何驳回了Lm的应助
6秒前
海绵宝宝发布了新的文献求助10
7秒前
海豚完成签到,获得积分10
7秒前
酷波er的应助被岛上书屋采纳,获得10
8秒前
zdl完成签到,获得积分10
9秒前
领导范儿的应助被emberlynn采纳,获得20
9秒前
9秒前
小x完成签到,获得积分10
10秒前
11秒前
pride发布了新的文献求助10
11秒前
小二郎的应助被一二三采纳,获得20
11秒前
李爱国的应助被刘柳采纳,获得10
12秒前
v0id的应助被路人采纳,获得10
12秒前
单身的涵瑶完成签到,获得积分10
13秒前
lele033086完成签到,获得积分10
13秒前
huwenbin完成签到 ,获得积分10
13秒前
13秒前
充电宝的应助被tomorrow采纳,获得10
14秒前
小二郎的应助被zxinran0408采纳,获得30
14秒前
ANSWER完成签到,获得积分20
14秒前
15秒前
15秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Energie-Contracting 1500
Spec 401: Standards for Jet Fuel Facility and Equipment Commissioning and Flushing at Airports, 2026.1 (Original Issue) 1000
Spec 103: Standard for Jet Fuel Quality Control at Airports, Revision 2026.1 1000
Mathematical models in hydrology 1000
Klimaschutzrecht durch den Energiesektor im Mehrebenensystem – Ein Rechtsvergleich 1000
Erzählte Gnade 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8086965
求助须知:如何正确求助?哪些是违规求助? 9500651
关于积分的说明 21420432
捐赠科研通 7658313
什么是DOI,文献DOI怎么找? 3403461
关于科研通互助平台的介绍 2532276
邀请新用户注册赠送积分活动 2441933