Refine Software Q&A Document Search Results Based on Code Pattern

Chenyan HUA,Yanzhen ZOU,Zixiao ZHU,Bing XIE
DOI: https://doi.org/10.3778/j.issn.1673-9418.1609028
2017-01-01
Abstract:Developers often need to search related software Q&A documents in Q&A website. In the search results, the Q&A documents which contain good code snippets (usage examples) are preferred. However, how to metric those code snippets in document is still a big challenge. To address this issue, this paper proposes an approach for refining software Q&A document search results based on code pattern. Firstly, code snippets are extracted from each document in the search results. Then, the common code patterns are mined and used to measure the quality of those code snippets. Finally, the documents with high quality are recommended and ranked at the top of the search results. In the experiments, this paper carries out some evaluations with 10 real problems that software developers meet in practice. Compared to the search results of StackOverflow, the proposed approach has an increment of 40% at NDCG@5.
What problem does this paper attempt to address?