EUVIMEDEUVIMED entdecken
Crossref

Non-Autoregressive Line-Level Code Completion

Fang Liu, Zhiyi Fu, Ge Li, Zhi Jin, Hui Liu, Yiyang Hao, Li Zhang

ACM Transactions on Software Engineering and Methodology · 30.06.2024 · 33 (5) · 1-34

DOI: 10.1145/3649594 ↗

Kurz gefasst

Fachartikel in der Zeitschrift ACM Transactions on Software Engineering and Methodology, online erschienen am 03.06.2024. Verfasst von Fang Liu und 6 weiteren Autor:innen. Die Arbeit wurde bisher 25-mal zitiert (Crossref) und nennt 54 Literaturangaben. Gefördert von: National Natural Science Foundation of China, Self-determined Research Funds of State Key Laboratory of Complex & Critical Software Environment.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Software developers frequently use code completion tools to accelerate software development by suggesting the following code elements. Researchers usually employ AutoRegressive (AR) decoders to complete code sequences in a left-to-right, token-by-token fashion. To improve the accuracy and efficiency of code completion, we argue that tokens within a code statement have the potential to be predicted concurrently. In this article, we first conduct an empirical study to analyze the dependency among the target tokens in line-level code completion. The results suggest that it is potentially practical to generate all statement tokens in parallel. To this end, we introduce SANAR, a simple and effective syntax-aware non-autoregressive model for line-level code completion. To further improve the quality of the generated code, we propose an adaptive and syntax-aware sampling strategy to boost the model’s performance. The experimental results obtained from two widely used datasets indicate that our model outperforms state-of-the-art code completion approaches of similar model size by a considerable margin, and is faster than these models with up to 9× speed-up. Moreover, the extensive results additionally demonstrate that the enhancements achieved by SANAR become even more pronounced with larger model sizes, highlighting their significance.

Förderung

  • National Natural Science Foundation of China
  • Self-determined Research Funds of State Key Laboratory of Complex & Critical Software Environment

Zitieren

APA

Liu, F., Fu, Z., Li, G., Jin, Z., Liu, H., Hao, Y., & Zhang, L. (2024). Non-Autoregressive Line-Level Code Completion. ACM Transactions on Software Engineering and Methodology, 33(5), 1-34. https://doi.org/10.1145/3649594

Vancouver

Liu F, Fu Z, Li G, Jin Z, Liu H, Hao Y, et al. Non-Autoregressive Line-Level Code Completion. ACM Transactions on Software Engineering and Methodology. 2024;33(5):1-34. doi:10.1145/3649594

BibTeX
@article{Liu2024,
  author = {Liu, Fang and Fu, Zhiyi and Li, Ge and Jin, Zhi and Liu, Hui and Hao, Yiyang and Zhang, Li},
  title = {Non-Autoregressive Line-Level Code Completion},
  journal = {ACM Transactions on Software Engineering and Methodology},
  year = {2024},
  volume = {33},
  number = {5},
  pages = {1--34},
  doi = {10.1145/3649594}
}
Kostenlos starten →