Classification of Changes Based on API

Classification of Changes Based on API
复制标题

基于API的变更分类

DOI:
10.1007/978-3-031-21388-5_5
复制
发表时间:
2022
期刊:
Proceedings of International Conference on Product-Focused Software Process Improvement
影响因子:
--
通讯作者:
Kusumoto Shinji
Kusumoto Shinji
中科院分区:
--
文献类型:
--
作者:
Iriyama Masashi;Higo Yoshiki;Kusumoto Shinji

文献摘要

相似文献

在软件维护过程中,软件库偶尔会更新,其API也可能会更新。API更改可以分为两类:破坏向后兼容性的更改(简而言之,破坏更改)和保持向后兼容性的更改(简而言之,维护更改)。检测API更改并确定每个更改是破坏性更改还是维护更改,这对于代码审查和版本说明生成非常有用。针对人工查看API变更繁琐的问题,开展了API变更自动检测的研究。APIDiff是一个自动检测API更改的工具,并将检测到的更改分为中断更改和维护更改。APIDiff接受Java库的两个版本作为输入,并根据输入代码的相似性检测API更改。每个检测到的变化都被分类为这两种变化。然而,由于APIDiff为每种类型的更改识别破坏性更改,因此如果对单个API进行多个更改,它往往无法正确分类更改。另一方面,我们在本文中提出的技术通过API对更改进行分组,并检查每组是否包含破坏向后兼容性的更改。通过我们的技术更准确地对API变更进行分类,将有助于在维护过程中生成版本说明。我们在8个开源软件上进行了实验,证实了我们的技术可以比APIDiff更准确地检测API变化。我们还证实,与APIDiff相比,该技术可以更准确地将API更改分类为中断更改和维护更改。
In software maintenance process, software libraries are occasionally updated, and their APIs may also be updated. API changes can be classified into two categories: changes that break backward compatibility (in short, breaking changes) and changes that maintain backward compatibility (in short, maintaining changes). Detecting API changes and determining whether each is a breaking or maintaining change is useful for code reviews and release note generations. Since it is burdensome to check API changes manually, research on automatic detection of API changes has been conducted. APIDiff is a tool that automatically detects API changes and classifies the detected changes into breaking and maintaining ones. APIDiff takes two versions of a Java library as input, and it detects API changes based on the similarity of the input code. Each detected change is classified into the two kinds of changes. However, since APIDiff identifies breaking changes for each type of change, it tends to fail to correctly classify changes if multiple changes were conducted to a single API. On the other hand, our proposed technique in this paper groups changes by APIs and checks whether each group contains changes that break backward compatibility. Classifying API changes more correctly by our technique will be helpful for release note generations in maintenance process. We conducted experiments on eight open-source software and confirmed that our technique could detect API changes more correctly than APIDiff. We also confirmed that the proposed technique could classify API changes more correctly into breaking and maintaining ones than APIDiff.