论文标题
API滥用检测一种免疫系统启发方法
API Misuse Detection An Immune System inspired Approach
论文作者
论文摘要
API是开发复杂软件系统的重要成分。但是,它们很难学习和使用。因此,开发人员可能会滥用它们,从而导致各种类型的问题。在本文中,我们探讨了使用生物启发的方法(人工免疫系统)来检测客户代码中的API滥用。我们构建了Apimmune,这是一种新颖的API滥用探测器。我们使用API从一组客户端程序中收集给定API的正常用法,尤其是在这些程序中固定了一些API使用后。正常的API使用被认为是正常的身体细胞。我们将它们转变为正常的使用签名。然后,人工探测器是通过与这些用法产生人工偏差的随机生成的,目的是与正常使用特征不同。由于免疫系统检测到生物体的外来细胞,生成的检测器具有检测API的风险使用的能力。此外,出于检测目的,仅需要人工检测器,而无需披露用于生成它们的代码。我们的方法对三个API的滥用数据集以及来自最先进的API滥用基准数据集的已知滥用进行了评估。还将Apimmune与四种最先进的API滥用检测工具进行了比较。结果表明,apimune具有良好的检测准确性和性能,并且可以补充基于模式的工具,以进行罕见的滥用检测。
APIs are essential ingredients for developing complex software systems. However, they are difficult to learn and to use. Thus, developers may misuse them, which results in various types of issues. In this paper, we explore the use of a bio-inspired approach (artificial immune system) to detect API misuses in client code. We built APIMMUNE, a novel API misuse detector. We collect normal usages of a given APIs from the set of client programs using the APIs, especially after some API usages were fixed in those programs. The normal API usages are considered as normal body cells. We transform them into normal-usage signatures. Then, artificial detectors are randomly generated by generating artificial deviations from these usages with the objective of being different from the normal usage signatures. The generated detectors have the ability to detect risky uses of APIs exactly as the immune system detects foreign cells of the organism. Moreover, for the detection purpose, only the artificial detectors are necessary, without the need to disclose the code used to generate them. Our approach was evaluated on the misuses dataset of three APIs as well as on known misuses from a state of the art APIs misuses benchmarking dataset. APIMMUNE was also compared to four state-of-the-art API misuse detection tools. The results show that APIMMUNE has good detection accuracy and performance, and it can complement pattern-based tools for uncommon misuses detection.