A Simple Approach for Handling Out-of-Vocabulary Identifiers in Deep Learning for Source Code

Nadezhda Chirkova, Sergey Troshin


Abstract
There is an emerging interest in the application of natural language processing models to source code processing tasks. One of the major problems in applying deep learning to software engineering is that source code often contains a lot of rare identifiers, resulting in huge vocabularies. We propose a simple, yet effective method, based on identifier anonymization, to handle out-of-vocabulary (OOV) identifiers. Our method can be treated as a preprocessing step and, therefore, allows for easy implementation. We show that the proposed OOV anonymization method significantly improves the performance of the Transformer in two code processing tasks: code completion and bug fixing.
Anthology ID:
2021.naacl-main.26
Volume:
Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies
Month:
June
Year:
2021
Address:
Online
Venue:
NAACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
278–288
Language:
URL:
https://aclanthology.org/2021.naacl-main.26
DOI:
10.18653/v1/2021.naacl-main.26
Bibkey:
Cite (ACL):
Nadezhda Chirkova and Sergey Troshin. 2021. A Simple Approach for Handling Out-of-Vocabulary Identifiers in Deep Learning for Source Code. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 278–288, Online. Association for Computational Linguistics.
Cite (Informal):
A Simple Approach for Handling Out-of-Vocabulary Identifiers in Deep Learning for Source Code (Chirkova & Troshin, NAACL 2021)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingestion-script-update/2021.naacl-main.26.pdf
Video:
 https://preview.aclanthology.org/ingestion-script-update/2021.naacl-main.26.mp4