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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
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)
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)
Drummond, C.G., et al.: A Learning Agent that Assists the Browsing of Software Libraries. IEEE Trans. Softw. Eng., 1179–1196 (2000)
Frakes, W.B., Pole, T.P.: An Empirical Study of Representation Methods for Reusable Software Components. IEEE Trans. Softw. Eng. 20, 617–630 (1994)
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)
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)
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)
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)
Morisio, M., et al.: Practical Software Reuse. Springer, London (2002)
Sillito, J., et al.: Asking and Answering Questions during a Programming Change Task. IEEE Trans. Softw. Eng. 34(4), 434–451 (2008)
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)
Sugumaran, V., Storey, V.C.: A semantic-based approach to component retrieval. SIGMIS Database 34, 8–24 (2003)
Prieto-Diaz, R., Freeman, P.: Classifying Software for Reusability, pp. 6–16. IEEE (1987)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kuric, E., Bieliková, M. (2013). Search in Source Code Based on Identifying Popular Fragments. In: van Emde Boas, P., Groen, F.C.A., Italiano, G.F., Nawrocki, J., Sack, H. (eds) SOFSEM 2013: Theory and Practice of Computer Science. SOFSEM 2013. Lecture Notes in Computer Science, vol 7741. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35843-2_35
Download citation
DOI: https://doi.org/10.1007/978-3-642-35843-2_35
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-35842-5
Online ISBN: 978-3-642-35843-2
eBook Packages: Computer ScienceComputer Science (R0)