一句话:提出 XRFix,结合定制静态分析与分层 LLM 提示,自动修复 XR 应用性能缺陷,修复率达 67.3%。
扩展现实(XR)应用的执行涉及 3D 场景渲染、实时动画与过程模拟等计算密集操作,开发中的低效编码会引入性能缺陷,损害用户体验甚至引发眩晕。然而自动修复 XR 性能缺陷面临三重挑战:缺少真实 XR 代码库与缺陷数据集、缺乏准确的缺陷检测工具、没有针对 XR 性能缺陷的有效修复工具。为此,作者提出基于大语言模型(LLM)的修复框架 XRFix:先从 23 个开源 XR 项目构建领域特定的性能缺陷语料库,并整理包含 104 个真实缺陷的数据集;再定制两个静态分析工具,分别检测 C# 脚本与资源文件中的缺陷;最后针对单行、函数、类三种不同复杂度的缺陷场景设计不同提示,引导 LLM 完成修复。作者在五个现成 LLM 上开展实验,并与三种最先进的自动程序修复(APR)方法对比,通过静态分析、参考答案比对与人工检查验证。结果显示 XRFix 能有效修复 XR 缺陷,修复率达 67.3%,比次优方法高 7.7%。
As an emerging technology, Extended Reality (XR) provides end-users with an immersive experience of interacting with virtual and physical environments. Unlike traditional software, the execution of XR applications involves more computationally complex operations, such as 3D scene rendering, real-time animation, and process simulations. Inefficient coding practices during the software development of XR applications may cause various performance bugs, degrading user experience and even causing motion sickness. Thus, it is an urgent need to develop an automated program repair (APR) framework for fixing performance bugs in complex XR programs. However, it is non-trivial to achieve this goal due to several technical challenges: (1) a lack of a real-world XR codebase and bug dataset, (2) no accurate bug detection tool, and (3) no effective bug-fixing tool designed for XR performance bugs. To tackle these challenges, we present a novel large language model-based framework, namely XRFix, to repair performance bugs for open-source XR programs. To overcome the first challenge, we first construct a corpus of domain-specific performance bugs built with a codebase from 23 open-source XR projects and a dataset of XR-related bugs containing 104 real-world bugs. To address the second challenge, we tailor two static analysis tools for accurately detecting bugs in both C# scripts and asset files. For the third challenge, we design different prompts to instruct large language models (LLMs) to fix XR bugs in three types of bug scenarios with different complexities, i.e., single-line level, function level, and class level. We conduct extensive experiments on five off-the-shelf LLMs to evaluate the bug-fixing performance of XRFix. We also compare our XRFix with three state-of-the-art (SOTA) APR approaches. Through static analysis, reference answer comparison, and manual inspection, we demonstrate that our XRFix can effectively fix XR bugs, outperforming SOTA APR methods. For example, our XRFix achieves 67.3% fixing rate, i.e., 7.7% higher than the second-best method. We make XRFix available on GitHub.1.
@inproceedings{paperbot11520,
title = {XRFix: Exploring Performance Bug Repair of Extended Reality Applications with Large Language Models},
author = {Jingwen Wu and Hanyang Guo and Hong-Ning Dai and Xiapu Luo},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3744916.3773120}
}