Abstract
Programmers tend to write code clones unintentionally, which can be easily avoided. Clone change management is a crucial issue in open-source software (OSS) and industrial software development (e.g., development of social infrastructure, financial systems, and medical equipment). When industrial software developers have to fix a defect, they must find the code clones corresponding to the code fragment, including it. To date, several studies have been conducted on the analysis of clone evolution using OSS. However, only a few studies have reported on the application of a clone change notification system to the industrial software development process of our knowledge. In this chapter, first, we introduce a system that notifies about the creation of code clones. Then, we report on our experience with the system after a 40-day long application of it in a corporation’s software development process. In the industrial application, a developer successfully identified ten unintentionally created clones that should be merged. Moreover, we introduce the improvements that were made since we released the initial version of the notification system. Besides, we demonstrate a usage scenario of the current version. The current version of Clone Notifier and its video are available at: https://github.com/s-tokui/CloneNotifier.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
L. Aversano, L. Cerulo, M. Di Penta, How clones are maintained: an empirical study, in 11th European Conference on Software Maintenance and Reengineering (CSMR’07) (2007), pp. 81–90. https://doi.org/10.1109/CSMR.2007.26
T. Bakota, R. Ferenc, T. Gyimothy, Clone smells in software evolution, in 2007 IEEE International Conference on Software Maintenance (2007), pp. 24–33. https://doi.org/10.1109/ICSM.2007.4362615
E. Duala-Ekoko, M.P. Robillard, Tracking code clones in evolving software, in Proceedings of the 29th International Conference on Software Engineering, ICSE ’07 (IEEE Computer Society, USA, 2007), pp. 158–167. https://doi.org/10.1109/ICSE.2007.90
E. Duala-Ekoko, M.P. Robillard, Clone region descriptors: representing and tracking duplication in source code. ACM Trans. Softw. Eng. Methodol. 20(1) (2010). https://doi.org/10.1145/1767751.1767754
M. Fowler, Refactoring: Improving the Design of Existing Code (Addison-Wesley, Boston, MA, USA, 1999)
J. Harder, N. Gode, Modeling clone evolution, in Proceeding of the 3rd International Workshop on Software Clones, pp. 17–21 (2009)
Honda, H., Tokui, S., Yokoi, K., Choi, E., Yoshida, N., Inoue, K.: CCEvovis: a clone evolution visualization system for software maintenance, in 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC) (2019), pp. 122–125. https://doi.org/10.1109/ICPC.2019.00026
K. Inoue, Y. Higo, N. Yoshida, E. Choi, S. Kusumoto, K. Kim, W. Park, E. Lee, Experience of finding inconsistently-changed bugs in code clones of mobile software, in 2012 6th International Workshop on Software Clones (IWSC) (2012), pp. 94–95. https://doi.org/10.1109/IWSC.2012.6227882
L. Jiang, Z. Su, E. Chiu, Context-based detection of clone-related bugs, in Proceedings of the the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, ESEC-FSE ’07 (Association for Computing Machinery, New York, NY, USA, 2007), pp. 55–64. https://doi.org/10.1145/1287624.1287634
E. Juergens, F. Deissenboeck, B. Hummel, S. Wagner, Do code clones matter?, in Proceedings of the 31st International Conference on Software Engineering, ICSE ’09 (IEEE Computer Society, USA, 2009), pp. 485–495. https://doi.org/10.1109/ICSE.2009.5070547
T. Kamiya, S. Kusumoto, K. Inoue, CCFinder: a multilinguistic token-based code clone detection system for large scale source code. IEEE Trans. Softw. Eng. 28(7), 654–670 (2002). https://doi.org/10.1109/TSE.2002.1019480
M. Kim, V. Sazawal, D. Notkin, G. Murphy, An empirical study of code clone genealogies (Association for Computing Machinery, New York, NY, USA, 2005), pp. 187–196. https://doi.org/10.1145/1095430.1081737
J. Krinke, A study of consistent and inconsistent changes to code clones, in 14th Working Conference on Reverse Engineering (WCRE 2007) (2007), pp. 170–178. https://doi.org/10.1109/WCRE.2007.7
Z. Li, S. Lu, S. Myagmar, Y. Zhou, CP-Miner: finding copy-paste and related bugs in large-scale software code. IEEE Trans. Softw. Eng. 32(3), 176–192 (2006). https://doi.org/10.1109/TSE.2006.28
H.A. Nguyen, T.T. Nguyen, N.H. Pham, J. Al-Kofahi, T.N. Nguyen, Clone management for evolving software. IEEE Trans. Softw. Eng. 38(5), 1008–1026 (2012). https://doi.org/10.1109/TSE.2011.90
J.R. Pate, R. Tairas, N.A. Kraft, Clone evolution: a systematic review. J. Softw. Evol. Process 25(3), 261–283 (2013)
R.K. Saha, C.K. Roy, K.A. Schneider, gCad: a near-miss clone genealogy extractor to support clone evolution analysis, in 2013 IEEE International Conference on Software Maintenance (2013), pp. 488–491. https://doi.org/10.1109/ICSM.2013.79
H. Sajnani, V. Saini, J. Svajlenko, C.K. Roy, C.V. Lopes, SourcererCC: scaling code clone detection to big-code, in 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE) (2016), pp. 1157–1168. https://doi.org/10.1145/2884781.2884877
S. Tokui, N. Yoshida, E. Choi, K. Inoue, Clone notifier: developing and improving the system to notify changes of code clones, in 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER) (2020), pp. 642–646. https://doi.org/10.1109/SANER48275.2020.9054793
Y. Yamanaka, E. Choi, N. Yoshida, K. Inoue, T. Sano, Applying clone change notification system into an industrial development process, in 2013 21st International Conference on Program Comprehension (ICPC) (2013), pp. 199–206. https://doi.org/10.1109/ICPC.2013.6613848
K. Yokoi, E. Choi, N. Yoshida, K. Inoue, Investigating vector-based detection of code clones using BigCloneBench, in 2018 25th Asia-Pacific Software Engineering Conference (APSEC) (2018), pp. 699–700. https://doi.org/10.1109/APSEC.2018.00095
N. Yoshida, S. Numata, E. Choiz, K. Inoue, Proactive clone recommendation system for extract method refactoring, in 2019 IEEE/ACM 3rd International Workshop on Refactoring (IWoR) (2019), pp. 67–70. https://doi.org/10.1109/IWoR.2019.00020
A. Zeller, Why Programs Fail: A Guide to Systematic Debugging, 2nd edn. (Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2009)
Acknowledgements
We would like to thank Ms. Fusako Mitsuhashi and Mr. Shin’ichi Iwasaki of NEC Corporation for data collection. We also thank Yuki Yamanaka, Shogo Tokui, Mananu Sano, Seiya Numata, Kazuki Yokoi, and Katsuro Inoue of Osaka University for their contribution to Clone Notifier. This work was supported by JSPS KAKENHI Grant Numbers JP18H04094, JP19K20240, JP20K11745.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this chapter
Cite this chapter
Yoshida, N., Choi, E. (2021). Clone Evolution and Management. In: Inoue, K., Roy, C.K. (eds) Code Clone Analysis. Springer, Singapore. https://doi.org/10.1007/978-981-16-1927-4_14
Download citation
DOI: https://doi.org/10.1007/978-981-16-1927-4_14
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-16-1926-7
Online ISBN: 978-981-16-1927-4
eBook Packages: Computer ScienceComputer Science (R0)