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

BERTVRepair: On the Adoption of CodeBERT for Automated Vulnerability Code Repair

  • Nguyen Ngoc Hai Dang,
  • Tho Quan Thanh,
  • Anh Nguyen-Duc

摘要

Vulnerable code continues to have a significant impact to software quality, leading to serious consequences such as economic loss, privacy breaches, and threats to national security. Traditional methods of detecting and addressing software security issues are often time-consuming and resource-intensive. This research aims to examine the effectiveness of generative-based methods, particularly those leveraging generative (DL) models like CodeBERT, in repairing code and addressing software vulnerabilities. Our research question (RQ) is: Can the adoption of CodeBERT extend the capabilities of vulnerability code repair, and, if so, to what extent? We proposed a new approach called BERTVRepair that adopts CodeBERT and state-of-the-art transfer learning and tokenization methods to generate vulnerable code patches. We performed an experiment to compare the performance of BERTVRepair with existing models. We showed a marginal improvement in accuracy and perplexity. We conclude that using generative-based methods like CodeBERT, with its code embedding extraction and transfer learning approaches, can potentially enhance the process of software vulnerability repair. This research contributes to adopting large programming language models into software engineering tasks, such as automated code repair.