Interactive Query Reformulation for Source-Code Search With Word Relations

Searching source code is a common activity in many software engineering tasks. To some extent, the quality of the query determines the accuracy of query results. In practice, it is difficult for developers to provide a high-quality query, especially for the novice who just takes over the software pr...

Full description

Bibliographic Details
Main Authors: Jinting Lu, Ying Wei, Xiaobing Sun, Bin Li, Wanzhi Wen, Cheng Zhou
Format: Article
Language:English
Published: IEEE 2018-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/8552658/
_version_ 1818331730250039296
author Jinting Lu
Ying Wei
Xiaobing Sun
Bin Li
Wanzhi Wen
Cheng Zhou
author_facet Jinting Lu
Ying Wei
Xiaobing Sun
Bin Li
Wanzhi Wen
Cheng Zhou
author_sort Jinting Lu
collection DOAJ
description Searching source code is a common activity in many software engineering tasks. To some extent, the quality of the query determines the accuracy of query results. In practice, it is difficult for developers to provide a high-quality query, especially for the novice who just takes over the software project with a short time. What is more, existing code search techniques using queries expressed in natural language offer little support to help developers determine whether the search results are relevant or not. When a query preforms poorly, it has to be reformulated. In this paper, we present a novel approach, INQRES, to interactively reformulate the search query considering the relations between words in the source code to optimize the query quality. INQRES analyzes the keyword relations in the source code and builds AND and OR relations in an interactive way for developer to select suitable words for query reformulation. To evaluate the effectiveness of INQRES, we perform an empirical study on the jEdit project. Empirical results show that INQRES can effectively reformulate the search query, and the quality of the reformulated query of INQRES is better than that of the state-of-art technique, i.e., QReformu.
first_indexed 2024-12-13T13:24:29Z
format Article
id doaj.art-afe031dd8c7146c7b9ef1925dbf569aa
institution Directory Open Access Journal
issn 2169-3536
language English
last_indexed 2024-12-13T13:24:29Z
publishDate 2018-01-01
publisher IEEE
record_format Article
series IEEE Access
spelling doaj.art-afe031dd8c7146c7b9ef1925dbf569aa2022-12-21T23:44:20ZengIEEEIEEE Access2169-35362018-01-016756607566810.1109/ACCESS.2018.28839638552658Interactive Query Reformulation for Source-Code Search With Word RelationsJinting Lu0Ying Wei1Xiaobing Sun2https://orcid.org/0000-0001-5165-5080Bin Li3Wanzhi Wen4Cheng Zhou5School of Information Engineering, Yangzhou University, Yangzhou, ChinaSchool of Information Engineering, Yangzhou University, Yangzhou, ChinaSchool of Information Engineering, Yangzhou University, Yangzhou, ChinaSchool of Information Engineering, Yangzhou University, Yangzhou, ChinaSchool of Computer Science and Technology, Nantong University, Nantong, ChinaSchool of Information Engineering, Yangzhou University, Yangzhou, ChinaSearching source code is a common activity in many software engineering tasks. To some extent, the quality of the query determines the accuracy of query results. In practice, it is difficult for developers to provide a high-quality query, especially for the novice who just takes over the software project with a short time. What is more, existing code search techniques using queries expressed in natural language offer little support to help developers determine whether the search results are relevant or not. When a query preforms poorly, it has to be reformulated. In this paper, we present a novel approach, INQRES, to interactively reformulate the search query considering the relations between words in the source code to optimize the query quality. INQRES analyzes the keyword relations in the source code and builds AND and OR relations in an interactive way for developer to select suitable words for query reformulation. To evaluate the effectiveness of INQRES, we perform an empirical study on the jEdit project. Empirical results show that INQRES can effectively reformulate the search query, and the quality of the reformulated query of INQRES is better than that of the state-of-art technique, i.e., QReformu.https://ieeexplore.ieee.org/document/8552658/Source-code Searchquery reformulationword relationsinteractive search
spellingShingle Jinting Lu
Ying Wei
Xiaobing Sun
Bin Li
Wanzhi Wen
Cheng Zhou
Interactive Query Reformulation for Source-Code Search With Word Relations
IEEE Access
Source-code Search
query reformulation
word relations
interactive search
title Interactive Query Reformulation for Source-Code Search With Word Relations
title_full Interactive Query Reformulation for Source-Code Search With Word Relations
title_fullStr Interactive Query Reformulation for Source-Code Search With Word Relations
title_full_unstemmed Interactive Query Reformulation for Source-Code Search With Word Relations
title_short Interactive Query Reformulation for Source-Code Search With Word Relations
title_sort interactive query reformulation for source code search with word relations
topic Source-code Search
query reformulation
word relations
interactive search
url https://ieeexplore.ieee.org/document/8552658/
work_keys_str_mv AT jintinglu interactivequeryreformulationforsourcecodesearchwithwordrelations
AT yingwei interactivequeryreformulationforsourcecodesearchwithwordrelations
AT xiaobingsun interactivequeryreformulationforsourcecodesearchwithwordrelations
AT binli interactivequeryreformulationforsourcecodesearchwithwordrelations
AT wanzhiwen interactivequeryreformulationforsourcecodesearchwithwordrelations
AT chengzhou interactivequeryreformulationforsourcecodesearchwithwordrelations