During issue resolution, software developers rely on issue reports to discuss solutions for defects, feature requests, and other changes. These discussions contain proposed solutions--from design changes to code implementations--as well as their evaluations. Locating solution-related content is essential for investigating reopened issues, addressing regressions, reusing solutions, and understanding code change rationale. Manually understanding long discussions to identify such content can be difficult and time-consuming. This paper automates solution identification using language models as supervised classifiers. We investigate three applications--embeddings, prompting, and fine-tuning--across three classifier types: traditional ML models (MLMs), pre-trained language models (PLMs), and large language models (LLMs). Using 356 Mozilla Firefox issues, we created a dataset to train and evaluate six MLMs, four PLMs, and two LLMs across 68 configurations. Results show that MLMs with LLM embeddings outperform TF-IDF features, prompting underperforms, and fine-tuned LLMs achieve the highest performance, with LLAMAft reaching 0.716 F1 score. Ensembles of the best models further improve results (0.737 F1). Misclassifications often arise from misleading clues or missing context, highlighting the need for context-aware classifiers. Models trained on Mozilla transfer to other projects, with a small amount of project-specific data, further enhancing results. This work supports software maintenance, issue understanding, and solution reuse.
翻译:在问题解决过程中,软件开发者依赖议题报告来讨论缺陷、功能请求及其他变更的解决方案。这些讨论包含提出的解决方案——从设计变更到代码实现——以及对其的评估。定位解决方案相关内容对于调查重新开启的议题、处理回归问题、复用解决方案以及理解代码变更理由至关重要。人工理解冗长讨论以识别此类内容可能既困难又耗时。本文利用语言模型作为监督分类器来自动化解决方案识别。我们研究了三种应用——嵌入、提示和微调——涉及三种分类器类型:传统机器学习模型(MLMs)、预训练语言模型(PLMs)和大型语言模型(LLMs)。使用356个Mozilla Firefox议题,我们创建了一个数据集,用于训练和评估六种MLMs、四种PLMs和两种LLMs,涵盖68种配置。结果表明,使用LLM嵌入的MLMs优于TF-IDF特征,提示方法表现不佳,而微调的LLMs实现了最高性能,其中LLAMAft达到0.716 F1分数。最佳模型的集成进一步提升了结果(0.737 F1)。误分类常源于误导性线索或缺失上下文,凸显了对上下文感知分类器的需求。在Mozilla上训练的模型可迁移至其他项目,辅以少量项目特定数据即可进一步提升效果。本工作支持软件维护、议题理解和解决方案复用。