正确建立软件文档与代码间的可追踪关系对程序理解、软件维护等非常重要。近年来,软件文档与代码间的可追踪性研究大多基于文本词汇相似度,没有充分利用软件文档和代码所蕴含的结构信息,针对这一问题提出了将软件结构信息与信息检索模型相结合进行文档与代码间可追踪性分析的方法。通过对文档和代码结构信息的分析,改善预处理效果,优化相似度计算过程,进而提高整体方法的有效性。实验结果表明,该方法比单纯基于信息检索的方法在查全率和查准率上都有所提高,而且能提取到更多的可追踪性链。%Traceability recovery between documentation and source code plays an important role in program compre-hension, software maintenance and other software activities. Most of researches on the traceability recovery are based on text similarity, but few researches take full advantage of structure information in documentation and code. This paper presents a method for traceability recovery between documentation and code by combining information retrieval with structure information. Through the analysis of structure information in documentation and code, this method improves the effect of preprocessing and optimizes the similarity calculation process. What’s more, it improves overall effectiveness. The experimental results show that compared with simple approaches based on information retrieval, the proposed method can increase the recall and precision and extract more traceability links.
展开▼