An Empirical Study on the Usage of Transformer Models for Code Completion

计算机科学 安全性令牌 编码(集合论) 变压器 源代码 程序设计语言 冗余代码 代码生成 操作系统 物理 集合(抽象数据类型) 量子力学 电压 钥匙(锁)
作者
Matteo Ciniselli,Nathan Cooper,Luca Pascarella,Antonio Mastropaolo,Emad Aghajani,Denys Poshyvanyk,Massimiliano Di Penta,Gabriele Bavota
出处
期刊:IEEE Transactions on Software Engineering [IEEE Computer Society]
卷期号:: 1-1 被引量:61
标识
DOI:10.1109/tse.2021.3128234
摘要

Code completion aims at speeding up code writing by predicting the next code token(s) the developer is likely to write. Works in this field focused on improving the accuracy of the generated predictions, with substantial leaps forward made possible by deep learning (DL) models. However, code completion techniques are mostly evaluated in the scenario of predicting the next token to type, with few exceptions pushing the boundaries to the prediction of an entire code statement. Thus, little is known about the performance of state-of-the-art code completion approaches in more challenging scenarios in which, for example, an entire code block must be generated. We present a large-scale study exploring the capabilities of state-of-the-art Transformer-based models in supporting code completion at different granularity levels, including single tokens, one or multiple entire statements, up to entire code blocks (e.g., the iterated block of a for loop). We experimented with several variants of two recently proposed Transformer-based models, namely RoBERTa and the Text-To-Text Transfer Transformer (T5), for the task of code completion. The achieved results show that Transformer-based models, and in particular the T5, represent a viable solution for code completion, with perfect predictions ranging from ~29%, obtained when asking the model to guess entire blocks, up to ~69%, reached in the simpler scenario of few tokens masked from the same code statement.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
番号01发布了新的文献求助10
刚刚
wisdom应助三六九采纳,获得10
刚刚
1秒前
zhenya发布了新的文献求助10
1秒前
一介书生完成签到 ,获得积分10
2秒前
2秒前
时尚俊驰发布了新的文献求助10
2秒前
3秒前
星星发布了新的文献求助10
3秒前
monoklatt发布了新的文献求助10
4秒前
AlinaLee完成签到,获得积分10
4秒前
5秒前
专注的煎饼完成签到,获得积分10
5秒前
lilian发布了新的文献求助10
6秒前
为你博弈发布了新的文献求助10
6秒前
Hello应助星星采纳,获得10
7秒前
SciGPT应助rain采纳,获得10
7秒前
7秒前
7秒前
9秒前
9秒前
传奇3应助没有昵称采纳,获得20
10秒前
希望天下0贩的0应助asdfqwer采纳,获得10
10秒前
11秒前
欧阳慕山完成签到,获得积分10
11秒前
凡夕木叶发布了新的文献求助10
11秒前
11秒前
退堂鼓完成签到,获得积分20
12秒前
12秒前
小马甲应助Corry采纳,获得10
13秒前
烟花应助时尚俊驰采纳,获得10
13秒前
yu发布了新的文献求助10
13秒前
井野浮完成签到,获得积分10
14秒前
wangxiaoqing完成签到,获得积分10
14秒前
在水一方应助Betty采纳,获得10
14秒前
乐乐应助开心寄松采纳,获得10
14秒前
浮生发布了新的文献求助100
14秒前
BPM发布了新的文献求助10
14秒前
我是老大应助咿呀采纳,获得10
15秒前
16秒前
高分求助中
Ophthalmic Equipment Market by Devices(surgical: vitreorentinal,IOLs,OVDs,contact lens,RGP lens,backflush,diagnostic&monitoring:OCT,actorefractor,keratometer,tonometer,ophthalmoscpe,OVD), End User,Buying Criteria-Global Forecast to2029 2000
A new approach to the extrapolation of accelerated life test data 1000
Cognitive Neuroscience: The Biology of the Mind 1000
Cognitive Neuroscience: The Biology of the Mind (Sixth Edition) 1000
ACSM’s Guidelines for Exercise Testing and Prescription, 12th edition 588
Christian Women in Chinese Society: The Anglican Story 500
A Preliminary Study on Correlation Between Independent Components of Facial Thermal Images and Subjective Assessment of Chronic Stress 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 3961655
求助须知:如何正确求助?哪些是违规求助? 3507998
关于积分的说明 11139004
捐赠科研通 3240407
什么是DOI,文献DOI怎么找? 1790947
邀请新用户注册赠送积分活动 872683
科研通“疑难数据库(出版商)”最低求助积分说明 803306