CodeMatcher: Searching Code Based on Sequential Semantics of Important Query Words
Thu 12 May 2022 22:00 - 22:05 at ICSE room 3-even hours - Reuse and Economics Chair(s): Rick Kazman
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 (IR)-based models for code search, but they fail to connect the semantic gap between query and code. An early successful deep learning (DL)-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 article, we proposed an IR-based model CodeMatcher that inherits the advantages of DeepCS (i.e., the capability of understanding the sequential semantics in important query words), 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 (a widely used accuracy measure for code search) 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 two existing online search engines (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.
Wed 11 MayDisplayed time zone: Eastern Time (US & Canada) change
04:00 - 05:00 | Reuse and AgilityJournal-First Papers / Technical Track / SEIP - Software Engineering in Practice at ICSE room 4-even hours Chair(s): Massimiliano Di Penta University of Sannio, Italy | ||
04:00 5mTalk | CodeMatcher: Searching Code Based on Sequential Semantics of Important Query Words Journal-First Papers Chao Liu Chongqing University, Xin Xia Huawei Software Engineering Application Technology Lab, David Lo Singapore Management University, Zhiwei Liu Baidu Inc., Ahmed E. Hassan Queen's University, Shanping Li Zhejiang University Link to publication DOI Pre-print Media Attached | ||
04:05 5mTalk | Präzi: From Package-based to Call-based Dependency Networks Journal-First Papers Joseph Hejderup Endor Labs & Delft University of Technology, Moritz Beller Facebook, USA, Konstantinos Triantafyllou University of Athens, Georgios Gousios Endor Labs & Delft University of Technology DOI Pre-print Media Attached | ||
04:10 5mTalk | The Agile Success Model: A Mixed-methods Study of a Large-scale Agile Transformation Journal-First Papers Daniel Russo Department of Computer Science, Aalborg University Link to publication DOI Pre-print | ||
04:15 5mTalk | Factors Affecting On-Time Delivery in Large-Scale Agile Software Development Journal-First Papers Elvan Kula Delft University of Technology, Eric Greuter ING, Arie van Deursen Delft University of Technology, Netherlands, Georgios Gousios Endor Labs & Delft University of Technology DOI Pre-print Media Attached | ||
04:20 5mTalk | Issues in the Adoption of the Scaled Agile Framework SEIP - Software Engineering in Practice Paolo Ciancarini University of Bologna / Innopolis University, Artem Kruglov Innopolis University, Witold Pedrycz University of Alberta, Dilshat Salikhov Innopolis University, Giancarlo Succi | ||
04:25 5mTalk | Cross-Domain Deep Code Search with Few-Shot Learning Technical Track Yitian Chai School of Software, Shanghai Jiao Tong University, Hongyu Zhang University of Newcastle, Beijun Shen School of Electronic Information and Electrical Engineering, Shanghai Jiao Tong University, Xiaodong Gu Shanghai Jiao Tong University, China DOI Pre-print Media Attached File Attached |
Thu 12 MayDisplayed time zone: Eastern Time (US & Canada) change
22:00 - 23:00 | Reuse and EconomicsNIER - New Ideas and Emerging Results / SEIP - Software Engineering in Practice / Technical Track / Journal-First Papers at ICSE room 3-even hours Chair(s): Rick Kazman University of Hawai‘i at Mānoa | ||
22:00 5mTalk | CodeMatcher: Searching Code Based on Sequential Semantics of Important Query Words Journal-First Papers Chao Liu Chongqing University, Xin Xia Huawei Software Engineering Application Technology Lab, David Lo Singapore Management University, Zhiwei Liu Baidu Inc., Ahmed E. Hassan Queen's University, Shanping Li Zhejiang University Link to publication DOI Pre-print Media Attached | ||
22:05 5mTalk | The best defense is a good defense: adapting negotiation methods for tackling pressure over software project estimates NIER - New Ideas and Emerging Results Patricia Matsubara UFAM & UFMS, Igor Steinmacher Northern Arizona University, Bruno Gadelha UFAM, Tayana Conte Universidade Federal do Amazonas Pre-print Media Attached | ||
22:10 5mTalk | The Unexplored Terrain of Compiler Warnings SEIP - Software Engineering in Practice Gunnar Kudrjavets University of Groningen, Aditya Kumar Snap, Inc., Nachiappan Nagappan Microsoft Research, Ayushi Rastogi University of Groningen, The Netherlands DOI Pre-print Media Attached | ||
22:15 5mTalk | SnR: Constraint-Based Type Inference for Incomplete Java Code Snippets Technical Track Yiwen Dong University of Waterloo, Tianxiao Gu Tiktok Inc., Yongqiang Tian University of Waterloo, Chengnian Sun University of Waterloo Pre-print Media Attached | ||
22:20 5mTalk | Cross-Domain Deep Code Search with Few-Shot Learning Technical Track Yitian Chai School of Software, Shanghai Jiao Tong University, Hongyu Zhang University of Newcastle, Beijun Shen School of Electronic Information and Electrical Engineering, Shanghai Jiao Tong University, Xiaodong Gu Shanghai Jiao Tong University, China DOI Pre-print Media Attached File Attached | ||
22:25 5mTalk | GitHub Sponsors: Exploring a New Way to Contribute to Open Source Technical Track Naomichi Shimada Nara Institute of Science and Technology, Tao Xiao Nara Institute of Science and Technology, Hideaki Hata Shinshu University, Christoph Treude University of Melbourne, Kenichi Matsumoto Nara Institute of Science and Technology DOI Pre-print Media Attached |