计算机科学 ›› 2014, Vol. 41 ›› Issue (11): 36-39.doi: 10.11896/j.issn.1002-137X.2014.11.008

• 2013’全国软件与应用学术会议 • 上一篇    下一篇

一种基于调用链分析的特征定位方法

付焜,钱文亿,彭鑫,赵文耘   

  1. 复旦大学软件学院 上海201203 上海市数据科学重点实验室复旦大学 上海201203;复旦大学软件学院 上海201203 上海市数据科学重点实验室复旦大学 上海201203;复旦大学软件学院 上海201203 上海市数据科学重点实验室复旦大学 上海201203;复旦大学软件学院 上海201203 上海市数据科学重点实验室复旦大学 上海201203
  • 出版日期:2018-11-14 发布日期:2018-11-14
  • 基金资助:
    本文受国家“863”高技术研究发展计划项目基金(2012AA011202),教育部高校博士点基金(20100071110031)资助

Feature Location Method Based on Call Chain Analysis

FU Kun,QIAN Wen-yi,PENG Xin and ZHAO Wen-yun   

  • Online:2018-11-14 Published:2018-11-14

摘要: 为了完成各种软件维护任务,如纠正错误、改进原有功能、添加新功能,开发人员经常需要确定需求特征与代码的对应关系。这种确定源代码中与给定需求特征相关的程序元素的过程称为特征定位。现有的特征定位方法主要根据用户提出的需求,在源代码中搜索相关的代码元素推荐给用户。然而这些零散的元素之间不具备任何关联,用户仍然需要人工地挖掘元素间的关系,来了解代码元素是如何相互配合、实现特定功能的。而通过与数据传递相关的方法调用链可以改进特征定位的实践方法。该方法能分析源代码,获取到所有的与数据传递相关的方法调用链,然后将根据用户提供的相关需求的关键字找到相关的调用链,推荐给用户。这种调用链不再是零散的代码元素,它能够反映出特定功能实现的流程,也能够更好地帮助用户理解程序。基于该方法实现的Eclipse插件工具已经在JEdit项目上进行了测试。结果显示该工具给出的推荐结果平均查准率可达55%。

关键词: 特征定位,程序理解,调用分析,调用链推荐,Eclipse插件

Abstract: In order to accomplish a variety of software maintenance tasks,such as fixing bugs,changing existent functionalities,or adding new features,developers often need to look for related codes of a feature in advance.Such a process to identify relevant program elements according to a given feature is called as feature location.Existing feature localization methods,mainly based on user demand,search related code elements in the source code,and recommend them to the user.However,these scattered elements do not have any connection with each other,and user may still need to manually find out the relationship between the elements,to understand how the code elements combine together to achieve a specific function.However,a new approach based on method-call-chains associated with data transferring can improve the feature location practice.This method can analyze the source code,extract all of the method-call-chains associated with the data transferring,and find relevant ones on the user’s demand.This method-call-chain is not a simple code segment.It can reveal the implementation of specific functions,and help user to understand the program better.An Eclipse plug-in of this approach was evaluated on JEdit.And the precision of the results of the tool is average 55%.

Key words: Feature location,Program understand,Method calls analysis,Recommended,Eclipse plugins

[1] Biggerstaff T J,Mitbander B G,Webster D.The concept assignment problem in program understanding[C]∥Proceedings of the 15th International Conference on Software Engineering.IEEE Computer Society Press,1993:482-498
[2] Dit B,Revelle M,Gethers M,et al.Feature Location in Source Code:A Taxonomy and Survey[J].Journal of Software:Evolution and Process,2013,25(1):53-95
[3] Trifu M.Using Dataflow Information for Concern Identification in Object-Oriented Software Systems[C]∥Proceedings of European Conference on Software Maintenance and Reengineering (CSMR’ 08).2008:193-202
[4] Robillard M P.To pology Analysis of Software Dependencies[J].ACM Transactions on Software Engineering and Metho-dology, 2008,17(4):1-36
[5] Wong W E,Gokhale S S,Horgan J R,et al.Locating program features using execution slices[C]∥Proceedings of IEEE Symposium on Application-Specific Systems and Software Enginee-ring and Technology (ASSET’99).March 1999:194-203
[6] Eisenberg A D,De Volder K.Dynamic Feature Traces:Finding Features in Unfamiliar Code[C]∥Proceedings of 21st IEEE International Conference on Software Maintenance (ICSM’05).Buda pest,Hungary,September 2005:337-346
[7] Zhao W,Zhang L,Liu Y,et al.SNIAFL:Towards a Static Non -interactive Approach to Feature Location[J].ACM Transactions on Software Engineering and Methodologies (TOSEM),2006,15(2):195-226

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!