Abstract
It is believed by many academic and industrial experts, that source code cloning (copy&paste programming) represents a significant threat to maintainability in an evolving software system. The real threat does not lie in the existence of duplications, but the fears are in connection with their evolution. There exist an abundance of algorithms for finding code clones in one particular version of a software system, but eliminating or even evaluating these clones often seems hopeless, as there may exist several thousands of them. Tracking the evolution of individual clones might solve the problem, as it could help identifying the inconsistently changing duplications: the clones which are really dangerous at a particular moment. In this paper we present an approach for mapping code duplications from one particular version of the software to another one, based on a similarity distance function. For the suspicious evolution patterns we introduce the term of “clone smells”. By defining the relevant categories of the possible evolution patterns, the proposed method also gives a clue about why the reported code fragments might be dangerous. In the case study, clone smells were extracted, evaluated, and manually categorized throughout many versions of the jEdit system. The findings suggest that roughly half of the reported smells refer to inconsistent changes in the code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Mayrand, J., Leblanc, C., Merlo, E.: Experiment on the automatic detection of function clones in a software system using metrics. In: Proceedings of the 1996 International Conference on Software Maintenance, ICSM 1996, p. 244. IEEE Computer Society, Washington (1996)
Kapser, C., Godfrey, M.W.: cloning considered harmful” considered harmful. In: Proceedings of the 13th Working Conference on Reverse Engineering, WCRE 2006, pp. 19–28. IEEE Computer Society, Washington (2006)
Rahman, F., Bird, C., Devanbu, P.: Clones: What is that smell? In: 7th IEEE Working Conference on Mining Software Repositories (MSR), pp. 72–81 (2010)
Kamiya, T., Kusumoto, S., Inoue, K.: CCFinder: a multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering 28, 654–670 (2002)
Koschke, R., Falke, R., Frenzel, P.: Clone detection using abstract syntax suffix trees. In: Proceedings of the 13th Working Conference on Reverse Engineering (WCRE 2006), Washington, DC, USA, pp. 253–262. IEEE Computer Society, Los Alamitos (2006)
Lague, B., Proulx, D., Mayrand, J., Merlo, E.M., Hudepohl, J.: Assessing the benefits of incorporating function clone detection in a development process. In: Proceedings of the 13th International Conference on Software Maintenance (ICSM 1997), Washington, DC, USA, p. 314. IEEE Computer Society, Los Alamitos (1997)
Antoniol, G., Casazza, G., Di Penta, M., Merlo, E.: Modeling clones evolution through time series. In: Proceedings of the 17th International Conference on Software Maintenance (ICSM 2001), pp. 273–280. IEEE Computer Society, Los Alamitos (2001)
Duala-Ekoko, E., Robillard, M.P.: Tracking code clones in evolving software. In: ICSE 2007: Proceedings of the 29th International Conference on Software Engineering, Washington, DC, USA, pp. 158–167. IEEE Computer Society, Los Alamitos (2007)
Kim, M., Sazawal, V., Notkin, D., Murphy, G.: An empirical study of code clone genealogies. SIGSOFT Software Engineering Notes 30, 187–196 (2005)
Göde, N., Koschke, R.: Incremental clone detection. In: European Conference on Software Maintenance and Reengineering, pp. 219–228 (2009)
Thummalapenta, S., Cerulo, L., Aversano, L., Di Penta, M.: An empirical study on the maintenance of source code clones. Empirical Softw. Engg. 15, 1–34 (2010)
Krinke, J.: A study of consistent and inconsistent changes to code clones. In: Proceedings of the 14th Working Conference on Reverse Engineering, WCRE 2007, pp. 170–178. IEEE Computer Society, Washington (2007)
Canfora, G., Cerulo, L., Di Penta, M.: Identifying changed source code lines from version repositories. In: Proceedings of the Fourth International Workshop on Mining Software Repositories, MSR 2007, IEEE Computer Society, Washington (2007)
Bakota, T., Ferenc, R., Gyimothy, T.: Clone smells in software evolution. In: Proceedings of the 23rd International Conference on Software Maintenance (ICSM 2007), October 2-5, pp. 24–33 (2007)
Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Reading (1999)
jEdit Homepage, http://www.jedit.org
Ferenc, R., Beszédes, Á., Tarkiainen, M., Gyimóthy, T.: Columbus – Reverse Engineering Tool and Schema for C++. In: Proceedings of the 18th International Conference on Software Maintenance (ICSM 2002), pp. 172–181. IEEE Computer Society, Los Alamitos (2002)
FrontEndART Software Ltd, http://www.frontendart.com (2001)
Ferenc, R., Beszédes, Á.: Data Exchange with the Columbus Schema for C++. In: Proceedings of the 6th European Conference on Software Maintenance and Reengineering (CSMR 2002), pp. 59–66. IEEE Computer Society, Los Alamitos (2002)
Yudin, D., Gol’shtein, E.G.: Linear Programing Problems of Transportation. NAUKA (1969) (in Russian)
Kuhn, H.W.: The Hungarian method for the assignment problem. Naval Research Logistic Quarterly 2, 83–97 (1955)
Levenshtein distance, http://en.wikipedia.org/wiki/Levenshtein_distance
Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P.: Optimization by simulated annealing. Science 220(4598), 671–680 (1983)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bakota, T. (2011). Tracking the Evolution of Code Clones. In: Černá, I., et al. SOFSEM 2011: Theory and Practice of Computer Science. SOFSEM 2011. Lecture Notes in Computer Science, vol 6543. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-18381-2_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-18381-2_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-18380-5
Online ISBN: 978-3-642-18381-2
eBook Packages: Computer ScienceComputer Science (R0)