XML configurations are integral to the Android development framework, particularly in the realm of UI display. However, these configurations can introduce compatibility issues (bugs), resulting in divergent visual outcomes and system crashes across various Android API versions (levels). In this study, we systematically investigate LLM-based approaches for detecting and repairing configuration compatibility bugs. Our findings highlight certain limitations of LLMs in effectively identifying and resolving these bugs, while also revealing their potential in addressing complex, hard-to-repair issues that traditional tools struggle with. Leveraging these insights, we introduce the LLM-CompDroid framework, which combines the strengths of LLMs and traditional tools for bug resolution. Our experimental results demonstrate a significant enhancement in bug resolution performance by LLM-CompDroid, with LLM-CompDroid-GPT-3.5 and LLM-CompDroid-GPT-4 surpassing the state-of-the-art tool, ConfFix, by at least 9.8% and 10.4% in both Correct and Correct@k metrics, respectively. This innovative approach holds promise for advancing the reliability and robustness of Android applications, making a valuable contribution to the field of software development.
翻译:XML配置是安卓开发框架不可或缺的组成部分,尤其在用户界面显示领域发挥着关键作用。然而,这些配置可能引入兼容性问题(缺陷),导致不同安卓API版本(级别)下出现视觉差异和系统崩溃。本研究系统性地探究了基于大语言模型(LLM)的配置兼容性缺陷检测与修复方法。我们的发现揭示了LLMs在有效识别和修复这些缺陷方面的局限性,同时展现了它们在处理传统工具难以解决的复杂修复问题中的潜力。基于这些洞察,我们提出了LLM-CompDroid框架,该框架融合了LLMs与传统工具的修复优势。实验结果表明,LLM-CompDroid显著提升了缺陷修复性能,其中LLM-CompDroid-GPT-3.5和LLM-CompDroid-GPT-4在Correct与Correct@k指标上较现有最优工具ConfFix分别至少提升9.8%和10.4%。这一创新方法有望增强安卓应用程序的可靠性与鲁棒性,为软件开发领域做出重要贡献。