The migration process between different third-party libraries is hard, complex and error-prone. Typically, during a library migration, developers need to find methods in the new library that are most adequate in replacing the old methods of the retired library. This process is subjective and time-consuming as developers need to fully understand the documentation of both libraries Application Programming Interfaces, and find the right matching between their methods if it exists. In this context, several studies rely on mining existing library migrations to provide developers with by-example approaches for similar scenarios. In this paper, we introduce a novel mining approach that extracts existing instances of library method replacements that are manually performed by developers for a given library migration to automatically generate migration patterns in the method level. Thereafter, our approach combines the mined method-change patterns with method-related lexical similarity to accurately detect mappings between replacing/replaced methods. We conduct a large scale empirical study to evaluate our approach on a benchmark of 57,447 open-source Java projects leading to 9 popular library migrations. Our qualitative results indicate that our approach significantly increases the accuracy of mining method-level mappings by an average accuracy of 12%, as well as increasing the number of discovered method mappings, in comparison with existing state-of-the-art studies. Finally, we provide the community with an open source mining tool along with a dataset of all mined migrations at the method level.
Towards Understanding Third-party Library Dependency in C/C++ Ecosystem
第三方库(TPL)经常在软件中重用,以降低开发成本和上市时间。但是,外部库依赖性可能会在主机应用程序中引入漏洞。图书馆的依赖性问题已经引起了相当大的关注。许多包管理器,如Maven,Pip和NPM,被提议用于管理TPL。此外,大量的努力已经投入到研究语言生态系统中的依赖关系,如Java,Python和JavaScript(C/C++除外)。由于缺乏统一的C/C++包管理器,现有的研究对C/C++生态系统中的TPL依赖了解甚少,特别是在大规模的情况下。为了深入理解C/C++生态系统中的TPL依赖,本文收集了现有的TPL数据库、包管理工具和依赖检测工具,总结了C/C++项目的依赖模式,构建了一个全面而精确的C/C++依赖检测器。使用我们的检测器,我们从GitHub上包含24 K C/C++存储库的大型数据库中提取依赖关系。基于提取的依赖关系,我们提供了实证研究的结果和发现,其目的是了解第三方物流的依赖关系的特点。我们进一步讨论了C/C++依赖管理的意义以及未来软件工程研究人员和开发人员在库开发、软件组合分析和C/C++包管理等领域的研究方向。
Automated Inference of Software Library Usage Patterns
现代软件系统越来越依赖于第三方库。人们普遍认为,使用成熟且经过良好测试的第三方库可以提高开发人员的生产力,缩短上市时间,并生产出更可靠的软件。今天的开放源代码库提供了广泛的库,可以免费下载和使用。然而,由于软件库是单独记录的,但打算一起使用,开发人员不太可能充分利用这些重用机会。在本文中,我们提出了一种新的方法来自动识别第三方库的使用模式,即,开发人员通常一起使用的库集合。我们的方法采用层次聚类技术组在一起的软件库外部客户端使用的基础上。为了评估我们的方法,我们从Maven Central Repository中挖掘了超过6,000个流行库,并调查了Github存储库中超过38,000个客户端系统的使用情况。我们的实验表明,我们的技术是能够检测到大多数(77%)的高度一致和凝聚力的图书馆使用模式在相当数量的客户端系统。
PCREQ: Automated Inference of Compatible Requirements for Python Third-party Library Upgrades
Nanjing University of Aeronautics and Astronautics(南京航空航天大学);Nanjing University(南京大学);Southern University of Science and Technology(南方科技大学);Beihang University(北京航空航天大学)