Deep Learning-based Code Completion: On the Impact on Performance of Contextual Information
Matteo Ciniselli, Luca Pascarella, Gabriele Bavota

TL;DR
This paper empirically investigates how different types of contextual information influence the performance of deep learning-based code completion, demonstrating that additional context can significantly improve prediction accuracy.
Contribution
It systematically evaluates the impact of various contextual information types on DL-based code completion performance, providing insights into optimizing context usage.
Findings
Additional context improves prediction accuracy up to +22%.
Different context types have varying impacts on performance.
Combining multiple contexts yields the best results.
Abstract
Code completion aims at speeding up code writing by recommending to developers the next tokens they are likely to type. Deep Learning (DL) models pushed the boundaries of code completion by redefining what these coding assistants can do: We moved from predicting few code tokens to automatically generating entire functions. One important factor impacting the performance of DL-based code completion techniques is the context provided as input. With "context" we refer to what the model knows about the code to complete. In a simple scenario, the DL model might be fed with a partially implemented function to complete. In this case, the context is represented by the incomplete function and, based on it, the model must generate a prediction. It is however possible to expand such a context to include additional information, like the whole source code file containing the function to complete,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Speech and dialogue systems · Advanced Text Analysis Techniques
