Please use this identifier to cite or link to this item: http://hdl.handle.net/10397/105607
PIRA download icon_1.1View/Download Full Text
Title: Semantics-based code search using input/output examples
Authors: Jiang, R
Chen, Z
Zhang, Z
Pei, Y 
Pan, M
Zhang, T
Issue Date: 2018
Source: 2018 IEEE 18th International Working Conference on Source Code Analysis and Manipulation (SCAM), 23-24 September 2018, Madrid, Spain, p. 92-102
Abstract: As the quality and quantity of open source code increase, semantics-based code search has become an emerging need for software developers to retrieve and reuse existing source code. We present an approach of semantics-based code search using input/output examples for the Java language. Our approach encodes Java methods in code repositories into path constraints via symbolic analysis and leverages SMT solvers to find the methods whose path constraints can satisfy the given input/output examples. Our approach extends the applicability of the semantics-based search technology to more general Java code compared with existing methods. To evaluate our approach, we encoded 1228 methods from GitHub and applied semantics-based code search on 35 queries extracted from Stack Overflow. Correct method code for 29 queries was obtained during the search and the average search time was just about 48 seconds.
Keywords: Code query
SMT solver
Symbolic analysis
Publisher: Institute of Electrical and Electronics Engineers
ISBN: 978-1-5386-8290-6 (Electronic)
978-1-5386-8291-3 (Print on Demand(PoD))
DOI: 10.1109/SCAM.2018.00018
Rights: © 2018 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
The following publication R. Jiang, Z. Chen, Z. Zhang, Y. Pei, M. Pan and T. Zhang, "[Research Paper] Semantics-Based Code Search Using Input/Output Examples," 2018 IEEE 18th International Working Conference on Source Code Analysis and Manipulation (SCAM), Madrid, Spain, 2018 is available at https://doi.org/10.1109/SCAM.2018.00018.
Appears in Collections:Conference Paper

Files in This Item:
File Description SizeFormat 
Pei_Semantics-Based_Code_Search.pdfPre-Published version983.96 kBAdobe PDFView/Open
Open Access Information
Status open access
File Version Final Accepted Manuscript
Access
View full-text via PolyU eLinks SFX Query
Show full item record

Page views

122
Last Week
4
Last month
Citations as of Nov 30, 2025

Downloads

123
Citations as of Nov 30, 2025

SCOPUSTM   
Citations

11
Citations as of Dec 19, 2025

WEB OF SCIENCETM
Citations

11
Citations as of Dec 18, 2025

Google ScholarTM

Check

Altmetric


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.