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

Nicolas Bettenburg bio photo By Nicolas Bettenburg


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.

Download the Full Paper

The full paper is available for download, if you want to learn more about source code traceability links.


If you would like to cite the research in your own work, please use the following citation:

 author="Nicolas Bettenburg and Stephen W. Thomas and Ahmed E. Hassan",
 booktitle="CSMR '12: Proceedings of the 16th European Conference on Software Maintenance a"d Reengineering},
 title="Using Code Search to Link Code Fragments in Discussions and Source Code",
 location="Szeged, Hungary"

Legal Disclaimer

This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author’s copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder.