XtraLibD: Detecting Irrelevant Third-Party libraries in Java and Python Applications
Ritu Kapur, Poojith U Rao, Agrim Dewan, Balwinder Sodhi
备注:
25 pages, 5 figures, 4 tables, Book Chapter of Springer's Communications in Computer and Information Science, vol 1556. Springer, Cham. Extended version of paper published in Evaluation of Novel Approaches to Software Engineering. ENASE 2021
发表信息:
Springer's Communications in Computer and Information Science, vol 1556. Springer, Cham. Extended version of paper published in Evaluation of Novel Approaches to Software Engineering. ENASE 2021
Software development comprises the use of multiple Third-Party Libraries (TPLs). However, the irrelevant libraries present in software application's distributable often lead to excessive consumption of resources such as CPU cycles, memory, and modile-devices' battery usage. Therefore, the identification and removal of unused TPLs present in an application are desirable. We present a rapid, storage-efficient, obfuscation-resilient method to detect the irrelevant-TPLs in Java and Python applications. Our approach's novel aspects are i) Computing a vector representation of a .class file using a model that we call Lib2Vec. The Lib2Vec model is trained using the Paragraph Vector Algorithm. ii) Before using it for training the Lib2Vec models, a .class file is converted to a normalized form via semantics-preserving transformations. iii) A eXtra Library Detector (XtraLibD) developed and tested with 27 different language-specific Lib2Vec models. These models were trained using different parameters and >30,000 .class and >478,000 .py files taken from >100 different Java libraries and 43,711 Python available at MavenCentral.com and Pypi.com, respectively. XtraLibD achieves an accuracy of 99.48% with an F1 score of 0.968 and outperforms the existing tools, viz., LibScout, LiteRadar, and LibD with an accuracy improvement of 74.5%, 30.33%, and 14.1%, respectively. Compared with LibD, XtraLibD achieves a response time improvement of 61.37% and a storage reduction of 87.93% (99.85% over JIngredient). Our program artifacts are available at https://www.doi.org/10.5281/zenodo.5179747.
On the Diversity of Software Package Popularity Metrics: An Empirical Study of npm
软件系统通常利用开源软件库来重用功能。这样的库可以通过软件包管理器(如JavaScript的npm)轻松获得。由于在这样的包分发中可用的包的巨大数量,开发者通常基于其流行度来决定依赖于或贡献于软件包。此外,研究人员通常依赖流行度指标进行数据采样并为他们的研究选择合适的候选人。然而,受欢迎程度的含义是相对的,可以以多种方式定义和测量,即使在考虑相同的研究时,也可能产生不同的结果。在本文中,我们展示了在软件工程研究中流行的意义是如何不同的证据。此外,我们实证分析了不同的软件流行性措施之间的关系。作为一个案例研究,对于175 k npm包的大型数据集,我们从三个开源跟踪系统(libraries.io,npmjs.com和GitHub)中计算并提取了9个不同的流行度指标。我们发现,实际上流行度可以用不同的无关指标来衡量,每个指标都可以在特定的上下文中定义。这表明需要一个通用的框架,将使用一个投资组合的流行度度量从不同的概念。
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++包管理等领域的研究方向。