Search in Source Code Based on Identifying Popular Fragments

  • Eduard Kuric
  • Mária Bieliková
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7741)

Abstract

When programmers write new code, they are often interested in finding definitions of functions, existing, working fragments with the same or similar functionality, and reusing as much of that code as possible. Short fragments that are often returned by search engines as results to user queries do not give enough information to help programmers determine how to reuse them. Understanding code and determining how to use it, is a manual and time-consuming process. In general, programmers want to find initial points such as relevant functions. They want to easily understand how the functions are used and see the sequence of function invocations in order to understand how concepts are implemented. Our main goal is to enable programmers to find relevant functions to query terms and their usages. In our approach, identifying popular fragments is inspired by PageRank algorithm, where the “popularity” of a function is determined by how many functions call it. We designed a model based on the vector space model by which we are able to establish relevance among facts which content contains terms that match programmer’s queries. The result is an ordered list of relevant functions that reflects the associations between concepts in the functions and a programmer’s query.

Keywords

search source code reuse pagerank ranking functional dependencies 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bajracharya, S., et al.: Sourcerer: a search engine for open source code supporting structure-based search. In: Companion to the 21st ACM SIGPLAN Symposium on Object-Oriented Programming Systems, Languages, and Applications, NY, pp. 681–682 (2006)Google Scholar
  2. 2.
    Begel, A.: Codifier: A programmer-centric search user interface. In: Proc. of the Workshop on Human-Computer Interaction and Information Retrieval, pp. 23–24 (2007)Google Scholar
  3. 3.
    Bieliková, M., et al.: Webification of Software Development: General Outline and the Case of Enterprise Application Development. In: Procedia Technology, 3rd World Conf. on Inf. Tech., vol. 4 (2012)Google Scholar
  4. 4.
    Drummond, C.G., et al.: A Learning Agent that Assists the Browsing of Software Libraries. IEEE Trans. Softw. Eng., 1179–1196 (2000)Google Scholar
  5. 5.
    Frakes, W.B., Pole, T.P.: An Empirical Study of Representation Methods for Reusable Software Components. IEEE Trans. Softw. Eng. 20, 617–630 (1994)CrossRefGoogle Scholar
  6. 6.
    Grechanik, M., et al.: A search engine for finding highly relevant applications. In: Proc. of the 32nd ACM/IEEE Int. Conf. on Softw. Eng., ICSE 2010, pp. 475–484. ACM, NY (2010)CrossRefGoogle Scholar
  7. 7.
    Henninger, S.: Retrieving software objects in an example-based programming environment. In: Proc. of the 14th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 1991, pp. 251–260. ACM, New York (1991)CrossRefGoogle Scholar
  8. 8.
    Kramár, T., Barla, M., Bieliková, M.: Personalizing Search Using Metadata Based, Socially Enhanced Interest Model Built from the Stream of User’s Activity. Journal of Web Engineering 12(1) (2013)Google Scholar
  9. 9.
    Ossher, J., et al.: SourcererDB: An aggregated repository of statically analyzed and cross-linked open source Java projects. In: Proc. of the 2009 6th IEEE Int. Working Conf. on Mining Softw. Repositories, MSR 2009, pp. 183–186. IEEE CS, Washington (2009)CrossRefGoogle Scholar
  10. 10.
    Morisio, M., et al.: Practical Software Reuse. Springer, London (2002)MATHGoogle Scholar
  11. 11.
    Sillito, J., et al.: Asking and Answering Questions during a Programming Change Task. IEEE Trans. Softw. Eng. 34(4), 434–451 (2008)CrossRefGoogle Scholar
  12. 12.
    Sim, S.E., et al.: Archetypal Source Code Searches: A Survey of Software Developers and Maintainers. In: Proc. of the 6th International Workshop on Program Comprehension, IWPC 1998, pp. 180–187. IEEE Computer Society, Washington (1998)Google Scholar
  13. 13.
    Sugumaran, V., Storey, V.C.: A semantic-based approach to component retrieval. SIGMIS Database 34, 8–24 (2003)CrossRefGoogle Scholar
  14. 14.
    Prieto-Diaz, R., Freeman, P.: Classifying Software for Reusability, pp. 6–16. IEEE (1987)Google Scholar
  15. 15.
    Ye, Y., Fischer, G.: Supporting reuse by delivering task-relevant and personalized information. In: Proc. of the 24th International Conference on Software Engineering, ICSE 2002, pp. 513–523. ACM, New York (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Eduard Kuric
    • 1
  • Mária Bieliková
    • 1
  1. 1.Institute of Informatics and Software Engineering, Faculty of Informatics and Information TechnologiesSlovak University of Technology in BratislavaBratislavaSlovakia

Personalised recommendations