Skip to main content

EasySearch: Finding Relevant Functions Based on API Documentation

  • Conference paper
Book cover Knowledge and Systems Engineering

Part of the book series: Advances in Intelligent Systems and Computing ((AISC,volume 326))

  • 1781 Accesses

Abstract

This subject proposes a hybrid approach integrating keyword-based and semantic-based search to find relevant functions. Structure and contents of API documentation (API-Doc) are mined in our approach. The approach uses natural language processing technologies to expand queries, exploits the multi-level categorized structure of API-Doc to find candidates, and applies API-Doc’s short function descriptions to refine solutions. Our case study with eleven Java programmers demonstrates that our approach is better than the other approaches in precision, recall and F-measure criteria.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bajracharya, S., Ossher, J., Lopes, C.: Sourcerer: An infrastructure for large-scale collection and analysis of open-source code. Science of Computer Programming 79, 241–259 (2014)

    Article  Google Scholar 

  2. Bajracharya, S.K., Ossher, J., Lopes, C.V.: Leveraging usage similarity for effective retrieval of examples in code repositories. In: Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 157–166. ACM (2010)

    Google Scholar 

  3. Carpineto, C., Romano, G.: A survey of automatic query expansion in information retrieval. ACM Comput. Surv. 44(1), 1:1–1:50 (2012)

    Google Scholar 

  4. Chatterjee, S., Juvekar, S., Sen, K.: Sniff: A search engine for java using free-form queries. In: Chechik, M., Wirsing, M. (eds.) FASE 2009. LNCS, vol. 5503, pp. 385–400. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  5. Cubranic, D., Murphy, G.C., Singer, J., Booth, K.S.: Hipikat: A project memory for software development. IEEE Trans. Softw. Eng. 31(6), 446–465 (2005)

    Article  Google Scholar 

  6. Duck, B.: Ohloh Code Search (January 2014), http://code.ohloh.net

  7. Forman, G.: BNS feature scaling: an improved representation over tf-idf for svm text classification. In: Proceedings of the 17th ACM Conference on Information and Knowledge Management, pp. 263–270. ACM (2008)

    Google Scholar 

  8. Ge, X., Shepherd, D., Damevski, K., Murphy-Hill, E.R.: How the sando search tool recommends queries. CoRR, abs/1401.6931 (2014)

    Google Scholar 

  9. Grechanik, M., Fu, C., Xie, Q., McMillan, C., Poshyvanyk, D., Cumby, C.: A search engine for finding highly relevant applications. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, ICSE 2010, vol. 1, pp. 475–484. ACM, New York (2010)

    Google Scholar 

  10. Henninger, S.: Supporting the construction and evolution of component repositories. In: Proceedings of the 18th International Conference on Software Engineering, pp. 279–288. IEEE Computer Society (1996)

    Google Scholar 

  11. Holmes, R., Murphy, G.C.: Using structural context to recommend source code examples. In: Proceedings of the 27th International Conference on Software Engineering, ICSE 2005, pp. 117–125. ACM, New York (2005)

    Google Scholar 

  12. Kim, J., Lee, S., Hwang, S.-W., Kim, S.: Towards an intelligent code search engine. In: AAAI (2010)

    Google Scholar 

  13. Krugle. Krugle (January 2014), http://www.krugle.com

  14. Mandelin, D., Xu, L., Bodík, R., Kimelman, D.: Jungloid mining: Helping to navigate the api jungle. SIGPLAN Not. 40(6), 48–61 (2005)

    Article  Google Scholar 

  15. Manning, C., Klein, D.: The Stanford parser (January 2014), http://nlp.stanford.edu/software/lex-parser.shtml

  16. Princeton University. Wordnet (January 2014), http://wordnet.princeton.edu/

  17. The Eclipse Foundation. Eclipse (January 2014), http://www.eclipse.org/

  18. McMillan, C., Grechanik, M., Poshyvanyk, D., Xie, Q., Fu, C.: Portfolio: finding relevant functions and their usage. In: 2011 33rd International Conference on Software Engineering (ICSE), pp. 111–120. IEEE (2011)

    Google Scholar 

  19. Petri, M., Culpepper, S.J., Moffat, A.: Exploring the magic of wand. In: Proceedings of the 18th Australasian Document Computing Symposium, pp. 58–65. ACM (2013)

    Google Scholar 

  20. Reiss, S.P.: Semantics-based code search. In: IEEE 31st International Conference on Software Engineering, ICSE 2009, pp. 243–253. IEEE (2009)

    Google Scholar 

  21. Sahavechaphan, N., Claypool, K.: Xsnippet: mining for sample code. ACM Sigplan Notices 41(10), 413–430 (2006)

    Article  Google Scholar 

  22. Singer, J., Lethbridge, T., Vinson, N., Anquetil, N.: An examination of software engineering work practices. In: CASCON First Decade High Impact Papers, CASCON 2010, Riverton, NJ, USA, pp. 174–188. IBM Corp. (2010)

    Google Scholar 

  23. Stylos, J., Myers, B.A.: Mica: A web-search tool for finding api components and examples. In: IEEE Symposium on Visual Languages and Human-Centric Computing, VL/HCC 2006, pp. 195–202. IEEE (2006)

    Google Scholar 

  24. Thummalapenta, S., Xie, T.: Parseweb: a programmer assistant for reusing open source code on the web. In: Proceedings of the Twenty-Second IEEE/ACM International Conference on Automated Software Engineering, pp. 204–213. ACM (2007)

    Google Scholar 

  25. Timonen, M., et al.: Term weighting in short documents for document categorization, keyword extraction and query expansion (2013)

    Google Scholar 

  26. Tran, D., Nguyen, H.: API specification-based function search engine using natural language query. In: 2013 International Conference on Computing, Management and Telecommunications (ComManTel), pp. 140–145. IEEE (2013)

    Google Scholar 

  27. Vaughan, L.: New measurements for search engine evaluation proposed and tested. Information Processing & Management 40(4), 677–691 (2004)

    Article  MATH  Google Scholar 

  28. Wu, Z., Palmer, M.: Verbs semantics and lexical selection. In: Proceedings of the 32nd Annual Meeting on Association for Computational Linguistics, pp. 133–138. Association for Computational Linguistics (1994)

    Google Scholar 

  29. Ye, Y., Fischer, G.: Supporting reuse by delivering task-relevant and personalized information. In: Proceedings of the 24th International Conference on Software Engineering, pp. 513–523. ACM (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Tran, D.H., Nguyen, H.P., Le, D.H. (2015). EasySearch: Finding Relevant Functions Based on API Documentation. In: Nguyen, VH., Le, AC., Huynh, VN. (eds) Knowledge and Systems Engineering. Advances in Intelligent Systems and Computing, vol 326. Springer, Cham. https://doi.org/10.1007/978-3-319-11680-8_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-11680-8_12

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-11679-2

  • Online ISBN: 978-3-319-11680-8

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics