IECS: Intent-enforced code search via extended Boolean model
Y Yang, Q Huang - Journal of Intelligent & Fuzzy Systems, 2017 - content.iospress.com
Y Yang, Q Huang
Journal of Intelligent & Fuzzy Systems, 2017•content.iospress.comMost code search tools seem to yield semantically correct matches, but the search results
rarely meet the demands of users perfectly. These results still have to be modified manually.
One major reason is that existing tools lack the ability of intent predicting to guess what else
a user might do after obtaining the results. In this paper, we propose an intent-enforced code
search approach (IECS) that can predict the potential intents for a query before performing
code retrieval. Then it expands the query with the intents and applies the Extended Boolean …
rarely meet the demands of users perfectly. These results still have to be modified manually.
One major reason is that existing tools lack the ability of intent predicting to guess what else
a user might do after obtaining the results. In this paper, we propose an intent-enforced code
search approach (IECS) that can predict the potential intents for a query before performing
code retrieval. Then it expands the query with the intents and applies the Extended Boolean …
Abstract
Most code search tools seem to yield semantically correct matches, but the search results rarely meet the demands of users perfectly. These results still have to be modified manually. One major reason is that existing tools lack the ability of intent predicting to guess what else a user might do after obtaining the results. In this paper, we propose an intent-enforced code search approach (IECS) that can predict the potential intents for a query before performing code retrieval. Then it expands the query with the intents and applies the Extended Boolean Model to retrieve the relevant results without any subsequent modification. We implement SnippetGen, a code search tool performing IECS. Compared with CodeHow and Google Code Search (CS), SnippetGen outperforms them by 28.5% with a precision score of 0.846 (ie, 84.6% of the first returned results are relevant results) when we utilize these tools to perform 70 queries on a codebase consisting of 27K projects downloaded from GitHub. We also perform a controlled experiment by asking 20 participants to complete 3 tasks with SnippetGen and CodeHow. The results confirm the effectiveness of SnippetGen in programming practice.
content.iospress.com