paper-with-me

홈 › Papers

CodeMatcher: Searching Code Based on Sequential Semantics of Important Query Words

2020-05-29 · Chao Liu, Xin Xia, David Lo, Zhiwei Liu, Ahmed E. Hassan, Shanping Li

To accelerate software development, developers frequently search and reuse existing code snippets from a large-scale codebase, e.g., GitHub. Over the years, researchers proposed many information retrieval based models for code search, but they fail to connect the semantic gap between query and code. An early successful deep learning based model DeepCS solved this issue by learning the relationship between pairs of code methods and corresponding natural language descriptions. Two major advantages of DeepCS are the capability of understanding irrelevant/noisy keywords and capturing sequential relationships between words in query and code. In this paper, we proposed an IR-based model CodeMatcher that inherits the advantages of DeepCS, while it can leverage the indexing technique in the IR-based model to accelerate the search response time substantially. CodeMatcher first collects metadata for query words to identify irrelevant/noisy ones, then iteratively performs fuzzy search with important query words on the codebase that is indexed by the Elasticsearch tool, and finally reranks a set of returned candidate code according to how the tokens in the candidate code snippet sequentially matched the important words in a query. We verified its effectiveness on a large-scale codebase with ~41k repositories. Experimental results showed that CodeMatcher achieves an MRR of 0.60, outperforming DeepCS, CodeHow, and UNIF by 82%, 62%, and 46% respectively. Our proposed model is over 1.2k times faster than DeepCS. Moreover, CodeMatcher outperforms GitHub and Google search by 46% and 33% respectively in terms of MRR. We also observed that: fusing the advantages of IR-based and DL-based models is promising; improving the quality of method naming helps code search, since method name plays an important role in connecting query and code.

📄 PDF Abstract BibTeX arXiv:2005.14373

Code (0)

등록된 구현이 없습니다.

Tasks

Code SearchInformation RetrievalRetrieval

Similar Papers 제목 키워드 기반

A survey on the semantics of sequential patterns with negation

2023-09-20 · Thomas Guyet

A sequential pattern with negation, or negative sequential pattern, takes the form of a sequential pattern for which the negation symbol may be used in front of some of the pattern's itemsets. Intuitively, such a pattern…

NegationSurvey

Fragment-based Sequential Translation for Molecular Optimization

2021-10-26 · NeurIPS Workshop AI4Scien 2021 12 · Benson Chen, Xiang Fu, Regina Barzilay, Tommi Jaakkola

Searching for novel molecular compounds with desired properties is an important problem in drug discovery. Many existing frameworks generate molecules one atom at a time. We instead propose a flexible editing paradigm th…

Drug DiscoveryReinforcement Learning (RL)Translation

Clone-Seeker: Effective Code Clone Search Using Annotations

2021-06-06 · Muhammad Hammad, Önder Babur, Hamid Abdul Basit, Mark van den Brand

Source code search plays an important role in software development, e.g. for exploratory development or opportunistic reuse of existing code from a code base. Often, exploration of different implementations with the same…

Code SearchNatural Language Queries

Monocular 3D Object Reconstruction with GAN Inversion

2022-07-20 · Junzhe Zhang, Daxuan Ren, Zhongang Cai, Chai Kiat Yeo 외

Recovering a textured 3D mesh from a monocular image is highly challenging, particularly for in-the-wild objects that lack 3D ground truths. In this work, we present MeshInversion, a novel framework to improve the recons…

3D Object ReconstructionObjectObject Reconstruction

Searching by Code: a New SearchBySnippet Dataset and SnippeR Retrieval Model for Searching by Code Snippets

2023-05-19 · Ivan Sedykh, Dmitry Abulkhanov, Nikita Sorokin, Sergey Nikolenko 외

Code search is an important and well-studied task, but it usually means searching for code by a text query. We argue that using a code snippet (and possibly an error traceback) as a query while looking for bugfixing inst…

Code SearchRetrieval