Intelligent Code Completion with Bayesian Networks

被引:47
|
作者
Proksch, Sebastian [1 ]
Lerch, Johannes [1 ]
Mezini, Mira [1 ]
机构
[1] Tech Univ Darmstadt, D-64289 Darmstadt, Germany
关键词
Algorithms; Experimentation; Measurement; Performance; Content assist; code completion; integrated development environments; machine learning; evaluation; code recommender; productivity; RECOMMENDATION;
D O I
10.1145/2744200
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code completion is an integral part of modern Integrated Development Environments (IDEs). Developers often use it to explore Application Programming Interfaces (APIs). It is also useful to reduce the required amount of typing and to help avoid typos. Traditional code completion systems propose all type-correct methods to the developer. Such a list is often very long with many irrelevant items. More intelligent code completion systems have been proposed in prior work to reduce the list of proposed methods to relevant items. This work extends one of these existing approaches, the Best Matching Neighbor (BMN) algorithm. We introduce Bayesian networks as an alternative underlying model, use additional context information for more precise recommendations, and apply clustering techniques to improve model sizes. We compare our new approach, Pattern-based Bayesian Networks (PBN), to the existing BMN algorithm. We extend previously used evaluation methodologies and, in addition to prediction quality, we also evaluate model size and inference speed. Our results show that the additional context information we collect improves prediction quality, especially for queries that do not contain method calls. We also show that PBN can obtain comparable prediction quality to BMN, while model size and inference speed scale better with large input sizes.
引用
收藏
页数:31
相关论文
共 50 条
  • [1] Survey of Intelligent Code Completion
    Yang B.
    Zhang N.
    Li S.-P.
    Xia X.
    Ruan Jian Xue Bao/Journal of Software, 2020, 31 (05): : 1435 - 1453
  • [2] Code Completion with Neural Attention and Pointer Networks
    Li, Jian
    Wang, Yue
    Lyu, Michael R.
    King, Irwin
    PROCEEDINGS OF THE TWENTY-SEVENTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2018, : 4159 - 4165
  • [3] POSITIVE DEFINITE COMPLETION PROBLEMS FOR BAYESIAN NETWORKS
    Ben-David, Emanuel
    Rajaratnam, Bala
    SIAM JOURNAL ON MATRIX ANALYSIS AND APPLICATIONS, 2012, 33 (02) : 617 - 638
  • [4] A Review of Intelligent Cybersecurity with Bayesian Networks
    Pappaterra, Mauro Jose
    Flammini, Francesco
    2019 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN AND CYBERNETICS (SMC), 2019, : 445 - 452
  • [5] Specializing Neural Networks for Cryptographic Code Completion Applications
    Xiao, Ya
    Song, Wenjia
    Qi, Jingyuan
    Viswanath, Bimal
    McDaniel, Patrick
    Yao, Danfeng
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (06) : 3524 - 3535
  • [6] A Neural Network Based Intelligent Support Model for Program Code Completion
    Rahman, Md Mostafizer
    Watanobe, Yutaka
    Nakamura, Keita
    SCIENTIFIC PROGRAMMING, 2020, 2020
  • [7] Sparse Bayesian Tensor Completion for Data Recovery in Intelligent IoT Systems
    Zhao, Honglu
    Yang, Laurence T.
    Yang, Zecan
    Liu, Debin
    Nie, Xin
    Ren, Bocheng
    IEEE INTERNET OF THINGS JOURNAL, 2024, 11 (15): : 25682 - 25693
  • [8] The constructing of Bayesian networks based on intelligent optimization
    Yang, Youlong
    Wu, Yan
    Liu, Sanyang
    Liu, Jinxing
    ISDA 2006: SIXTH INTERNATIONAL CONFERENCE ON INTELLIGENT SYSTEMS DESIGN AND APPLICATIONS, VOL 1, 2006, : 371 - 376
  • [9] Evaluating the Usability and Functionality of Intelligent Source Code Completion Assistants: A Comprehensive Review
    Hlis, Tilen
    Cetina, Luka
    Beranic, Tina
    Pavlic, Luka
    APPLIED SCIENCES-BASEL, 2023, 13 (24):
  • [10] An intelligent synthetic character for smartphone with Bayesian networks and behavior selection networks
    Yoon, Jong-Won
    Cho, Sung-Bae
    EXPERT SYSTEMS WITH APPLICATIONS, 2012, 39 (12) : 11284 - 11292