[Paper Review] Practitioners' Expectations on Code Completion
The paper conducts an empirical study of practitioners’ expectations for code completion tools through interviews and a large-scale survey, and compares these expectations with existing research literature from 2012–2022 to identify gaps and directions for future work.
Code completion has become a common practice for programmers during their daily programming activities. It aims at automatically predicting the next tokens or lines that the programmers tend to use. A good code completion tool can substantially save keystrokes and improve the programming efficiency for programmers. Recently, various techniques for code completion have been proposed for usage in practice. However, it is still unclear what are practitioners' expectations on code completion and whether existing research has met their demands. To fill the gap, we perform an empirical study by first interviewing 15 practitioners and then surveying 599 practitioners from 18 IT companies about their expectations on code completion. We then compare the practitioners' demands with current research via conducting a literature review of papers on code completion published in premier publication venues from 2012 to 2022. Based on the comparison, we highlight the directions desirable for researchers to invest efforts towards developing code completion techniques for meeting practitioners' expectations.
Motivation & Objective
- Investigate the current state of code completion practices among practitioners.
- Identify issues and perceived importance of code completion in real-world development.
- Elucidate practitioners’ expectations at token-level and statement-level granularity.
- Assess how well current research aligns with practitioner needs and reveal gaps for future work.
Proposed method
- Conduct semi-structured interviews with 15 practitioners to explore practices and expectations.
- Administer an online survey to 599 practitioners across 18 IT companies for quantitative validation.
- Perform a literature review of code completion research from premier venues (2012–2022) and compare with practitioner expectations.
Experimental results
Research questions
- RQ1RQ1: What is the state of code completion practices (tools and usage scenarios) among practitioners?
- RQ2RQ2: Is code completion important to practitioners, and what issues do they face?
- RQ3RQ3: What are practitioners’ expectations on token-level and statement-level code completion tools (usage, metrics, access, effectiveness, efficiency, and general tool factors)?
- RQ4RQ4: How well does current research satisfy practitioners’ demands and where are the gaps?
Key findings
- IDE built-in code completion is the most commonly used tool (96%), with third-party plugins like Copilot and IntelliCode used by about 13%.
- Token-level completion is far more popular (81%) than statement-level completion (32%), with identifier completion and API recommendation being the most utilized sub-scenarios (≈85%).
- 88% of practitioners view code completion as important, but only 36% find current tools satisfying; major issues include erroneous completion (56%), painful installation (58%), and poor ranking (34%).
- For token-level completion, over 80% expect identifier completion, API recommendation, and path completion; about 79% want top-3 candidate accuracy, and 85% expect results within 200 ms.
- For statement-level completion, skeleton prediction, currently edited line completion, and API-argument recommendation are most expected; preferred latency is ≤2 seconds, with emphasis on grammatical correctness and readability as evaluation metrics.
- There are notable gaps between research and practitioner needs: most token-level work focuses on API/identifier completion, with few addressing path completion; statement-level work emphasizes next-line completion rather than skeletons or API-argument prediction; popular evaluation metrics like overlapped n-grams and edit similarity are less favored by practitioners.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.