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. 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.
翻译:在源代码搜索中,共同的信息搜索战略涉及提供具有广泛含义的简短初始查询,然后用从随后搜索结果中收集的术语迭接地改进查询。这一战略要求程序设计员花时间阅读与其发展需要无关的搜索结果。相反,程序设计员在向其他人类寻求信息时,通常会通过询问和回答澄清问题来改进查询。澄清问题已经证明有利于一般用途搜索引擎,但在代码搜索中并未加以审查。我们提出了一个方法,利用从功能名称和评论中提取的信息来生成自然而然的澄清问题。我们的方法超过了合成研究中基于关键词的精细化方法,与人类研究中较短的搜索时间有关。