Source code search is an important tool used by software engineers. However, until now relatively little is known about what developers search for in source code and why. This paper addresses this knowledge gap. We present the results of a log file analysis of a source code search engine. The data from the log file was analyzed together with the change history of four development and maintenance systems. The results show that most of the search targets were not changed after being downloaded, thus we concluded that the developers conducted searches to find reusable components, to obtain coding examples or to perform impact analysis. In contrast, maintainers often change the code they have downloaded. Moreover, we automatically categorized the search queries. The most popular categories were: method name, structural pattern, and keyword. The major search target was a statement. Although the selected data set was small, the deviations between the systems were negligible, therefore we conclude that our results are valid.
[1]
Sushil Krishna Bajracharya,et al.
Analyzing and mining a code search engine usage log
,
2010,
Empirical Software Engineering.
[2]
Cristina V. Lopes,et al.
Archetypal Internet-Scale Source Code Searching
,
2008,
OSS.
[3]
Cristina V. Lopes,et al.
How Well Do Search Engines Support Code Retrieval on the Web?
,
2011,
TSEM.
[4]
James Fogarty,et al.
Assieme: finding and leveraging implicit references in a web search interface for programmers
,
2007,
UIST '07.
[5]
Charles L. A. Clarke,et al.
Archetypal source code searches: a survey of software developers and maintainers
,
1998,
Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).