Came across an interesting paper today: http://www.chrisluce.com/doc/icsm2009.pdf
It describes a study in which 10 developers were asked to fix two bugs in a software system they had no experience with. The system consisted of 70 thousand lines of code. The paper describes how the participants used search to orient themselves to the code. There are five key observations:
The most interesting observation for me though was the ineffectiveness of search as a means to orient yourself to an unfamiliar code base. Of the 96 search episodes observed across all 10 participants, only 5 search episodes resulted in highly relevant items being returned and subsequently opened by the participant in the editor. There were many more episodes in which highly relevant items were returned by the search performed but these weren't noticed or recognized by the participants and were not opened. In some cases, these highly relevant items weren't noticed because they were buried in thousands of other search results.
The paper suggests that there are opportunities for tools to increase the effectiveness of search by providing better support for skimming search results. Making more contextual information available for example would help. Others have also suggested that foraging through source code would be better supported by the use of information scent on search results so that developers can see where they are most likely to find something useful.