CodeHow: Effective code search based on api understanding and extended boolean model

Fei Lv, Hongyu Zhang, Jian Guang Lou, Shaowei Wang, Dongmei Zhang, Jianjun Zhao

研究成果: 著書/レポートタイプへの貢献会議での発言

58 引用 (Scopus)

抜粋

Over the years of software development, a vast amount of source code has been accumulated. Many code search tools were proposed to help programmers reuse previously-written code by performing free-text queries over a large-scale codebase. Our experience shows that the accuracy of these code search tools are often unsatisfactory. One major reason is that existing tools lack of query understanding ability. In this paper, we propose CodeHow, a code search technique that can recognize potential APIs a user query refers to. Having understood the potentially relevant APIs, CodeHow expands the query with the APIs and performs code retrieval by applying the Extended Boolean model, which considers the impact of both text similarity and potential APIs on code search. We deploy the backend of CodeHow as a Microsoft Azure service and implement the front-end as a Visual Studio extension. We evaluate CodeHow on a large-scale codebase consisting of 26K C# projects downloaded from GitHub. The experimental results show that when the top 1 results are inspected, CodeHow achieves a precision score of 0.794 (i.e., 79.4% of the first returned results are relevant code snippets). The results also show that CodeHow outperforms conventional code search tools. Furthermore, we perform a controlled experiment and a survey of Microsoft developers. The results confirm the usefulness and effectiveness of CodeHow in programming practices.

元の言語英語
ホスト出版物のタイトルProceedings - 2015 30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015
出版者Institute of Electrical and Electronics Engineers Inc.
ページ260-270
ページ数11
ISBN(電子版)9781509000241
DOI
出版物ステータス出版済み - 1 4 2016
外部発表Yes
イベント30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015 - Lincoln, 米国
継続期間: 11 9 201511 13 2015

その他

その他30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015
米国
Lincoln
期間11/9/1511/13/15

    フィンガープリント

All Science Journal Classification (ASJC) codes

  • Software

これを引用

Lv, F., Zhang, H., Lou, J. G., Wang, S., Zhang, D., & Zhao, J. (2016). CodeHow: Effective code search based on api understanding and extended boolean model. : Proceedings - 2015 30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015 (pp. 260-270). [7372014] Institute of Electrical and Electronics Engineers Inc.. https://doi.org/10.1109/ASE.2015.42