CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)

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 t...

Full description

Saved in:
Bibliographic Details
Main Authors: LV, Fei, LOU, Jian-guang, WANG, Shaowei, ZHANG, Dongmei, ZHAO, Jainjun
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2015
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/4436
https://ink.library.smu.edu.sg/context/sis_research/article/5439/viewcontent/ase2015_CodeHow_av.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-5439
record_format dspace
spelling sg-smu-ink.sis_research-54392020-07-15T09:14:16Z CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E) LV, Fei LOU, Jian-guang WANG, Shaowei ZHANG, Dongmei ZHAO, Jainjun 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. 2015-11-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/4436 info:doi/10.1109/ASE.2015.42 https://ink.library.smu.edu.sg/context/sis_research/article/5439/viewcontent/ase2015_CodeHow_av.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University API understanding Code search Extended Boolean model Software reuse Computer Sciences Programming Languages and Compilers Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic API understanding
Code search
Extended Boolean model
Software reuse
Computer Sciences
Programming Languages and Compilers
Software Engineering
spellingShingle API understanding
Code search
Extended Boolean model
Software reuse
Computer Sciences
Programming Languages and Compilers
Software Engineering
LV, Fei
LOU, Jian-guang
WANG, Shaowei
ZHANG, Dongmei
ZHAO, Jainjun
CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)
description 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.
format text
author LV, Fei
LOU, Jian-guang
WANG, Shaowei
ZHANG, Dongmei
ZHAO, Jainjun
author_facet LV, Fei
LOU, Jian-guang
WANG, Shaowei
ZHANG, Dongmei
ZHAO, Jainjun
author_sort LV, Fei
title CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)
title_short CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)
title_full CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)
title_fullStr CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)
title_full_unstemmed CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)
title_sort codehow: effective code search based on api understanding and extended boolean model (e)
publisher Institutional Knowledge at Singapore Management University
publishDate 2015
url https://ink.library.smu.edu.sg/sis_research/4436
https://ink.library.smu.edu.sg/context/sis_research/article/5439/viewcontent/ase2015_CodeHow_av.pdf
_version_ 1770574795400806400