Skip to main content
Article
Query Expansion via Wordnet for Effective Code Search
22nd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER)
  • Meili LU
  • Xiaobing SUN
  • Shaowei WANG
  • David LO, Singapore Management University
  • Yucong DUAN
Publication Type
Conference Proceeding Article
Publication Date
3-2015
Abstract

Source code search plays an important role in software maintenance. The effectiveness of source code search not only relies on the search technique, but also on the quality of the query. In practice, software systems are large, thus it is difficult for a developer to format an accurate query to express what really in her/his mind, especially when the maintainer and the original developer are not the same person. When a query performs poorly, it has to be reformulated. But the words used in a query may be different from those that have similar semantics in the source code, i.e., the synonyms, which will affect the accuracy of code search results. To address this issue, we propose an approach that extends a query with synonyms generated from WordNet. Our approach extracts natural language phrases from source code identifiers, matches expanded queries with these phrases, and sorts the search results. It allows developers to explore word usage in a piece of software, helps them quickly identify relevant program elements for investigation or quickly recognize alternative words for query reformulation. Our initial empirical study on search tasks performed on the JavaScript/ECMAScript interpreter and compiler, Rhino, shows that the synonyms used to expand the queries help recommend good alternative queries. Our approach also improves the precision and recall of Conquer, a state-of-the-art query expansion/reformulation technique, by 5% and 8% respectively.

Identifier
10.1109/SANER.2015.7081874
City or Country
Montreal, Canada
Additional URL
http://dx.doi.org/10.1109/SANER.2015.7081874
Citation Information
Meili LU, Xiaobing SUN, Shaowei WANG, David LO, et al.. "Query Expansion via Wordnet for Effective Code Search" 22nd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER) (2015) p. 545 - 549
Available at: http://works.bepress.com/david_lo/313/