Understanding Code Change with Micro-Changes

Lei Chen, Michele Lanza, Shinpei Hayashi
{"title":"Understanding Code Change with Micro-Changes","authors":"Lei Chen, Michele Lanza, Shinpei Hayashi","doi":"arxiv-2409.09923","DOIUrl":null,"url":null,"abstract":"A crucial activity in software maintenance and evolution is the comprehension\nof the changes performed by developers, when they submit a pull request and/or\nperform a commit on the repository. Typically, code changes are represented in\nthe form of code diffs, textual representations highlighting the differences\nbetween two file versions, depicting the added, removed, and changed lines.\nThis simplistic representation must be interpreted by developers, and mentally\nlifted to a higher abstraction level, that more closely resembles natural\nlanguage descriptions, and eases the creation of a mental model of the changes.\nHowever, the textual diff-based representation is cumbersome, and the lifting\nrequires considerable domain knowledge and programming skills. We present an\napproach, based on the concept of micro-change, to overcome these difficulties,\ntranslating code diffs into a series of pre-defined change operations, which\ncan be described in natural language. We present a catalog of micro-changes,\ntogether with an automated micro-change detector. To evaluate our approach, we\nperformed an empirical study on a large set of open-source repositories,\nfocusing on a subset of our micro-change catalog, namely those related to\nchanges affecting the conditional logic. We found that our detector is capable\nof explaining more than 67% of the changes taking place in the systems under\nstudy.","PeriodicalId":501278,"journal":{"name":"arXiv - CS - Software Engineering","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-09-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Software Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.09923","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

A crucial activity in software maintenance and evolution is the comprehension of the changes performed by developers, when they submit a pull request and/or perform a commit on the repository. Typically, code changes are represented in the form of code diffs, textual representations highlighting the differences between two file versions, depicting the added, removed, and changed lines. This simplistic representation must be interpreted by developers, and mentally lifted to a higher abstraction level, that more closely resembles natural language descriptions, and eases the creation of a mental model of the changes. However, the textual diff-based representation is cumbersome, and the lifting requires considerable domain knowledge and programming skills. We present an approach, based on the concept of micro-change, to overcome these difficulties, translating code diffs into a series of pre-defined change operations, which can be described in natural language. We present a catalog of micro-changes, together with an automated micro-change detector. To evaluate our approach, we performed an empirical study on a large set of open-source repositories, focusing on a subset of our micro-change catalog, namely those related to changes affecting the conditional logic. We found that our detector is capable of explaining more than 67% of the changes taking place in the systems under study.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
通过微变化了解代码变化
软件维护和演进中的一项重要活动是理解开发人员在提交拉取请求和/或对版本库进行提交时所进行的更改。通常,代码变更以代码差异(diffs)的形式表示,这种文本表示法突出了两个文件版本之间的差异,描述了添加、删除和更改的行。这种简单化的表示法必须由开发人员进行解释,并在头脑中提升到更高的抽象层次,这种抽象层次更接近于自然语言描述,便于创建变更的心智模型。我们提出了一种基于微变更概念的方法来克服这些困难,将代码差异转化为一系列预定义的变更操作,这些操作可以用自然语言进行描述。我们提供了一个微变更目录和一个自动微变更检测器。为了评估我们的方法,我们在大量开源软件库中进行了实证研究,重点关注微变更目录的子集,即那些与影响条件逻辑的变更相关的内容。我们发现,我们的检测器能够解释所研究系统中发生的 67% 以上的变化。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Promise and Peril of Collaborative Code Generation Models: Balancing Effectiveness and Memorization Shannon Entropy is better Feature than Category and Sentiment in User Feedback Processing Motivations, Challenges, Best Practices, and Benefits for Bots and Conversational Agents in Software Engineering: A Multivocal Literature Review A Taxonomy of Self-Admitted Technical Debt in Deep Learning Systems Investigating team maturity in an agile automotive reorganization
×
引用
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