arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.10776cs.SE
收藏

XtraLibD:检测Java和Python应用程序中不相关的第三方库

XtraLibD: Detecting Irrelevant Third-Party libraries in Java and Python Applications

Ritu Kapur, Poojith U Rao, Agrim Dewan, Balwinder Sodhi

摘要:

软件开发包括使用多个第三方库(TPL)。然而,在软件应用程序的可分发中存在的不相关的库往往导致过度消耗资源,例如CPU周期、存储器和模块设备的电池使用。因此,需要识别和移除应用中存在的未使用的TPL。我们提出了一种快速,存储效率,混淆弹性的方法来检测Java和Python应用程序中的不相关的TPL。我们的方法的新颖之处是i)使用我们称为Lib2Vec的模型计算.class文件的向量表示。Lib2 Vec模型使用段落向量算法进行训练。ii)在使用它训练Lib2Vec模型之前,.class文件通过语义保持转换转换为规范化形式。iii)开发了一个Xtra库检测器(XtraLibD),并使用27种不同的语言特定的Lib2Vec模型进行了测试。这些模型使用不同的参数和> 30,000.class和> 478,000.py文件进行训练,这些文件分别来自于MavenCentral.com和Pypi.com上的>100个不同的Java库和43,711个Python。XtraLibD的准确率达到99.48%,F1得分为0.968,优于现有的工具,即,LibScout、LiteRadar和LibD的准确率分别提高了74.5%、30.33%和14.1%。与LibD相比,XtraLibD实现了61.37%的响应时间改进和87.93%的存储减少(比Jobdient减少99.85%)。我们的程序工件可以在https://www.doi.org/10.5281/zenodo.5179747上找到。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑