Generating Clarifying Questions for Query Refinement in Source Code Search

Zachary Eberhart, Collin McMillan
1/24/2022
cs.SEcs.HCcs.IR

Official code: Zeberhart/ZaCQ (1 star, Python, last commit 2021-12-04).

Abstract

In source code search, a common information-seeking strategy involves providing a short initial query with a broad meaning, and then iteratively refining the query using terms gleaned from the results of subsequent searches. This strategy requires programmers to spend time reading search results that are irrelevant to their development needs.

Show full abstract

In contrast, when programmers seek information from other humans, they typically refine queries by asking and answering clarifying questions. Clarifying questions have been shown to benefit general-purpose search engines, but have not been examined in the context of code search. We present a method for generating natural-sounding clarifying questions using information extracted from function names and comments. Our method outperformed a keyword-based method for single-turn refinement in synthetic studies, and was associated with shorter search duration in human studies.

View on arXivView PDF

Code Implementations(1)

Zeberhart/ZaCQOfficial100%

Clarifying Questions for Query Refinement in Source Code Search

10Python, JavaScriptOct 20, 20214 years ago

Similar Papers

Cite this paper

@article{eberhart2022generating,
  title  = {Generating Clarifying Questions for Query Refinement in Source Code Search},
  author = {Zachary Eberhart and Collin McMillan},
  year   = {2022},
  eprint = {2201.09974},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.09974}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.09974.svg)](https://codeofpaper.com/paper/2201.09974)

Discussion