arrow
返回

Generative API usage code recommendation with parameter concretization

delete2019-07-30
delete11
PRE
AI
C
Chi Chen
X
Xin Peng *
孙俊 封面图
孙俊 (Jun Sun)
Z
Zhenchang Xing
王新 (Xin Wang)
Y
Yifan Zhao
张海蕊 封面图
张海蕊 (Hairui Zhang)
DOI:10.1007/s11432-018-9821-9delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Many programming languages and development frameworks have extensive libraries (e.g., JDK and Android libraries) that ease the task of software engineering if used effectively. With numerous library classes and sometimes intricate API (application programming interface) usage constraints, programmers often have difficulty remembering the library APIs and/or using them correctly. This study addresses this problem by developing an engine called DeepAPIRec, which automatically recommends the API usage code. Compared to the existing proposals, our approach distinguishes itself in two ways. First, it is based on a tree-based long short-term memory (LSTM) neural network inspired by recent developments in the machine-learning community. A tree-based LSTM neural network allows us to model and reason about variable-length, preceding and succeeding code contexts, and to make precise predictions. Second, we apply data-flow analysis to generate concrete parameters for the API usage code, which not only allows us to generate complete code recommendations but also improves the accuracy of the learning results according to the tree-based LSTM neural network. Our approach has been implemented for supporting Java programs. Our experimental studies on the JDK library show that at statement-level recommendations, DeepAPIRec can achieve a top-1 accuracy of about 37% and a top-5 accuracy of about 64%, which are significantly better than the existing approaches. Our user study further confirms that DeepAPIRec can help developers to complete a segment of code faster and more accurately as compared to IntelliJ IDEA.
Keyword:
code recommendation
API
deep learning
data dependency
parameter concretization
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

Science China Information Sciences 封面图
Science China Information Sciences
IF:
7.6
论文数:
4.9K
被引数:
8.9K

机构

F
fudan university
学者数:
11.8W
论文数: 7.7W
被引数: 121
A
Australian National University
学者数:
2.1W
论文数: 2.3W
被引数: 3.9W