期刊文献+

基于树结构的代码检索方法

Code retrieval method based on tree structure
在线阅读 下载PDF
导出
摘要 随着软件项目规模的不断增大和开源代码库的日益丰富,快速、准确的代码检索变得至关重要。传统基于关键词的搜索方法存在效率低和准确性不高等问题,因此文章提出了一种基于树结构的项目源代码检索方法,结合代码和注释构建多层次树结构,以帮助开发者更好地理解代码关系,进而准确定位所需代码。通过汇聚相似代码元素、过滤非相关代码,该方法可有效提高代码检索的准确性。实验结果显示,基于树结构的代码检索方法在准确率、召回率和F1值方面显著优于传统的文本匹配和图嵌入方法,可提供高效、准确的代码检索工具,从而提高开发效率和代码重用质量,有望在软件开发中产生积极影响。 With the continuous increase in software project scale and the enrichment of open source code libraries,fast and accurate code retrieval has become crucial.Traditional keyword based search methods suffer from low efficiency and accuracy.Therefore,this article proposes a tree based project source code retrieval method,which combines code and annotations to construct a multi-level tree structure to help developers better understand code relationships and accurately determine the required code.This method can effectively improve the accuracy of code retrieval by aggregating similar code elements and filtering irrelevant code.The experimental results show that the tree based code retrieval method is significantly better than traditional text matching and graph embedding methods in terms of accuracy,recall,and F1 value.It can provide efficient and accurate code retrieval tools,thereby improving development efficiency and code reuse quality,and is expected to have a positive impact on software development.
作者 糜伊杨 余芊瞳 魏念青 MI Yiyang;YU Qiantong;WEI Nianqing(Chengdu University of Information Technology,Chengdu 610225,China)
出处 《计算机应用文摘》 2024年第7期125-127,共3页 Chinese Journal of Computer Application
关键词 代码检索 多层次树结构 信息检索 code retrieval multi level tree structure information retrieval
  • 相关文献

参考文献7

二级参考文献38

  • 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.

共引文献31

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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