arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2408.15853cs.SE
收藏

数据导向库API误用的实证研究

An Empirical Study of API Misuses of Data-Centric Libraries

University of Alberta(阿尔伯塔大学);New York University Abu Dhabi(纽约大学阿布扎比分校);Singapore Management University(新加坡管理大学)

Akalanka Galappaththi, Sarah Nadi, Christoph Treude

AI总结:

本文通过分析Stack Overflow和GitHub数据,研究五种数据导向库的API误用特征,发现其误用模式与传统库不同,揭示了数据导向库API误用的挑战。

摘要:

开发者在开发软件时依赖第三方库的API,但库通常带有假设和使用限制,违反这些限制会导致API误用。API误用可能导致崩溃或错误行为。尽管API误用已被广泛研究,但最近对深度学习库API误用的研究显示,其本质和症状与传统库不同,从而突显了当前误用检测工具的不足。我们推测这些观察可能不仅限于深度学习API误用,而是源于这些API的数据导向性质。数据导向库通常处理多样化的数据结构、复杂的处理流程和众多参数,这使它们在正确使用上更具挑战性。因此,了解这些库的潜在误用至关重要,以避免意外的应用行为。为此,本文对五种数据导向库进行了实证研究,涵盖数据处理、数值计算、机器学习和可视化等领域。我们通过分析Stack Overflow和GitHub的数据来识别这些库的误用。我们的结果表明,许多观察到的深度学习库API误用特征也适用于我们研究的数据导向库API误用。我们还发现,开发者倾向于误用数据导向库的API,无论API指令是否出现在文档中。总体而言,我们的工作揭示了数据导向库API误用的挑战,而不仅仅是深度学习库。我们收集的误用及其特征为未来研究奠定了基础,以帮助减少这些库的误用。

英文摘要:

Developers rely on third-party library Application Programming Interfaces (APIs) when developing software. However, libraries typically come with assumptions and API usage constraints, whose violation results in API misuse. API misuses may result in crashes or incorrect behavior. Even though API misuse is a well-studied area, a recent study of API misuse of deep learning libraries showed that the nature of these misuses and their symptoms are different from misuses of traditional libraries, and as a result highlighted potential shortcomings of current misuse detection tools. We speculate that these observations may not be limited to deep learning API misuses but may stem from the data-centric nature of these APIs. Data-centric libraries often deal with diverse data structures, intricate processing workflows, and a multitude of parameters, which can make them inherently more challenging to use correctly. Therefore, understanding the potential misuses of these libraries is important to avoid unexpected application behavior. To this end, this paper contributes an empirical study of API misuses of five data-centric libraries that cover areas such as data processing, numerical computation, machine learning, and visualization. We identify misuses of these libraries by analyzing data from both Stack Overflow and GitHub. Our results show that many of the characteristics of API misuses observed for deep learning libraries extend to misuses of the data-centric library APIs we study. We also find that developers tend to misuse APIs from data-centric libraries, regardless of whether the API directive appears in the documentation. Overall, our work exposes the challenges of API misuse in data-centric libraries, rather than only focusing on deep learning libraries. Our collected misuses and their characterization lay groundwork for future research to help reduce misuses of these libraries.

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

↑