Int J Performability Eng ›› 2019, Vol. 15 ›› Issue (10): 2718-2725.doi: 10.23940/ijpe.19.10.p18.27182725

• Orginal Article • Previous Articles     Next Articles

A Context Model for Code and API Recommendation Systems based on Programming Onsite Data

Zhiyi Zhangabc*, Chuanqi Taoabc, Wenhua Yangab, Yuqian Zhouabd, and Zhiqiu Huangab   

  1. aCollage of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics China, Nanjing, 211100, China
    bKey Laboratory of Safety-Critical Software, Ministry of Industry and Information Technology, Nanjing, 211100, China
    cState Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, 210023, China
    dState Key Laboratory of Cryptology, Beijing, 100878, China
  • Submitted on ; Revised on ; Accepted on
  • Contact: Zhang Zhiyi
  • About author:

    * Corresponding author. E-mail address: zyzhang10@nuaa.edu.cn

  • Supported by:
    This research is supported in part by the National Key Research and Development Program of China (No 2018YFB1003902), Key Laboratory of Safety-Critical Software at Nanjing University of Aeronautics and Astronautics, Ministry of Industry and Information Technology (No XCA17007-04), Open Fund of the State Key Laboratory for Novel Software Technology (No KFKT2019B11), Fundamental Research Funds for the Central Universities (No 3082018NS2018056), National Natural Science Foundation of China (No 61402229, 61602267, and 61901218), and Open Fund of the State Key Laboratory for Novel Software Technology (No KFKT2018B19)

Abstract:

Code and application programming interface (API) recommendation systems are important guarantees for efficient and accurate code reuse to improve the efficiency of software development. Context data plays a key role in code and API recommendation. A large amount of programming onsite data has been generated, but existing code and API recommendation systems rarely consider the context based on programming onsite data, which leads to low efficiency and poor accuracy of code and API recommendation. In this paper, we proposed a context model for code and API recommendation systems. Our context model is based on programming onsite data collected during programming. It includes four aspects: developer, project, time, and environment. Developer data is labeled data abstracted from information according to developers' programming habits and abilities, project data is information about the project, time data is information about temporal aspects of developers interacting with the project, and environment data is all environment elements used by developers during programming. Then, we collected programming onsite data in three ways: explicit collection, implicit collection, and reasoning. Lastly, we built the context model using a coarse-grained abstract model for recommendation. Our context model retains the key information in the code while eliminating redundant information that may affect the accuracy of the recommend task, and it can theoretically improve the efficiency and accuracy of recommendation.

Key words: context model, code and API recommendation, programming onsite data