Abstract
There are various kinds of repeated code such as consecutive if-else statements or case entries in program source code. Such repeated code sometimes require simultaneous modifications on all of its elements. Applying the same modifications to many places on source code is a burdensome work and introduces new bugs if some places to be modified are overlooked. For these reasons, it is necessary to support modifications on repeated code. Appropriate supports for repeated code can improve process of source code modification. In this paper, as a first step for supporting modifications on repeated code, we investigate how repeated code are modified during software evolution. As a result, we revealed that, 73-89% of repeated code were modified at least once in their life and 31-58% of modifications on repeated code were simultaneous ones for all of their elements.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aversano, L., Cerulo, L., Di Penta, M.: How clones are maintained: An empirical study. In: Proceedings of the 11th European Conference on Software Maintenance and Reengineering, CSMR 2007, pp. 81–90. IEEE Computer Society, Washington, DC (2007)
Baker, B.S.: On finding duplication and near-duplication in large software systems. In: Proceedings of the Second Working Conference on Reverse Engineering, WCRE 1995, pp. 86–95. IEEE Computer Society, Washington, DC (1995)
Canfora, G., Cerulo, L., Penta, M.D.: Identifying changed source code lines from version repositories. In: Proceedings of the Fourth International Workshop on Mining Software Repositories, MSR 2007, p. 14. IEEE Computer Society, Washington, DC (2007)
Ducasse, S., Demeyer, S., Nierstrasz, O.: Transform conditionals to polymorphism. In: Proceedings EUROPLOP 2000 (5th European Conference on Pattern Languages of Programming and Computing, 1999), pp. 219–252. UVK Universitätsverlag Konstanz GmbH, Konstanz (2000)
Fowler, M.: Refactoring: improving the design of existing code. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)
Higo, Y., Kamiya, T., Kusumoto, S., Inoue, K.: Method and implementation for investigating code clones in a software system. Inf. Softw. Technol. 49(9-10), 985–998 (2007)
Higo, Y., Kusumoto, S.: How often do unintended incosistencies happend? –deriving modification patterns and detecting overlooked code fragments–. In: Proceedings of the 2012 28th IEEE International Conference on Software Maintenance, ICSM 2012, pp. 222–231. IEEE Computer Society, Washington, DC (2012)
Kamiya, T., Kusumoto, S., Inoue, K.: Ccfinder: A multilinguistic token-based code clone detection system fo r large scale source code. IEEE Transactions on Software Engineering 28, 654–670 (2002)
Kapser, C.J., Godfrey, M.W.: ”Cloning considered harmful” considered harmful: patterns of cloning in software. Empirical Softw. Engg. 13(6), 645–692 (2008)
Kim, M., Bergman, L., Lau, T., Notkin, D.: An ethnographic study of copy and paste programming practices in oopl. In: Proceedings of the 2004 International Symposium on Empirical Software Engineering, ISESE 2004, pp. 83–92. IEEE Computer Society, Washington, DC (2004)
Kim, M., Sazawal, V., Notkin, D., Murphy, G.: An empirical study of code clone genealogies. In: Proceedings of the 10th European Software Engineering Conference Held Jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, ESEC/FSE-13, pp. 187–196. ACM, New York (2005)
Li, Z., Lu, S., Myagmar, S., Zhou, Y.: Cp-miner: Finding copy-paste and related bugs in large-scale software code. IEEE Trans. Softw. Eng. 32(3), 176–192 (2006)
Murakami, H., Hotta, K., Higo, Y., Igaki, H., Kusumoto, S.: Folding repeated instructions for improving token-based code clone detection. In: Proceedings of the 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation, SCAM 2012, pp. 64–73. IEEE Computer Society, Washington, DC (2012)
Roy, C.K., Cordy, J.R.: An empirical study of function clones in open source software. In: Proceedings of the 2008 15th Working Conference on Reverse Engineering, WCRE 2008, pp. 81–90. IEEE Computer Society, Washington, DC (2008)
Roy, C.K., Cordy, J.R., Koschke, R.: Comparison and evaluation of code clone detection techniques and tools: A qualitative approach. Sci. Comput. Program. 74(7), 470–495 (2009)
Sasaki, Y., Ishihara, T., Hotta, K., Hata, H., Higo, Y., Igaki, H., Kusumoto, S.: Preprocessing of metrics measurement based on simplifying program structures. In: International Workshop on Software Analysis, Testing and Applications, pp. 120–127 (December 2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Imazato, A., Sasaki, Y., Higo, Y., Kusumoto, S. (2013). Improving Process of Source Code Modification Focusing on Repeated Code. In: Heidrich, J., Oivo, M., Jedlitschka, A., Baldassarre, M.T. (eds) Product-Focused Software Process Improvement. PROFES 2013. Lecture Notes in Computer Science, vol 7983. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39259-7_24
Download citation
DOI: https://doi.org/10.1007/978-3-642-39259-7_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39258-0
Online ISBN: 978-3-642-39259-7
eBook Packages: Computer ScienceComputer Science (R0)