skip to main content
10.1145/2393596.2393606acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

Searching connected API subgraph via text phrases

Published:11 November 2012Publication History

ABSTRACT

Reusing APIs of existing libraries is a common practice during software development, but searching suitable APIs and their usages can be time-consuming [6]. In this paper, we study a new and more practical approach to help users find usages of APIs given only simple text phrases, when users have limited knowledge about an API library. We model API invocations as an API graph and aim to find an optimum connected subgraph that meets users' search needs.

The problem is challenging since the search space in an API graph is very huge. We start with a greedy subgraph search algorithm which returns a connected subgraph containing nodes with high textual similarity to the query phrases. Two refinement techniques are proposed to improve the quality of the returned subgraph. Furthermore, as the greedy subgraph search algorithm relies on online query of shortest path between two graph nodes, we propose a space-efficient compressed shortest path indexing scheme that can efficiently recover the exact shortest path. We conduct extensive experiments to show that the proposed subgraph search approach for API recommendation is very effective in that it boosts the average F1-measure of the state-of-the-art approach, Portfolio [15], on two groups of real-life queries by 64% and 36% respectively.

References

  1. S. K. Bajracharya, T. C. Ngo, E. Linstead, Y. Dou, P. Rigor, P. Baldi, and C. V. Lopes. Sourcerer: a search engine for open source code supporting structure-based search. In OOPSLA Companion, pages 681--682, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Brin and L. Page. The anatomy of a large-scale hypertextual web search engine. Computer Networks, 30(1--7):107--117, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S.-J. Chen and L. Lin. Modeling team member characteristics for the formation of a multifunctional team in concurrent engineering. IEEE Transactions on Engineering Management, 51(2):111--124, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  4. F. Crestani. Application of spreading activation techniques in information retrieval. Artif. Intell. Rev., 11(6):453--482, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. K. Grant and D. Mould. Combining heuristic and landmark search for path planning. In Future Play, pages 9--16, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. R. Hoffmann, J. Fogarty, and D. S. Weld. Assieme: finding and leveraging implicit references in a web search interface for programmers. In UIST, pages 13--22, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. F. K. Hwang, D. S. Richards, and P. Winter. The Steiner Tree Problem. North-Holland, Amsterdam, Netherlands, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  8. K. Kamel, N. Tubaiz, O. AlKoky, and Z. AlAghbari. Toward forming an effective team using social network. In IIT, pages 308--312, 2011.Google ScholarGoogle ScholarCross RefCross Ref
  9. M. Kargar and A. An. Keyword search in graphs: Finding r-cliques. PVLDB, 4(10):681--692, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. J. Ko, B. A. Myers, and H. H. Aung. Six learning barriers in end-user programming systems. In VL/HCC, pages 199--206, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. Lappas, K. Liu, and E. Terzi. Finding a team of experts in social networks. In KDD, pages 467--476, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C.-T. Li and M.-K. Shan. Team formation for generalized tasks in expertise social networks. In SocialCom/PASSAT, pages 9--16, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. F. Long, X. Wang, and Y. Cai. Api hyperlinking via structural overlap. In ESEC/SIGSOFT FSE, pages 203--212, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Mandelin, L. Xu, R. Bodík, and D. Kimelman. Jungloid mining: helping to navigate the api jungle. In PLDI, pages 48--61, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. McMillan, M. Grechanik, D. Poshyvanyk, Q. Xie, and C. Fu. Portfolio: finding relevant functions and their usage. In ICSE, pages 111--120, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. McMillan, D. Poshyvanyk, and M. Grechanik. Recommending source code examples via api call usages and documentation. In Proceedings of the 2nd International Workshop on Recommendation Systems for Software Engineering, pages 21--25, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. F. Porter. Readings in information retrieval. chapter An algorithm for suffix stripping, pages 313--316. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Puppin and F. Silvestri. The social network of java classes. In SAC, pages 1409--1413, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Qiao, H. Cheng, and J. X. Yu. Querying shortest path distance with bounded errors in large graphs. In SSDBM, pages 255--273, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Scaffidi. Why are apis difficult to learn and use? ACM Crossroads, 12(4):4, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. H. Wi, S. Oh, J. Mun, and M. Jung. A team formation model based on knowledge and collaboration. Expert Syst. Appl., 36(5):9121--9134, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. X. Yu, L. Qin, and L. Chang. Keyword search in relational databases: A survey. IEEE Data Eng. Bull., 33(1):67--78, 2010.Google ScholarGoogle Scholar
  23. Q. Zhang, W. Zheng, and M. R. Lyu. Flow-augmented call graph: A new foundation for taming api complexity. In FASE, pages 386--400, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. W. Zheng, Q. Zhang, and M. R. Lyu. Cross-library api recommendation using web search engines. In SIGSOFT FSE, pages 480--483, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. H. Zhong, T. Xie, L. Zhang, J. Pei, and H. Mei. Mapo: Mining and recommending api usage patterns. In ECOOP, pages 318--343, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Zzkarian and A. Kusiak. Forming teams: an analytical approach. IIE Transactions, 31:85--97, 1999.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Searching connected API subgraph via text phrases

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        FSE '12: Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering
        November 2012
        494 pages
        ISBN:9781450316149
        DOI:10.1145/2393596

        Copyright © 2012 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 11 November 2012

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate17of128submissions,13%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader