利用需求和Source Code之间的历史关联来识别受影响的类
Leveraging Historical Associations between Requirements and Source Code to Identify Impacted Classes
摘要:
当软件系统中引入和实现新的需求时,开发人员必须确定需要更改的源代码类集。因此,过去的工作集中在预测受需求影响的类集合上。在本文中,我们介绍和评估一种新的类型的信息的基础上的直觉,这是与历史变化的一个特定的类的要求可能会表现出语义相似的新的要求,影响该类。这个新的需求到需求集(R2RS)度量系列捕获了新需求和先前与类相关联的现有需求集之间的语义相似性。本文的目的是提出和评估的有用性R2RS指标在预测的一组类的需求的影响。我们考虑了18种不同的R2RS度量,通过组合六种自然语言处理技术来测量文本之间的语义相似性(例如,VSM)和三个分布分数来计算总体相似性(例如,相似性分数中的平均值)。我们评估,如果R2RS是有用的组合和对其他四个家庭的指标,是基于时间局部性的变化,直接相似的代码,复杂性指标和代码气味预测受影响的类。我们的评估包括五个分类器和属于四个大型开源项目的78个版本,这导致超过70万个候选受影响的类。实验结果表明,在各种分类器和项目中,利用R2RS信息实际上将预测受影响类别的准确性平均提高了60%以上。
英文摘要:
As new requirements are introduced and implemented in a software system, developers must identify the set of source code classes which need to be changed. Therefore, past effort has focused on predicting the set of classes impacted by a requirement. In this paper, we introduce and evaluate a new type of information based on the intuition that the set of requirements which are associated with historical changes to a specific class are likely to exhibit semantic similarity to new requirements which impact that class. This new Requirements to Requirements Set (R2RS) family of metrics captures the semantic similarity between a new requirement and the set of existing requirements previously associated with a class. The aim of this paper is to present and evaluate the usefulness of R2RS metrics in predicting the set of classes impacted by a requirement. We consider 18 different R2RS metrics by combining six natural language processing techniques to measure the semantic similarity among texts (e.g., VSM) and three distribution scores to compute overall similarity (e.g., average among similarity scores). We evaluate if R2RS is useful for predicting impacted classes in combination and against four other families of metrics that are based upon temporal locality of changes, direct similarity to code, complexity metrics, and code smells. Our evaluation features five classifiers and 78 releases belonging to four large open-source projects, which result in over 700,000 candidate impacted classes. Experimental results show that leveraging R2RS information increases the accuracy of predicting impacted classes practically by an average of more than 60% across the various classifiers and projects.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。