Code Line Recommendation Based on Deep Context-awareness of Onsite Programming
Author:
Affiliation:

Clc Number:

TP311

Fund Project:

National Key Research and Development Program of China (2018YFB1003900); National Natural Science Foundation of China (61602267, 61402229); Open Fund of the State Key Laboratory for Novel Software Technology (KFKT2018B19)

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    In the Onsite Programming of software development, there are a lot of information related to the current development task, such as code line context information, user development intention, etc. If the next code line or lines can be recommended to program developers according to the existing code lines, then it will not only help the developer to complete the development task better, but also improve the efficiency of software development. However, most existing approaches only focus on code repair or completion, which seldom considers how to meet the demand of recommending code lines based on contextual information. To solve this problem, a feasible solution is using deep learning methods to extract the relevant context factors of code lines through mining hidden context information based on the existing massive source data. Therefore, this study proposes a novel approach based on deep learning for onsite programming. In this approach, the contextual relationships among various code lines are learned from existing large-scale code data sets and then Top-N code lines are recommended to programmers. The approach utilizes the RNN encoder-decoder framework, which can encode several lines of code to a vector with context-aware information, and then obtain the Top-N new code lines based on the context vector. Finally, the approach is empirically evaluated with a large-scale code line data set collected from the open source platform. The study results show that the proposed approach can recommend the relevant code lines to developers according to the existing context, and the accuracy value is approaching to 60%. In addition, the MRR value is about 0.3, indicating that the recommended items are ranked in the top of the N recommended results.

    Reference
    Related
    Cited by
Get Citation

陶传奇,包盼盼,黄志球,周宇,张智轶.编程现场上下文深度感知的代码行推荐.软件学报,2021,32(11):3351-3371

Copy
Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:December 18,2018
  • Revised:March 10,2020
  • Adopted:
  • Online: October 12,2020
  • Published: November 06,2021
You are the firstVisitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-4
Address:4# South Fourth Street, Zhong Guan Cun, Beijing 100190,Postal Code:100190
Phone:010-62562563 Fax:010-62562533 Email:jos@iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063