Modern software engineers frequently resort to code search practices to support software maintenance and evolution tasks, in particular code reuse. An issue that affects the effectiveness of code search is the vocabulary mismatch problem: while searching for a particular function, the user has to guess the exact words chosen by original developers to name code entities. This monograph presents a master's project proposal to investigate an automatic query expansion (AQE) approach that uses word relations to increase the chances of finding relevant code. The basic idea is automatically add synonyms and antonyms of each word to the query, to improve the query's precision and recall. The approach is applied on top of Test-Driven Code Search (TDCS), a promising code retrieval technique that uses test cases as inputs to formulate the search query. Since TDCS also relies on keywords, the vocabulary mismatch problem is also relevant here. The approach will be implemented as an extension to CodeGenie, an Eclipse plug-in that supports TDCS. As an evaluation of the AQE approach, we plan to conduct experiments with undergraduate and graduate students, as well as practitioners. In the future, it will be possible to integrate the developed technique to software development methodologies, enabling quality improvement and cost reduction.
News published in Agência FAPESP Newsletter about the scholarship: