期刊文献+

基于语法与语义分析的代码搜索结果优化 被引量:6

Enhancement of Code Search Results Using Syntax and Semantic Analysis
下载PDF
导出
摘要 通过示例代码学习简单算法的实现和具体API的使用方式是程序开发人员在软件开发中进行软件复用的高效手段,也是使用代码搜索引擎的主要目的。代码搜索引擎从网页搜索技术发展而来,提供对网络上源代码资源的检索功能,能够有效定位与搜索内容相关的代码,为程序开发人员提供帮助。但现有的代码搜索引擎没有在搜索结果中区别API的实现代码与使用代码,搜索结果存在冗余,导致用户无法快速有效地找到提供有用信息的代码片段。为了使用户更好更快地找到代码搜索目标,阐述了应用语法与语义分析技术从区分API实现代码和使用代码、相似代码聚类、搜索结果摘要3个方面对代码搜索结果进行优化的方法,给出了一个代码搜索引擎的实现,并在实例研究中展示了该方法的有效性。 Learning simple algorithm and specific API usage by code examples is an efficient way in software reuse and is the main purpose of using code search engine. Code search engine providing search service for source code on the internet was developed from Web search engine. It is able to locate source code related to the search input and brings great assistance to software development. However, the state-of-art code search engines do not make a distinction between API implementation and usage, the results are redundant and not easy to recognize. It is difficult for the user to obtain useful code segments from search result items. To address the problem, we proposed applying syntax and semantic analysis techniques to organizing the search results,clustering the similar code and acquiring better code digest. We implemented our method with a code search engine and evaluate its effectiveness in this paper, the experimental results demonstrate that our approach works efficiently.
出处 《计算机科学》 CSCD 北大核心 2009年第8期165-168,共4页 Computer Science
基金 国家科技支撑计划(2006BAH02A02) 国家高技术研究发展计划(863)(2006AA01Z189)资助
关键词 软件复用 代码搜索 语法与语义分析 API的实现与使用代码 Software reuse, Code search, Syntax and semantic analysis, API Implementation and Usage
  • 相关文献

参考文献14

  • 1Jacobson I,等.软件复用:结构、过程和组织[M].韩柯,译.北京:机械工业出版社.
  • 2Hoffmann R, Fogarty J. DS Weld Assieme : finding and leveraging implicit references in a web search interface for programmers[C]//Proceedings of UIST'2007.
  • 3Sim S E,Clarke C L A, Holt R C. Archetypal source code searches:A survey of software developers and maintainers[C]//IWPC. 1998.
  • 4Jiang Lingxiao, Misherghi G, Su Zhendong, et al. DECKARD : Scalable and Accurate Tree-based Detection of Code Clones[C] //ICSE 2007.
  • 5Codase[OL]. http://www. codase. com/.
  • 6CSourceSe-arch[OL]. http:///csourcesearch. net/.
  • 7Sourcerer: A Search Engine for Open Source Code[OL]. http://sourcerer. ics. uci. edu/.
  • 8Koders[OL]. http: //www. koders.com/.
  • 9Krugle[OL]. http: //www.krugle. com.
  • 10Google Code Search[OL]. http: //www. google. com/eodesearch.

同被引文献32

  • 1JacobsonI.等.软件复用--结构、过程和组织.韩柯,译.机械工业出版社.2008.
  • 2D.SpineUis, C.Szyperski.Guest editors ' introduction : How is open source affecting software development. IEEE Software, 2004, 21 : 28-33.
  • 3Koders[OL]. http://www, koders, com.
  • 4Google Code Search[OL]. http ://www.google.com/codesearch.
  • 5Krugle[OL]. http://opensearch.krugle.org/project/project_list_init.
  • 6M. R. Madhuri, S. Thummalapenta, T. Xie. Improving soft- ware quality via code searching and mining. In Proceedings of the 2009 ICSE Workshop on Search-Driven Development-Users, Infrastructure, Tools and Evaluation. 2009. pp.' 33-36.
  • 7Sourcerer[OL]. http://sourcerer, ics. uci. edu/sourcerer/search/in- dex. jsp.
  • 8S. Bajracharya, T. Ngo, Baldi, and C. Lopes. Sourcerer:a porting structure-based search. In Object- oriented Programming, 2006. pp :681-682. E. Linstead, Y. Dou, P. Rigor, P. search engine for open source code sup- Proceedings of the 21st Conference on Systems, Languages, and Application,.
  • 9R. Hoffmann, J. Fogarty, and D. S. Weld. Assieme: finding and leveraging implicit references in a web search interface for program- mers. In proceedings of the 20th annual ACM symposium on User interface software and technology, Newport, Rhode Island, USA, 2007. pp: 13-22.
  • 10Codase[OL]. http://www, codase, com.

引证文献6

二级引证文献17

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部