Using Code Search to Link Code Fragments in Discussions and Source Code

TitleUsing Code Search to Link Code Fragments in Discussions and Source Code
Publication TypeConference Paper
Year of Publication2012
AuthorsBettenburg, N, Thomas, SW, Hassan, AE
Secondary TitleCSMR '12: Proceedings of the 16th European Conference on Software Maintenance and Reengineering

When discussing software, practitioners often reference parts of the project’s source code. Such references have different motivations, such as mentoring and guiding less experienced developers, pointing out code that needs changes, or proposing possible strategies for the implementation of future changes. The fact that particular parts of a source code are being discussed makes these parts of the software special. Knowing which code is being talked about the most can not only help practitioners to guide important software engineering and maintenance activities, but also act as a high-level documentation of development activities for managers. In this paper, we use clone-detection as specific instance of a code search based approach for establishing links between code fragments that are discussed by developers and the actual source code of a project. Through a case study on the Eclipse project we explore the traceability links established through this approach, both quantitatively and qualitatively, and compare fuzzy code search based traceability linking to classical approaches, in particular change log analysis and information retrieval. We demonstrate a sample application of code search based traceability links by visualizing those parts of the project that are most discussed in issue reports with a Treemap visualization. The results of our case study show that the traceability links established through fuzzy code search-based traceability linking are conceptually different than classical approaches based on change log analysis or information retrieval.

Full Text
PDF icon Bettenburg_2012_CSMR.pdf437.96 KB