{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,2]],"date-time":"2026-05-02T06:41:12Z","timestamp":1777704072516,"version":"3.51.4"},"reference-count":26,"publisher":"SAGE Publications","issue":"4","license":[{"start":{"date-parts":[[2017,7,8]],"date-time":"2017-07-08T00:00:00Z","timestamp":1499472000000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/journals.sagepub.com\/page\/policies\/text-and-data-mining-license"}],"content-domain":{"domain":["journals.sagepub.com"],"crossmark-restriction":true},"short-container-title":["Journal of Intelligent &amp; Fuzzy Systems"],"published-print":{"date-parts":[[2017,10]]},"abstract":"<jats:p>Most code search tools seem to yield semantically correct matches, but the search results rarely meet the demands of users perfectly. These results still have to be modified manually. One major reason is that existing tools lack the ability of intent predicting to guess what else a user might do after obtaining the results. In this paper, we propose an intent-enforced code search approach (IECS) that can predict the potential intents for a query before performing code retrieval. Then it expands the query with the intents and applies the Extended Boolean Model to retrieve the relevant results without any subsequent modification. We implement SnippetGen, a code search tool performing IECS. Compared with CodeHow and Google Code Search (CS), SnippetGen outperforms them by 28.5% with a precision score of 0.846 (i.e., 84.6% of the first returned results are relevant results) when we utilize these tools to perform 70 queries on a codebase consisting of 27K projects downloaded from GitHub. We also perform a controlled experiment by asking 20 participants to complete 3 tasks with SnippetGen and CodeHow. The results confirm the effectiveness of SnippetGen in programming practice.<\/jats:p>","DOI":"10.3233\/jifs-161994","type":"journal-article","created":{"date-parts":[[2017,7,11]],"date-time":"2017-07-11T11:22:07Z","timestamp":1499772127000},"page":"2565-2576","update-policy":"https:\/\/doi.org\/10.1177\/sage-journals-update-policy","source":"Crossref","is-referenced-by-count":9,"title":["IECS: Intent-Enforced Code Search via Extended Boolean Model"],"prefix":"10.1177","volume":"33","author":[{"given":"Yangrui","family":"Yang","sequence":"first","affiliation":[{"name":"College of Information Engineering North China, University of Water Resources and Electric Power, Zhengzhou, China"}]},{"given":"Qing","family":"Huang","sequence":"additional","affiliation":[{"name":"Computer School of Wuhan University, Wuhan, China"}]}],"member":"179","published-online":{"date-parts":[[2017,7,8]]},"reference":[{"key":"e_1_3_3_2_2","first-page":"1","article-title":"Learning to rank code examples for code search engines","author":"Niu H.","year":"2016","unstructured":"NiuH., KeivanlooI. and ZouY., Learning to rank code examples for code search engines, Empirical Software Engineering (2016), 1\u201333.","journal-title":"Empirical Software Engineering"},{"key":"e_1_3_3_3_2","first-page":"260","article-title":"CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E)","author":"Lv F.","year":"2015","unstructured":"LvF., , et al., CodeHow: Effective Code Search Based on API Understanding and Extended Boolean Model (E), IEEE\/ACM International Conference on Automated Software Engineering2015, pp. 260\u2013270.","journal-title":"IEEE\/ACM International Conference on Automated Software Engineering"},{"key":"e_1_3_3_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/2661229.2661239"},{"key":"e_1_3_3_5_2","first-page":"653","article-title":"CodeHint: Dynamic and Interactive Synthesis of Methods","author":"Galenson J.","year":"2014","unstructured":"GalensonJ., , et al., CodeHint: Dynamic and Interactive Synthesis of Methods, International Conference on Software Engineering2014, pp. 653\u2013663.","journal-title":"International Conference on Software Engineering"},{"key":"e_1_3_3_6_2","first-page":"36","article-title":"Post-Analysis of Keyword-Based Search Results Using Entity Mining, Linked Data, and Link Analysis at Query Time","author":"Fafalios P.","year":"2014","unstructured":"FafaliosP. and TzitzikasY., Post-Analysis of Keyword-Based Search Results Using Entity Mining, Linked Data, and Link Analysis at Query Time, IEEE International Conference on Semantic Computing2014, pp. 36\u201343.","journal-title":"IEEE International Conference on Semantic Computing"},{"key":"e_1_3_3_7_2","doi-asserted-by":"publisher","DOI":"10.1145\/2642937.2642947"},{"key":"e_1_3_3_8_2","doi-asserted-by":"publisher","DOI":"10.1145\/2522920.2522930"},{"key":"e_1_3_3_9_2","first-page":"586","article-title":"Learning effective query transformations for enhanced requirements trace retrieval","author":"Dietrich T.","year":"2013","unstructured":"DietrichT., Cleland-HuangJ. and ShinY., Learning effective query transformations for enhanced requirements trace retrieval, IEEE\/acm International Conference on Automated Software Engineering2013, pp. 586\u2013591.","journal-title":"IEEE\/acm International Conference on Automated Software Engineering"},{"key":"e_1_3_3_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/2071389.2071390"},{"key":"e_1_3_3_11_2","first-page":"111","article-title":"Portfolio: Finding Relevant Functions and Their Usage","author":"Mcmillan C.","year":"2011","unstructured":"McmillanC., et al., Portfolio: Finding Relevant Functions and Their Usage, International Conference on Software Engineering2011, pp. 111\u2013120.","journal-title":"International Conference on Software Engineering"},{"key":"e_1_3_3_12_2","article-title":"Portfolio: Finding relevant functions and their usage","author":"McMillan C.","year":"2011","unstructured":"McMillanC., GrechanikM., PoshyvanykD., XieQ. and FuC., Portfolio: Finding relevant functions and their usage, In ICSE (2011).","journal-title":"In ICSE"},{"key":"e_1_3_3_13_2","unstructured":"Baeza-YatesR. and Ribeiro-NetoB. Modern Information Retrieval: The Concepts and Technology behind Search Addison-Wesley 2011."},{"key":"e_1_3_3_14_2","first-page":"482","article-title":"Program understanding and the concept assignment problem","author":"Biggerstaff T.J.","year":"2010","unstructured":"BiggerstaffT.J., MitbanderB.G. and WebsterD.E., Program understanding and the concept assignment problem, Communications of the Acm (2010), 482\u2013498.","journal-title":"Communications of the Acm"},{"key":"e_1_3_3_15_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2007.70731"},{"key":"e_1_3_3_16_2","first-page":"195","article-title":"A Web-Search Tool for Finding API Components and Examples","author":"Stylos B.J.","year":"2010","unstructured":"StylosB.J. and MyersB.A., A Web-Search Tool for Finding API Components and Examples, Proceedings of the Visual Languages and Human-Centric Computing2010, pp. 195\u2013202.","journal-title":"Proceedings of the Visual Languages and Human-Centric Computing"},{"key":"e_1_3_3_17_2","volume-title":"Proc IEEE\/ACM Intl Conf Automated Software Eng (ASE 07)","author":"Thummalapenta B.S.","year":"2010","unstructured":"ThummalapentaB.S. and XieT., PARSEWeb: A Programming Assistant for Reusing Open Source Code on the Web, Proc IEEE\/ACM Intl Conf Automated Software Eng (ASE 07), ACM Press, 2010."},{"key":"e_1_3_3_18_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10618-008-0118-x"},{"key":"e_1_3_3_19_2","first-page":"123","article-title":"Identifying Word Relations in Software: A Comparative Study of Semantic Similarity Tools","author":"Sridhara G.","year":"2008","unstructured":"SridharaG., et al., Identifying Word Relations in Software: A Comparative Study of Semantic Similarity Tools, The IEEE International Conference on Program Comprehension2008, pp. 123\u2013132.","journal-title":"The IEEE International Conference on Program Comprehension"},{"key":"e_1_3_3_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/1294211.1294216"},{"key":"e_1_3_3_21_2","doi-asserted-by":"crossref","unstructured":"VanderleiT.A. et al. A cooperative classification mechanism for search and retrieval software components Mccarthy 2007 pp. 866\u2013871.","DOI":"10.1145\/1244002.1244192"},{"key":"e_1_3_3_22_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.ipl.2006.02.015"},{"key":"e_1_3_3_23_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2006.3"},{"key":"e_1_3_3_24_2","doi-asserted-by":"publisher","DOI":"10.1145\/167049.167077"},{"key":"e_1_3_3_25_2","doi-asserted-by":"publisher","DOI":"10.1109\/32.83915"},{"key":"e_1_3_3_26_2","doi-asserted-by":"crossref","unstructured":"SaltonG. FoxE.A. and WuH. Extended boolean information retrieval Commun ACM vol. 26 (1983) pp. 1022\u20131036.","DOI":"10.1145\/182.358466"},{"key":"e_1_3_3_27_2","doi-asserted-by":"publisher","DOI":"10.1145\/359581.359603"}],"container-title":["Journal of Intelligent &amp; Fuzzy Systems"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/journals.sagepub.com\/doi\/pdf\/10.3233\/JIFS-161994","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/journals.sagepub.com\/doi\/full-xml\/10.3233\/JIFS-161994","content-type":"application\/xml","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/journals.sagepub.com\/doi\/pdf\/10.3233\/JIFS-161994","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,4,29]],"date-time":"2026-04-29T09:40:21Z","timestamp":1777455621000},"score":1,"resource":{"primary":{"URL":"https:\/\/journals.sagepub.com\/doi\/10.3233\/JIFS-161994"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,7,8]]},"references-count":26,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2017,10]]}},"alternative-id":["10.3233\/JIFS-161994"],"URL":"https:\/\/doi.org\/10.3233\/jifs-161994","relation":{},"ISSN":["1064-1246","1875-8967"],"issn-type":[{"value":"1064-1246","type":"print"},{"value":"1875-8967","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,7,8]]}}}