基于序列相似性的Source Code检索
Source Code Retrieval Using Sequence Based Similarity
摘要:
重复代码对软件系统的质量有负面影响,至少应该被检测出来。在本文中,我们讨论了一种方法,提高了源代码检索使用的结构信息的程序。我们开发了一个词法分析器,从Java程序中提取控制语句和方法标识符。我们提出了一个相似性度量,定义的顺序完全匹配的语句的数量的顺序部分匹配的语句的数量的比率。相似性度量被认为是基于集合的相似性索引的扩展,例如,Sorensen-Dice指数我们这项研究的主要贡献是开发了一种相似性检索算法,该算法从给定的序列中导出有意义的搜索条件,然后使用所有导出的条件进行检索。实验表明,我们的检索模型优于其他检索模型的检索方法的数量高达90.9%。
英文摘要:
Duplicated code has a negative impact on the quality of software systems and should be detected at least. In this paper, we discuss an approach that improves source code retrieval using the structural information about the programs. We developed a lexical parser to extract control statements and method identifiers from Java programs. We propose a similarity measure that is defined by the ratio of the number of sequentially full matching statements to the number of sequentially partial matching ones. The similarity measure is considered to be an extension of a set based similarity index, e.g., Sorensen-Dice index. Our key contribution of this research is the development of a similarity retrieval algorithm that derives meaningful search conditions from a given sequence, and then performs retrieval using all of the derived conditions. Experiments show that our retrieval model outperforms the other retrieval models up to 90.9% in the number of retrieved methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。