Abstract

Searching source code is a common activity in many software engineering tasks. To some extent, the quality of the query determines the accuracy of query results. In practice, it is difficult for developers to provide a high-quality query, especially for the novice who just takes over the software project with a short time. What is more, existing code search techniques using queries expressed in natural language offer little support to help developers determine whether the search results are relevant or not. When a query preforms poorly, it has to be reformulated. In this paper, we present a novel approach, INQRES, to interactively reformulate the search query considering the relations between words in the source code to optimize the query quality. INQRES analyzes the keyword relations in the source code and builds AND and OR relations in an interactive way for developer to select suitable words for query reformulation. To evaluate the effectiveness of INQRES, we perform an empirical study on the jEdit project. Empirical results show that INQRES can effectively reformulate the search query, and the quality of the reformulated query of INQRES is better than that of the state-of-art technique, i.e., QReformu.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call