arrow
返回

A unified multi-task learning model for AST-level and token-level code completion

delete2022-04-18
delete17
PRE
AI
F
Fang Liu
G
Ge Li *
B
Bolin Wei
X
Xin Xia
Z
Zhiyi Fu
Z
Zhi Jin
DOI:10.1007/s10664-022-10140-7delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Code completion, one of the most useful features in the Integrated Development Environments (IDEs), can accelerate software development by suggesting the next probable tokens based on existing code in real-time. Recent studies have shown that recurrent neural networks based statistical language models can improve the performance of code completion tools through learning from large-scale software repositories. However, most of the existing approaches treat code completion as a single generation task in which the model predicts the value of the tokens or AST nodes based on the contextual source code without considering the syntactic constraints such as the static type information. Besides, the semantic relationships in programs can be very long. Existing recurrent neural networks based language models are not sufficient to model the long-term dependency. In this paper, we tackle the aforementioned limitations by building a unified multi-task learning based code completion model for both AST-level and token-level code completion. To model the relationship and constraints between the type and value of the code elements, we adopt a multi-task learning framework to predict the type and value of the tokens (AST nodes) simultaneously. To capture the long-term dependency in the input programs, we employ a self-attentional architecture based network as the base language model. We apply our approach to both AST-level and token-level code completion. Experimental results demonstrate the effectiveness of our model when compared with state-of-the-art methods.
Keyword:
Code completion
Deep learning
Multi-task learning

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

H
huawei technologies
学者数:
3.3K
论文数: 2.9K
被引数: 1
P
peking university
学者数:
11.9W
论文数: 8.7W
被引数: 146
引用论文

引用论文

Ca2+ Activated K Channels-New Tools to Induce Cardiac Commitment from Pluripotent Stem Cells in Mice and Men
err2011-10-26
err0
PREAI
errMartin Müller; Marianne Stockmann; Daniela Malan; Anne Wolheim; Michael Tischendorf; Leonhard Linta; Sarah-Fee Katz; Qiong Lin; Stephan Latz; Cornelia Brunner; Anna M. Wobus; Martin Zenke; Maria Wartenberg; Tobias M. Boeckers; Götz von Wichert; Bernd K. Fleischmann; Stefan Liebau; Alexander Kleger
err分享
err收藏
ZmSIZ1a and ZmSIZ1b play an indispensable role in resistance against Fusarium ear rot in maize
err2023-01-23
err0
errOAAI
errXinyang Liao; Juan Sun; Quanquan Li; Wenyan Ding; Binbin Zhao; Baobao Wang; Shaoqun Zhou; Haiyang Wang
err分享
err收藏
err分享
err收藏
学者 查看更多内容