arrow
返回

Code completion with statistical language models

delete2014-06-09
delete0
PRE
AI
DOI:10.1145/2666356.2594321delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
We address the problem of synthesizing code completions for programs using APIs. Given a program with holes, we synthesize completions for holes with the most likely sequences of method calls. Our main idea is to reduce the problem of code completion to a natural-language processing problem of predicting probabilities of sentences. We design a simple and scalable static analysis that extracts sequences of method calls from a large codebase, and index these into a statistical language model. We then employ the language model to find the highest ranked sentences, and use them to synthesize a code completion. Our approach is able to synthesize sequences of calls across multiple objects together with their arguments. Experiments show that our approach is fast and effective. Virtually all computed completions typecheck, and the desired completion appears in the top 3 results in 90% of the cases.
Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey代码智能中语言模型的陷阱:一种分类和综述
err2026-03-01
err0
PREAI
errShe, Xinyu; Liu, Yue; Zhao, Yanjie; He, Yiling; Li, Li; Tantithamthavorn, Chakkrit; Qin, Zhan; Wang, Haoyu
err分享
err收藏

期刊

暂无期刊信息

机构

暂无机构信息
引用论文

引用论文

暂无论文信息