Neural Program Repair (NPR) has emerged as a promising approach to automatically fix bugs in software programs. By leveraging large datasets of buggy and patched code, NPR models learn patterns and transformations to generate patches. Nevertheless, one fundamental challenge in NPR is the Out-of-Vocabulary (OOV) problem, which occurs when the model encounters tokens that were not seen during training. Due to the diversity and variability of code, the OOV problem is particularly prevalent in the context of NPR, and it may affect the model’s ability to generalize and repair unseen or uncommon code. To comprehensively understand the characteristics of OOV problem and its impacts on NPR, this study conduct an empirical study on three NPR models and two datasets. Our results reveal that the OOV rate decreases with the increasing of the vocabulary of the NPR model, and that the most common types of OOV words in NPR are variable name and parameter name. The results also confirm the negative impact of OOV words on the repair effectiveness of NPR models. Our findings highlight the importance of addressing the OOV problem to enhance the effectiveness and real-world utility of NPR models.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Investigating the OOV Problem and Its Impacts on Neural Program Repair

  • Weijun Guo,
  • Xuedan Zheng,
  • Mingyue Jiang

摘要

Neural Program Repair (NPR) has emerged as a promising approach to automatically fix bugs in software programs. By leveraging large datasets of buggy and patched code, NPR models learn patterns and transformations to generate patches. Nevertheless, one fundamental challenge in NPR is the Out-of-Vocabulary (OOV) problem, which occurs when the model encounters tokens that were not seen during training. Due to the diversity and variability of code, the OOV problem is particularly prevalent in the context of NPR, and it may affect the model’s ability to generalize and repair unseen or uncommon code. To comprehensively understand the characteristics of OOV problem and its impacts on NPR, this study conduct an empirical study on three NPR models and two datasets. Our results reveal that the OOV rate decreases with the increasing of the vocabulary of the NPR model, and that the most common types of OOV words in NPR are variable name and parameter name. The results also confirm the negative impact of OOV words on the repair effectiveness of NPR models. Our findings highlight the importance of addressing the OOV problem to enhance the effectiveness and real-world utility of NPR models.