In edge-cloud systems, the quality of infrastructure deployment is crucial for delivering high-quality services, especially when using popular Infrastructure as Code (IaC) tools like Ansible. Ensuring the reliability of such large-scale code systems poses a significant challenge due to the limited testing resources. Software defect prediction (SDP) addresses this limitation by identifying defect-prone software modules, allowing developers to prioritize testing resources effectively. This paper introduces a Large Language Model (LLM)-based approach for SDP in Ansible scripts with Code-Smell-guided Prompting (CSP). CSP leverages code smell indicators extracted from Ansible scripts to refine prompts given to LLMs, enhancing their understanding of code structure concerning defects. Our experimental results demonstrate that CSP variants, particularly the Chain of Thought CSP (CoT-CSP), outperform traditional prompting strategies, as evidenced by improved F1-scores and Recall. To the best of our knowledge, this is the first attempt to employ LLMs for SDP in Ansible scripts. By employing a code smell-guided prompting strategy tailored for Ansible, we anticipate that the proposed method will enhance software quality assurance and reliability, thereby increasing the overall reliability of edge-cloud systems.

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

Enhancing Software Defect Prediction in Ansible Scripts Using Code-Smell-Guided Prompting with Large Language Models in Edge-Cloud Infrastructures

  • Hyunsun Hong,
  • Sungu Lee,
  • Duksan Ryu,
  • Jongmoon Baik

摘要

In edge-cloud systems, the quality of infrastructure deployment is crucial for delivering high-quality services, especially when using popular Infrastructure as Code (IaC) tools like Ansible. Ensuring the reliability of such large-scale code systems poses a significant challenge due to the limited testing resources. Software defect prediction (SDP) addresses this limitation by identifying defect-prone software modules, allowing developers to prioritize testing resources effectively. This paper introduces a Large Language Model (LLM)-based approach for SDP in Ansible scripts with Code-Smell-guided Prompting (CSP). CSP leverages code smell indicators extracted from Ansible scripts to refine prompts given to LLMs, enhancing their understanding of code structure concerning defects. Our experimental results demonstrate that CSP variants, particularly the Chain of Thought CSP (CoT-CSP), outperform traditional prompting strategies, as evidenced by improved F1-scores and Recall. To the best of our knowledge, this is the first attempt to employ LLMs for SDP in Ansible scripts. By employing a code smell-guided prompting strategy tailored for Ansible, we anticipate that the proposed method will enhance software quality assurance and reliability, thereby increasing the overall reliability of edge-cloud systems.