API Misuse Detection via Probabilistic Graphical Model

被引:0
|
作者
Ma, Yunlong [1 ]
Tian, Wentong [1 ]
Gao, Xiang [1 ]
Sun, Hailong [1 ,2 ]
Li, Li [1 ]
机构
[1] Beihang Univ, State Key Lab Complex & Crit Software Environm CC, Beijing, Peoples R China
[2] Beihang Univ, Hangzhou Innovat Inst, Beijing, Peoples R China
基金
中国国家自然科学基金;
关键词
API misuse detection; Mining Software Repository; Document Mining; Probabilistic Graphical Model;
D O I
10.1145/3650212.3652112
中图分类号
学科分类号
摘要
API misuses can cause a range of issues in software development, including program crashes, bugs, and vulnerabilities. Different approaches have been developed to automatically detect API misuses by checking the program against usage rules extracted from extensive codebase or API documents. However, these mined rules may not be precise or complete, leading to high false positive/negative rates. In this paper, we propose a novel solution to this problem by representing the mined API usage rules as a probabilistic graphical model, where each rule's probability value represents its trustworthiness of being correct. Our approach automatically constructs probabilistic usage rules by mining codebase and documents, and aggregating knowledge from different sources. Here, the usage rules obtained from the codebase initialize the probabilistic model, while the knowledge from the documents serves as a supplement for adjusting and complementing the probabilities accordingly. We evaluate our approach on the MuBench benchmark. Experimental results show that our approach achieves 42.0% precision and 54.5% recall, significantly outperforming state-of-the-art approaches.
引用
收藏
页码:88 / 99
页数:12
相关论文
共 50 条
  • [1] Boosting API Misuse Detection via Integrating API Constraints from Multiple Sources
    Li, Can
    Zhang, Jingxuan
    Tang, Yixuan
    Li, Zhuhang
    Sun, Tianyue
    2024 IEEE/ACM 21ST INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2024, : 14 - 26
  • [2] Commits as a Basis for API Misuse Detection
    Nielebock, Sebastian
    Heumueller, Robert
    Ortmeier, Frank
    SOFTWAREMINING '18: PROCEEDINGS OF THE 7TH INTERNATIONAL WORKSHOP ON SOFTWARE MINING, 2018, : 20 - 23
  • [3] API Misuse Detection Method Based on Transformer
    Yang, Jingbo
    Ren, Jian
    Wu, Wenjun
    2022 IEEE 22ND INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY, QRS, 2022, : 958 - 969
  • [4] Assisting Example-Based API Misuse Detection via Complementary Artificial Examples
    Lamothe, Maxime
    Li, Heng
    Shang, Weiyi
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (09) : 3410 - 3422
  • [5] On a hypergraph probabilistic graphical model
    Javidian, Mohammad Ali
    Wang, Zhiyu
    Lu, Linyuan
    Valtorta, Marco
    ANNALS OF MATHEMATICS AND ARTIFICIAL INTELLIGENCE, 2020, 88 (09) : 1003 - 1033
  • [6] On a hypergraph probabilistic graphical model
    Mohammad Ali Javidian
    Zhiyu Wang
    Linyuan Lu
    Marco Valtorta
    Annals of Mathematics and Artificial Intelligence, 2020, 88 : 1003 - 1033
  • [7] Identification of microRNA regulatory modules in Arabidopsis via a probabilistic graphical model
    Joung, Je-Gun
    Fei, Zhangjun
    BIOINFORMATICS, 2009, 25 (03) : 387 - 393
  • [8] State Estimation via Inference on a Probabilistic Graphical Model - A Different Perspective
    Myers, Luke
    Wang, Binghui
    Gong, Neil Zhenqiang
    Qiao, Daji
    2020 IEEE POWER & ENERGY SOCIETY INNOVATIVE SMART GRID TECHNOLOGIES CONFERENCE (ISGT), 2020,
  • [9] Effective and Efficient API Misuse Detection via Exception Propagation and Search-Based Testing
    Kechagia, Maria
    Devroey, Xavier
    Panichella, Annibale
    Gousios, Georgios
    van Deursen, Arie
    PROCEEDINGS OF THE 28TH ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS (ISSTA '19), 2019, : 192 - 203
  • [10] API Misuse Bug Detection Based on Deep Learning
    Wang X.
    Chen C.
    Zhao Y.-F.
    Peng X.
    Zhao W.-Y.
    Ruan Jian Xue Bao/Journal of Software, 2019, 30 (05): : 1342 - 1358