跳到主要导航 跳到搜索 跳到主要内容

Fusing Code Searchers

  • Shangwen Wang
  • , Mingyang Geng
  • , Bo Lin
  • , Zhensu Sun
  • , Ming Wen*
  • , Yepang Liu*
  • , Li Li
  • , Tegawendé F. Bissyandé
  • , Xiaoguang Mao
  • *此作品的通讯作者

科研成果: 期刊稿件文章同行评审

摘要

Code search, which consists in retrieving relevant code snippets from a codebase based on a given query, provides developers with useful references during software development. Over the years, techniques alternatively adopting different mechanisms to compute the relevance score between a query and a code snippet have been proposed to advance the state of the art in this domain, including those relying on information retrieval, supervised learning, and pre-training. Despite that, the usefulness of existing techniques is still compromised since they cannot effectively handle all the diversified queries and code in practice. To tackle this challenge, we present Dancer, a data fusion based code searcher. Our intuition (also the basic hypothesis of this study) is that existing techniques may complement each other because of the intrinsic differences in their working mechanisms. We have validated this hypothesis via an exploratory study. Based on that, we propose to fuse the results generated by different code search techniques so that the advantage of each standalone technique can be fully leveraged. Specifically, we treat each technique as a retrieval system and leverage well-known data fusion approaches to aggregate the results from different systems. We evaluate six existing code search techniques on two large-scale datasets, and exploit eight classic data fusion approaches to incorporate their results. Our experiments show that the best fusion approach is able to outperform the standalone techniques by 35%-550% and 65%-825% in terms of MRR (mean reciprocal rank) on the two datasets, respectively.

源语言英语
页(从-至)1852-1866
页数15
期刊IEEE Transactions on Software Engineering
50
7
DOI
出版状态已出版 - 2024
已对外发布

指纹

探究 'Fusing Code Searchers' 的科研主题。它们共同构成独一无二的指纹。

引用此