Using bug descriptions to reformulate queries during text-retrieval-based bug localization

Using bug descriptions to reformulate queries during text-retrieval-based bug localization
复制标题

DOI:
10.1007/s10664-018-9672-z
复制
发表时间:
2019-01
影响因子:
4.1
通讯作者:
Oscar Chaparro;Juan Manuel Florez;Andrian Marcus
Oscar Chaparro;Juan Manuel Florez;Andrian Marcus
中科院分区:
计算机科学2区
文献类型:
--
作者:
Oscar Chaparro;Juan Manuel Florez;Andrian Marcus

文献摘要

被引文献

相似文献

基于文本检索(TR)的缺陷定位方法依赖于根据缺陷报告的全文制定初始查询。当查询无法检索有缺陷的代码工件时,开发人员可以重新制定查询并检索更多的候选代码文档。现有的查询重构研究主要集中在利用用户的相关反馈或扩展原始查询与额外的信息。我们假设,错误报告的标题,观察到的行为,预期的行为,重现的步骤,以及用户在错误描述中提供的代码片段,包含检索错误代码工件的最相关信息,而描述的其他部分包含更多不相关的术语,这阻碍了检索。本文提出并评估了一套查询重构策略的基础上选择现有的信息缺陷描述,并删除不相关的部分,从原始查询。结果表明,选择错误报告标题和观察到的行为是在各种基于TR的错误本地化方法和代码粒度中表现最好的策略,因为它导致在前N个结果中检索错误代码工件的查询(平均)比没有查询重构多25.6%。该策略在不同的阈值N上是高度适用和一致的。选择重现的步骤或预期行为(当在错误报告中提供时)沿着错误标题和观察到的行为会导致更高的性能(即,31.4%和41.7%之间的查询)和可比的一致性,但它适用于更少的情况。这些重构策略易于使用,并且独立于底层的检索技术。
Text Retrieval (TR)-based approaches for bug localization rely on formulating an initial query based on the full text of a bug report. When the query fails to retrieve the buggy code artifacts, developers can reformulate the query and retrieve more candidate code documents. Existing research on query reformulation focuses mostly on leveraging relevance feedback from the user or on expanding the original query with additional information. We hypothesize that the title of the bug reports, the observed behavior, expected behavior, steps to reproduce, and code snippets provided by the users in bug descriptions, contain the most relevant information for retrieving the buggy code artifacts, and that other parts of the descriptions contain more irrelevant terms, which hinder retrieval. This paper proposes and evaluates a set of query reformulation strategies based on the selection of existing information in bug descriptions, and the removal of irrelevant parts from the original query. The results show that selecting the bug report title and the observed behavior is the strategy that performs best across various TR-based bug localization approaches and code granularities, as it leads to retrieving the buggy code artifacts within the top-N results for 25.6% more queries (on average) than without query reformulation. This strategy is highly applicable and consistent across different thresholds N. Selecting the steps to reproduce or the expected behavior (when provided in the bug reports) along with the bug title and the observed behavior leads to higher performance (i.e., between 31.4% and 41.7% more queries) and comparable consistency, yet it is applicable in fewer cases. These reformulation strategies are easy to use and are independent of the underlying retrieval technique.