<p>The aim of software defect prediction is to identify defect-prone code segments, thereby facilitating the optimal allocation of testing resources by the quality assurance team. Previous defect prediction models have primarily concentrated on a coarse-grained file-level defect prediction, which frequently lacks the necessary precision for defect localization. In response, recent advancements in the field have seen the emergence of fine-grained line-level defect prediction methods. Nevertheless, many of these methods do not explore enough the contextual semantics of individual code lines or adequately account for their local interactions. Addressing these deficiencies, this paper proposes an innovative line-level defect prediction methodology, BARLineDP, which leverages a bilinear attention fusion framework coupled with ranking optimization. BARLineDP comprehensively amalgamates the code line semantics, corresponding line-level context, and local interaction between code lines and their context. In addition, a ranking optimization algorithm is introduced during model training to further enhance the model’s ability to identify high-risk code lines. We conduct experiments involving within- and cross-project defect prediction across 9 diverse software projects spanning a total of 32 releases. Empirical studies demonstrate that BARLineDP achieves superior performance when compared to advanced file-level and line-level defect prediction approaches.</p>

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

Enhancing line-level defect prediction using bilinear attention fusion and ranking optimization

  • Shaojian Qiu,
  • Huihao Huang,
  • Yingjie Kuang,
  • Haoyu Luo,
  • Xiao Liu

摘要

The aim of software defect prediction is to identify defect-prone code segments, thereby facilitating the optimal allocation of testing resources by the quality assurance team. Previous defect prediction models have primarily concentrated on a coarse-grained file-level defect prediction, which frequently lacks the necessary precision for defect localization. In response, recent advancements in the field have seen the emergence of fine-grained line-level defect prediction methods. Nevertheless, many of these methods do not explore enough the contextual semantics of individual code lines or adequately account for their local interactions. Addressing these deficiencies, this paper proposes an innovative line-level defect prediction methodology, BARLineDP, which leverages a bilinear attention fusion framework coupled with ranking optimization. BARLineDP comprehensively amalgamates the code line semantics, corresponding line-level context, and local interaction between code lines and their context. In addition, a ranking optimization algorithm is introduced during model training to further enhance the model’s ability to identify high-risk code lines. We conduct experiments involving within- and cross-project defect prediction across 9 diverse software projects spanning a total of 32 releases. Empirical studies demonstrate that BARLineDP achieves superior performance when compared to advanced file-level and line-level defect prediction approaches.