Search in Source Code Based on Identifying Popular Fragments
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.
Keywordssearch source code reuse pagerank ranking functional dependencies
Unable to display preview. Download preview PDF.
- 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.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.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.Drummond, C.G., et al.: A Learning Agent that Assists the Browsing of Software Libraries. IEEE Trans. Softw. Eng., 1179–1196 (2000)Google Scholar
- 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
- 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
- 14.Prieto-Diaz, R., Freeman, P.: Classifying Software for Reusability, pp. 6–16. IEEE (1987)Google Scholar