In recent years, autonomous driving has drawn extensive attention. Software plays a crucial role in autonomous driving tasks including perception, planning, control, etc. As autonomous driving software systems often operate in safety-critical environments, their defects may cause catastrophic consequences. Therefore, predicting defective files in autonomous driving software before deployment is important to help developers accurately locate and address potential issues. Although prior studies have presented code clones are prone to cause defects, the potential of code clones as predictors of software defects remains unexplored, particularly in the context of autonomous driving software. In this paper, we propose a suite of code clone-based metrics, and employ them to develop defect prediction models for autonomous driving software. Through an empirical study on two representative L4 autonomous driving systems, Apollo and Autoware, we demonstrate that models relying solely on our clone-based metrics can effectively predict defective files with accuracy rates of 80–84%. Furthermore, we compare the performance of prediction models using three feature sets: clone-based metrics, traditional code metrics, and their combination. The results reveal that prediction models incorporating both clone and traditional code metrics exhibit the best overall performance, indicating the complementary nature of these feature sets. We also implement a tool to automate the calculation of our proposed clone-based metrics, which facilitates practical application in real-world development environments. Our findings have provided valuable insights for enhancing defect prediction in autonomous driving software, enabling developers to more effectively prioritize testing resources and improve system safety and reliability.

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

Code Clone-Based Defect Prediction for Autonomous Driving Software

  • Chenyi Zhou,
  • Ran Mo

摘要

In recent years, autonomous driving has drawn extensive attention. Software plays a crucial role in autonomous driving tasks including perception, planning, control, etc. As autonomous driving software systems often operate in safety-critical environments, their defects may cause catastrophic consequences. Therefore, predicting defective files in autonomous driving software before deployment is important to help developers accurately locate and address potential issues. Although prior studies have presented code clones are prone to cause defects, the potential of code clones as predictors of software defects remains unexplored, particularly in the context of autonomous driving software. In this paper, we propose a suite of code clone-based metrics, and employ them to develop defect prediction models for autonomous driving software. Through an empirical study on two representative L4 autonomous driving systems, Apollo and Autoware, we demonstrate that models relying solely on our clone-based metrics can effectively predict defective files with accuracy rates of 80–84%. Furthermore, we compare the performance of prediction models using three feature sets: clone-based metrics, traditional code metrics, and their combination. The results reveal that prediction models incorporating both clone and traditional code metrics exhibit the best overall performance, indicating the complementary nature of these feature sets. We also implement a tool to automate the calculation of our proposed clone-based metrics, which facilitates practical application in real-world development environments. Our findings have provided valuable insights for enhancing defect prediction in autonomous driving software, enabling developers to more effectively prioritize testing resources and improve system safety and reliability.