Abstract: Code completion is essential in integrated development environments (IDEs). It has also shown intelligence in helping developers to product. Recently, neural network-based models have helped improve code completion by capturing code information from the abstract syntax tree (AST). However, these methods suffer from several issues. First, the code sequence features are not fully exploited. Second, the sequence features are not effectively combined and utilized with structural features. In this paper, we explore the effectiveness of code sequence features using relative position encoding at first. Then we combine the sequence features with structural features using an extended attention mechanism to enhance performance. We evaluate the proposed approach in two real-world datasets and find that sequence features are practically crucial for code completion. The sequence features combined with structural features enhance the code completion performance. Also, we employ Byte-Pair Encoding (BPE) to mitigate the out-of-vocabulary (OOV) issue in this task. Our best model has a 10% improvement for the mean reciprocal rank (MRR) metric compared to previous researches.
0 Replies
Loading