SENSORY: Leveraging Code Statement Sequence Information for Code Snippets Recommendation

被引:15
|
作者
Ai, Lei [1 ]
Huang, Zhiqiu [1 ]
Li, Weiwei [2 ]
Zhou, Yu [1 ]
Yu, Yaoshen [1 ]
机构
[1] Nanjing Univ Aeronaut & Astronaut, Coll Comp Sci & Technol, Nanjing, Peoples R China
[2] Nanjing Univ Aeronaut & Astronaut, Coll Astronaut, Nanjing, Peoples R China
基金
国家重点研发计划; 中国博士后科学基金;
关键词
code snippets recommendation; code statement sequence; structure information; programming context;
D O I
10.1109/COMPSAC.2019.00014
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Software developers often have to implement unfamiliar programming tasks. When faced with these problems, developers often search online for code snippets as references to learn how to solve the unfamiliar tasks. In recent years, some researchers propose several approaches to use programming context to recommend code snippets. Most of these approaches use information retrieval based techniques and treat code snippets as a set of tokens. However, in code, the smallest meaningful unit is code statement, in general, the line of code. Since these studies did not consider this issue, there is still room for improvement in the code snippets recommendation. In this paper, we propose a code Statement sEquence iNformation baSed cOde snippets Recommendation sYstem (SENSORY). Different from existing token based approaches, SENSORY performs code snippets recommendation at code statement granularity. It uses the Burrows Wheeler Transform algorithm to search relevant code snippets, and uses the structure information to re-rank the results. To evaluate the effectiveness of our proposed method, we construct a code database with 1000000 real world code snippets which contain more than 15000000 lines of code. The experimental results show that SENSORY outperforms the two strong baseline work in terms of precision and NDCG.
引用
收藏
页码:27 / 36
页数:10
相关论文
共 50 条
  • [31] Multimodal sensory information is represented by a combinatorial code in a sensorimotor system
    Follmann, Rosangela
    Goldsmith, Christopher John
    Stein, Wolfgang
    PLOS BIOLOGY, 2018, 16 (10)
  • [32] Senatus - A Fast and Accurate Code-to-Code Recommendation Engine
    Silavong, Fran
    Moran, Sean
    Georgiadis, Antonios
    Saphal, Rohan
    Otter, Robert
    2022 MINING SOFTWARE REPOSITORIES CONFERENCE (MSR 2022), 2022, : 511 - 523
  • [33] SoCeR: A New Source Code Recommendation Technique for Code Reuse
    Islam, Md Mazharul
    Iqbal, Razib
    2020 IEEE 44TH ANNUAL COMPUTERS, SOFTWARE, AND APPLICATIONS CONFERENCE (COMPSAC 2020), 2020, : 1552 - 1557
  • [34] CODE MODELS OF SENSORY INFORMATION FROM SKIN ANALYZER PERIPHERY
    ZEVEKE, AV
    POLEVAYA, SA
    NEUROPHYSIOLOGY, 1992, 24 (02) : 85 - 88
  • [35] A spatial code for temporal information is necessary for efficient sensory learning
    Bagur, Sophie
    Bourg, Jacques
    Kempf, Alexandre
    Tarpin, Thibault
    Bergaoui, Khalil
    Guo, Yin
    Ceballo, Sebastian
    Schwenkgrub, Joanna
    Verdier, Antonin
    Puel, Jean Luc
    Bourien, Jerome
    Bathellier, Brice
    SCIENCE ADVANCES, 2025, 11 (02):
  • [36] Code Recommendation for Exception Handling
    Nguyen, Tam
    Vu, Phong
    Nguyen, Tung
    PROCEEDINGS OF THE 28TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE '20), 2020, : 1027 - 1038
  • [37] Explicit Code Reuse Recommendation
    Fraivert, Dov
    Lorenz, David H.
    COMPANION PROCEEDINGS OF THE 2022 ACM SIGPLAN INTERNATIONAL CONFERENCE ON SYSTEMS, PROGRAMMING, LANGUAGES, AND APPLICATIONS: SOFTWARE FOR HUMANITY, SPLASH COMPANION 2022, 2022, : 9 - 10
  • [38] Secure Code Recommendation Based on Code Review Result Using OWASP Code Review Guide
    Damanik, Venia Noella Nanisura
    Sunaringtyas, Septia Ulfa
    2020 5TH INTERNATIONAL WORKSHOP ON BIG DATA AND INFORMATION SECURITY (IWBIS 2020), 2020, : 157 - 161
  • [39] DR_PSF: Enhancing Developer Recommendation by Leveraging Personalized Source-Code Files
    Yang, Hui
    Sun, Xiaobing
    Li, Bin
    Duan, Yucong
    PROCEEDINGS 2016 IEEE 40TH ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE WORKSHOPS, VOL 1, 2016, : 239 - 244
  • [40] PTM-APIRec: Leveraging Pre-trained Models of Source Code in API Recommendation
    Li, Zhihao
    Li, Chuanyi
    Tang, Ze
    Huang, Wanhong
    Ge, Jidong
    Luo, Bin
    Ng, Vincent
    Wang, Ting
    Hu, Yucheng
    Zhang, Xiaopeng
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (03)