一句话:提出崩溃解决方案知识图谱及基于该图谱的推荐技术,显著提升崩溃解决方案推荐准确率。
修复崩溃十分困难,开发者常在 Stack Overflow 等问答社区参考相似崩溃及解决方案。但崩溃涉及目的、环境、代码和崩溃轨迹等复杂上下文,现有推荐技术仅用不完整上下文或将其视为纯文本,推荐不准确。本文提出崩溃解决方案知识图谱,以图结构表示完整崩溃上下文及其解决方案,并利用 prompt learning 在少量标注数据下从 SO 帖子自动构建。基于该图谱,提出 KG4CraSolver,通过细粒度分析匹配完整上下文来找到相关 SO 帖子。评估显示图谱质量高,KG4CraSolver 在所有指标上优于基线(MRR 提升 13.4%-113.4%);用户研究显示参与者找方案快 34.4%、准确率高 63.3%。
Fixing crashes is challenging, and developers often discuss their encountered crashes and refer to similar crashes and solutions on online Q&A forums (e.g., Stack Overflow). However, a crash often involves very complex contexts, which includes different contextual elements, e.g., purposes, environments, code, and crash traces. Existing crash solution recommendation or general solution recommendation techniques only use an incomplete context or treat the entire context as pure texts to search relevant solutions for a given crash, resulting in inaccurate recommendation results. In this work, we propose a novel crash solution knowledge graph (KG) to summarize the complete crash context and its solution with a graph-structured representation. To construct the crash solution KG automatically, we propose to leverage prompt learning to construct the KG from SO threads with a small set of labeled data. Based on the constructed KG, we further propose a novel KG-based crash solution recommendation technique KG4CraSolver, which precisely finds the relevant SO thread for an encountered crash by finely analyzing and matching the complete crash context based on the crash solution KG. The evaluation results show that the constructed KG is of high quality and KG4CraSolver outperforms baselines in terms of all metrics (e.g., 13.4%-113.4% MRR improvements). Moreover, we perform a user study and find that KG4CraSolver helps participants find crash solutions 34.4% faster and 63.3% more accurately.