paperbot · PL 论文追踪

全部论文 待读 收藏

P1 HapRepair: Learn to Repair OpenHarmony Apps

HapRepair:学习修复 OpenHarmony 应用
FSE Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering2025匹配度 5/10 · 论文结合静态分析(CodeLinter、ArkAnalyzer)与 LLM/RAG 做缺陷修复,落在 PL 与 AI 交叉的软件工程方向,并面向 OpenHarmony 工业场景,具有一定工程落地价值。但它核心是缺陷修复而非静态分析/形式化验证本身,也不涉及 Agentic 程序、浮点或贝叶斯程序分析,因此与用户核心研究方向部分相关但不够正中。引用 3 inbox
Zhihao Lin, Mingyi Zhou, Wei Ma, Chi Chen, Yun Yang, Jun Wang, Chunming Hu, Li Li
crossref: 2026-09-12

AI 速览

一句话:结合静态分析与 RAG 的 LLM 缺陷修复框架,在 ArkTS/OpenHarmony 应用上实现约 99% 的修复率。

该论文针对 LLM 修复新兴编程语言缺陷时面临的训练数据稀缺与上下文窗口受限问题,提出 HapRepair 框架。由于 ArkTS 在 OpenHarmony 平台广泛使用但代码语料不足,直接使用 LLM 进行缺陷修复效果不佳。HapRepair 将静态分析工具 CodeLinter 集成到迭代修复流程中用于缺陷检测,并利用 RAG 与 ArkAnalyzer 提升修复方案质量;同时提出 Surrounding Context Extractor 和 Context Combination Tool 来缓解 LLM 上下文窗口限制,支持多缺陷修复。实验在 OpenHarmony 应用测试集上进行,HapRepair 的缺陷修复率达到约 99%,而直接基于缺陷信息使用 LLM 修复仅约 37%,表明该框架在新语言且代码语料有限场景下具有高可靠性与效率。

问题
LLM 在 ArkTS 等新兴语言上因训练数据稀缺而修复效果差,且多缺陷修复受上下文窗口限制。
方法
提出 HapRepair,集成 CodeLinter 做缺陷检测,结合 RAG 与 ArkAnalyzer 生成修复方案,并设计 Surrounding Context Extractor 与 Context Combination Tool 以突破上下文窗口限制。
评估
在 OpenHarmony 应用测试集上评估,HapRepair 达到约 99% 的缺陷修复率,而直接使用 LLM 仅约 37%。
原文摘要(Abstract)

Software defect detection and repair are essential software engineering tasks that mitigate potential risks in the early development stages. Large Language Models (LLMs) have demonstrated significant capabilities in software defect detection and repair. However, it is hard for LLMs to handle the new programming languages such as ArkTS (which is predominantly used in the OpenHarmony platform) due to training data shortage. Additionally, LLM-based multi-defect repair suffers from the limitation of the context window of LLMs. These issues significantly affect the performance of LLM-based defect repair in new programming languages. To address the above challenges, we propose HapRepair, a defect repair framework that integrates static analysis tools with retrieval-augmented generation (RAG) to improve the effectiveness of the defect repair. Specifically, we integrate CodeLinter into our iterative defect repair framework for defect detection, which is the basis of defect repair, and utilize RAG together with ArkAnalyzer to improve the quality of our repair solutions. To overcome the context window limitation of LLMs, we propose the Surrounding Context Extractor and the Context Combination Tool. Experiment results show that HapRepair effectively repairs defects in OpenHarmony Apps, demonstrating high reliability and efficiency in addressing code issues, achieving a defect repair rate of about 99% on the test set, compared to only about 37% when directly using LLMs for defect repair based on the defect information. Our approach demonstrates a robust solution for defect repair on new programming languages that have limited code corpus.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8991,
  title = {HapRepair: Learn to Repair OpenHarmony Apps},
  author = {Zhihao Lin and Mingyi Zhou and Wei Ma and Chi Chen and Yun Yang and Jun Wang and Chunming Hu and Li Li},
  booktitle = {FSE},
  year = {2025},
  doi = {10.1145/3696630.3728556}
}