摘要
确定源代码中与给定需求特征相关的程序元素的过程称为特征定位。但现在大部分的特征定位方法仍是以特征相关的描述和代码结构信息为输入,以特征相关的代码元素为输出。这样的结果缺乏代码元素间的关系信息,难以让开发者快速理解相关特征的程序结构。针对这个问题,提出一种基于子图搜索的特征定位方法。该方法能找出与特征相关的代码元素,并以依赖调用图的形式将结果展示出来,让开发者快速了解代码结构。根据该方法实现了相应工具并经过实验验证了方法的有效性。该方法的平均准确率为40.41%,平均召回率为50.28%。
The process to identify relevant program elements according to a given feature is called feature location.However,existing feature location methods,mainly based on feature description and source code structure,only produce source code elements as the result,which is usually lack of structural information and makes it difficult for developers to understand the code structure quickly.To solve this problem,a feature location method based on sub-graph search was proposed.The method finds out code elements related to the feature and the results can be displayed in a call graph.The method is implemented as a tool and tested for its performance.The average precision is 40.41 % and the average recall is 50.28%.
出处
《计算机科学》
CSCD
北大核心
2017年第4期56-59,81,共5页
Computer Science
基金
国家自然科学基金(61370079)
国家高技术研究发展计划(863)(2013AA01A605)资助
关键词
特征定位
程序理解
代码结构
调用依赖
Feature location
Program understanding
Code structure
Call dependence