Toward Less Hidden Cost of Code Completion with Acceptance and Ranking Models

06/26/2021
by   Jingxuan Li, et al.
0

Code completion is widely used by software developers to provide coding suggestions given a partially written code snippet. Apart from the traditional code completion methods, which only support single token completion at minimal positions, recent studies show the ability to provide longer code completion at more flexible positions. However, such frequently triggered and longer completion results reduce the overall precision as they generate more invalid results. Moreover, different studies are mostly incompatible with each other. Thus, it is vital to develop an ensemble framework that can combine results from multiple models to draw merits and offset defects of each model. This paper conducts a coding simulation to collect data from code context and different code completion models and then apply the data in two tasks. First, we introduce an acceptance model which can dynamically control whether to display completion results to the developer. It uses simulation features to predict whether correct results exist in the output of these models. Our best model reduces the percentage of false-positive completion from 55.09 17.44 identify the priority of the completion results and reorder the candidates from multiple code completion models. This scheme is flexible in dealing with various models, regardless of the type or the length of their completion results. We integrate this ranking scheme with two frequency models and a GPT-2 styled language model, along with the acceptance model to yield 27.80 37.64 propose a new code completion evaluation metric, Benefit-Cost Ratio(BCR), taking into account the benefit of keystrokes saving and hidden cost of completion list browsing, which is closer to real coder experience scenario.

READ FULL TEXT
research
09/18/2020

Towards Full-line Code Completion with Neural Language Models

A code completion system suggests future code elements to developers giv...
research
05/21/2022

All You Need Is Logs: Improving Code Completion by Learning from Anonymous IDE Usage Logs

Integrated Development Environments (IDE) are designed to make users mor...
research
12/29/2020

Multi-task Learning based Pre-trained Language Model for Code Completion

Code completion is one of the most useful features in the Integrated Dev...
research
04/21/2022

Non-autoregressive Model for Full-line Code Completion

Code completion tools are frequently used by software developers to acce...
research
03/17/2021

Code Completion by Modeling Flattened Abstract Syntax Trees as Graphs

Code completion has become an essential component of integrated developm...
research
08/17/2022

CCTEST: Testing and Repairing Code Completion Systems

Code completion, a highly valuable topic in the software development dom...
research
09/13/2022

Learning to Prevent Profitless Neural Code Completion

Currently, large pre-trained models are widely applied in neural code co...

Please sign up or login with your details

Forgot password? Click here to reset