Please use this identifier to cite or link to this item:
http://hdl.handle.net/10397/94337
Title: | Enhancing example-based code search with functional semantics | Authors: | Chen, Z Jiang, R Zhang, Z Pei, Y Pan, M Zhang, T Li, X |
Issue Date: | Jul-2020 | Source: | Journal of systems and software, July 2020, v. 165, 110568 | Abstract: | As the quality and quantity of open source code increase, effective and efficient search for code implementing certain semantics, or semantics-based code search, has become an emerging need for software developers to retrieve and reuse existing source code. Previous techniques in semantics-based code search encode the semantics of loop-free Java code snippets as constraints and utilize an SMT solver to find encoded snippets that match an input/output (IO) query. We present in this article the Quebio approach to semantics-based search for Java methods. Quebio advances the state-of-the-art by supporting important language features like invocation to library APIs and enabling the search to handle more data types like array/List, Set, and Map. Compared with existing approaches, Quebio also integrates a customized keyword-based search that uses as the input a textual, behavioral summary of the desired methods to quickly prune the methods to be checked against the IO examples. To evaluate the effectiveness and efficiency of Quebio, we constructed a repository of 14,792 methods from 723 open source Java projects hosted on GitHub and applied the approach to resolve 47 queries extracted from StackOverflow. Quebio was able to find methods correctly implementing the specified IO behaviors for 43 of the queries, significantly outperforming the existing semantics-based code search techniques. The average search time with Quebio was 213.2 seconds for each query. | Keywords: | Semantics-based code search SMT solver Symbolic analysis |
Publisher: | Elsevier | Journal: | Journal of systems and software | ISSN: | 0164-1212 | DOI: | 10.1016/j.jss.2020.110568 | Rights: | © 2020 Elsevier Inc. All rights reserved. © 2020. This manuscript version is made available under the CC-BY-NC-ND 4.0 license https://creativecommons.org/licenses/by-nc-nd/4.0/ The following publication Chen, Z., Jiang, R., Zhang, Z., Pei, Y., Pan, M., Zhang, T., & Li, X. (2020). Enhancing example-based code search with functional semantics. Journal of Systems and Software, 165, 110568 is available at https://doi.org/10.1016/j.jss.2020.110568 |
Appears in Collections: | Journal/Magazine Article |
Files in This Item:
File | Description | Size | Format | |
---|---|---|---|---|
Chen_Enhancing_Example-based_Code.pdf | Pre-Published version | 1.35 MB | Adobe PDF | View/Open |
Page views
48
Last Week
1
1
Last month
Citations as of May 5, 2024
Downloads
66
Citations as of May 5, 2024
SCOPUSTM
Citations
5
Citations as of May 3, 2024
WEB OF SCIENCETM
Citations
5
Citations as of May 2, 2024
Google ScholarTM
Check
Altmetric
Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.