Don’t forget to change these functions! recommending co-changed functions in modern code review

IF 3.8 2区 计算机科学 Q2 COMPUTER SCIENCE, INFORMATION SYSTEMS Information and Software Technology Pub Date : 2024-08-10 DOI:10.1016/j.infsof.2024.107547
Yang Hong, Chakkrit Tantithamthavorn, Patanamon Thongtanunam, Aldeida Aleti
{"title":"Don’t forget to change these functions! recommending co-changed functions in modern code review","authors":"Yang Hong,&nbsp;Chakkrit Tantithamthavorn,&nbsp;Patanamon Thongtanunam,&nbsp;Aldeida Aleti","doi":"10.1016/j.infsof.2024.107547","DOIUrl":null,"url":null,"abstract":"<div><h3>Context:</h3><p>Code review is effective and widely used, yet still time-consuming. Especially, in large-scale software systems, developers may forget to change other related functions that must be changed together (aka. co-changes). This may increase the number of review iterations and reviewing time, thus delaying the code review process. Based on our analysis of 66 projects from five open-source systems, we find that there are 16%–33% of code reviews where at least one function must be co-changed, but was not initially changed.</p></div><div><h3>Objectives:</h3><p>This study aims to propose an approach to recommend co-changed functions in the context of modern code review, which could reduce reviewing time and iterations and help developers identify functions that need to be changed together.</p></div><div><h3>Methods:</h3><p>We propose <span>CoChangeFinder</span>, a novel method that employs a Graph Neural Network (GNN) to recommend co-changed functions for newly submitted code changes. Then, we conduct a quantitative and qualitative evaluation of <span>CoChangeFinder</span> with 66 studied large-scale open-source software projects.</p></div><div><h3>Results:</h3><p>Our evaluation results show that our <span>CoChangeFinder</span> outperforms the state-of-the-art approach, achieving 3.44% to 40.45% for top-k accuracy, 2.00% to 26.07% for Recall@k, and 0.04 to 0.21 for mean average precision better than the baseline approach. In addition, our <span>CoChangeFinder</span> demonstrates the capacity to pinpoint the functions related to logic changes.</p></div><div><h3>Conclusion:</h3><p>Our <span>CoChangeFinder</span> outperforms the baseline approach (i.e., TARMAQ) in recommending co-changed functions during the code review process. Based on our findings, <span>CoChangeFinder</span> could help developers save their time and effort, reduce review iterations, and enhance the efficiency of the code review process.</p></div>","PeriodicalId":54983,"journal":{"name":"Information and Software Technology","volume":"176 ","pages":"Article 107547"},"PeriodicalIF":3.8000,"publicationDate":"2024-08-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S0950584924001526/pdfft?md5=c441a69fab78652cf4e529fda2be63fc&pid=1-s2.0-S0950584924001526-main.pdf","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information and Software Technology","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0950584924001526","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

Context:

Code review is effective and widely used, yet still time-consuming. Especially, in large-scale software systems, developers may forget to change other related functions that must be changed together (aka. co-changes). This may increase the number of review iterations and reviewing time, thus delaying the code review process. Based on our analysis of 66 projects from five open-source systems, we find that there are 16%–33% of code reviews where at least one function must be co-changed, but was not initially changed.

Objectives:

This study aims to propose an approach to recommend co-changed functions in the context of modern code review, which could reduce reviewing time and iterations and help developers identify functions that need to be changed together.

Methods:

We propose CoChangeFinder, a novel method that employs a Graph Neural Network (GNN) to recommend co-changed functions for newly submitted code changes. Then, we conduct a quantitative and qualitative evaluation of CoChangeFinder with 66 studied large-scale open-source software projects.

Results:

Our evaluation results show that our CoChangeFinder outperforms the state-of-the-art approach, achieving 3.44% to 40.45% for top-k accuracy, 2.00% to 26.07% for Recall@k, and 0.04 to 0.21 for mean average precision better than the baseline approach. In addition, our CoChangeFinder demonstrates the capacity to pinpoint the functions related to logic changes.

Conclusion:

Our CoChangeFinder outperforms the baseline approach (i.e., TARMAQ) in recommending co-changed functions during the code review process. Based on our findings, CoChangeFinder could help developers save their time and effort, reduce review iterations, and enhance the efficiency of the code review process.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
不要忘记更改这些函数!在现代代码审查中推荐共同更改函数
背景:代码审查虽然有效且应用广泛,但仍然耗时。特别是在大型软件系统中,开发人员可能会忘记修改其他必须一起修改的相关功能(又称共同修改)。这可能会增加审查迭代次数和审查时间,从而延误代码审查过程。目标:本研究旨在提出一种在现代代码审查背景下推荐共变函数的方法,它可以减少审查时间和迭代次数,并帮助开发人员识别需要一起更改的函数。方法:我们提出了 CoChangeFinder,这是一种采用图神经网络(GNN)为新提交的代码更改推荐共变函数的新方法。结果:我们的评估结果表明,CoChangeFinder优于最先进的方法,在top-k准确率上达到了3.44%到40.45%,在Recall@k上达到了2.00%到26.07%,在平均精度上达到了0.04到0.21。结论:在代码审查过程中,我们的 CoChangeFinder 在推荐共变函数方面优于基准方法(即 TARMAQ)。基于我们的研究结果,CoChangeFinder 可以帮助开发人员节省时间和精力,减少审查迭代,并提高代码审查过程的效率。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Information and Software Technology
Information and Software Technology 工程技术-计算机:软件工程
CiteScore
9.10
自引率
7.70%
发文量
164
审稿时长
9.6 weeks
期刊介绍: Information and Software Technology is the international archival journal focusing on research and experience that contributes to the improvement of software development practices. The journal''s scope includes methods and techniques to better engineer software and manage its development. Articles submitted for review should have a clear component of software engineering or address ways to improve the engineering and management of software development. Areas covered by the journal include: • Software management, quality and metrics, • Software processes, • Software architecture, modelling, specification, design and programming • Functional and non-functional software requirements • Software testing and verification & validation • Empirical studies of all aspects of engineering and managing software development Short Communications is a new section dedicated to short papers addressing new ideas, controversial opinions, "Negative" results and much more. Read the Guide for authors for more information. The journal encourages and welcomes submissions of systematic literature studies (reviews and maps) within the scope of the journal. Information and Software Technology is the premiere outlet for systematic literature studies in software engineering.
期刊最新文献
A software product line approach for developing hybrid software systems Evaluating the understandability and user acceptance of Attack-Defense Trees: Original experiment and replication On the road to interactive LLM-based systematic mapping studies Top-down: A better strategy for incremental covering array generation Editorial Board
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1