ABSTRACT
In recent years, microservice architecture has been widely applied in software design. In addition, more and more monolithic software systems have been migrated into a microservice architecture. The core idea is to decompose the concerns of software projects into small and loosely-coupled services. Each service is supposed to be developed and even managed independently, which in turn improving the efficiency of development and maintenance. Code clone is common during software implementations, and many prior studies have revealed that code clones could cause maintenance difficulties. However, there is little work exploring the impacts of code clones on microservice projects. To bridge this gap, we focus on exploring the existence and co-modifications of within-service and cross-service code clones. With our evaluation of eight microservice projects, we have presented that there still exist code clones within services or across services. In addition, both within-service and cross-service code clones have been involved in co-modifications, meaning that these clones have caused maintenance difficulties. Finally, we have explored the characteristics of co-modifications in terms of changed LOC for both within-service and cross-service code clones.
- Qurat Ul Ain, Wasi Haider Butt, Muhammad Waseem Anwar, Farooque Azam, and Bilal Maqbool. 2019. A systematic review on code clone detection. IEEE Access 7 (2019), 86121--86144.Google ScholarCross Ref
- Tugrul Asik and Yunus Emre Selcuk. 2017. Policy enforcement upon software based on microservice architecture. In 2017 IEEE 15th International Conference on Software Engineering Research, Management and Applications (SERA). IEEE, 283--287.Google ScholarCross Ref
- Muhammad Zubair Azeem, Azhar Imran, Faheem Akhtar, Ahsan Wajahat, Jahanzaib Latif, and Suhail Ahmed Memon. 2020. Effects of Code Cloning in Mobile Applications. In 2020 3rd International Conference on Computing, Mathematics and Engineering Technologies (iCoMET). IEEE, 1--6.Google Scholar
- Armin Balalaie, Abbas Heydarnoori, and Pooyan Jamshidi. 2016. Microservices architecture enables devops: Migration to a cloud-native architecture. Ieee Software 33, 3 (2016), 42--52. Google ScholarDigital Library
- Debarshi Chatterji, Jeffrey C Carver, Nicholas A Kraft, and Jan Harder. 2013. Effects of cloned code on software maintainability: A replicated developer study. In 2013 20th Working Conference on Reverse Engineering (WCRE). IEEE, 112--121.Google ScholarCross Ref
- James R Cordy and Chanchal K Roy. 2011. The NiCad clone detector. In 2011 IEEE 19th International Conference on Program Comprehension. IEEE, 219--220. Google ScholarDigital Library
- Saulo S de Toledo, Antonio Martini, and Dag IK Sjøberg. 2021. Identifying architectural technical debt, principal, and interest in microservices: A multiple-case study. Journal of Systems and Software 177 (2021), 110968.Google ScholarCross Ref
- Nicola Dragoni, Saverio Giallorenzo, Alberto Lluch Lafuente, Manuel Mazzara, Fabrizio Montesi, Ruslan Mustafin, and Larisa Safina. 2017. Microservices: Yesterday, Today, and Tomorrow. Springer International Publishing, 195--216.Google Scholar
- Giona Granchelli, Mario Cardarelli, Paolo Di Francesco, Ivano Malavolta, Ludovico Iovino, and Amleto Di Salle. 2017. Towards recovering the software architecture of microservice-based systems. In 2017 IEEE International Conference on Software Architecture Workshops (ICSAW). IEEE, 46--53.Google ScholarCross Ref
- Giona Granchelli, Mario Cardarelli, Paolo Di Francesco, Ivano Malavolta, Ludovico Iovino, and Amleto Di Salle. 2017. Towards Recovering the Software Architecture of Microservice-Based Systems. In 2017 IEEE International Conference on Software Architecture Workshops (ICSAW). 46--53. https://doi.org/10.1109/ICSAW.2017.48Google Scholar
- Wafa Hasanain, Yvan Labiche, and Sigrid Eldh. 2018. An analysis of complex industrial test code using clone analysis. In 2018 IEEE International Conference on Software Quality, Reliability and Security (QRS). IEEE, 482--489.Google ScholarCross Ref
- Md Rakibul Islam, Minhaz F Zibran, and Aayush Nagpal. 2017. Security vulnerabilities in categories of clones and non-cloned code: An empirical study. In 2017 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). IEEE, 20--29. Google ScholarDigital Library
- Wuxia Jin, Gang Wu, Junyong Liu, Chenxi Yang, and Mengbing Gao. 2021. Microservice Maintainability Measurement Based on Multi-sourced Feature Space. Journal of Software 32, 5 (2021), 1322--1340.Google Scholar
- Toshihiro Kamiya, Shinji Kusumoto, and Katsuro Inoue. 2002. CCFinder: A multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering 28, 7 (2002), 654--670. Google ScholarDigital Library
- Cory J Kapser and Michael W Godfrey. 2008. "Cloning considered harmful" considered harmful: patterns of cloning in software. Empirical Software Engineering 13, 6 (2008), 645--692. Google ScholarDigital Library
- Seulbae Kim, Seunghoon Woo, Heejo Lee, and Hakjoo Oh. 2017. Vuddy: A scalable approach for vulnerable code clone discovery. In 2017 IEEE Symposium on Security and Privacy (SP). IEEE, 595--614.Google ScholarCross Ref
- Aversano Lerina and Laura Nardi. 2019. Investigating on the impact of software clones on technical debt. In 2019 IEEE/ACM International Conference on Technical Debt (TechDebt). IEEE, 108--112. Google ScholarDigital Library
- Genc Mazlami, Jürgen Cito, and Philipp Leitner. 2017. Extraction of Microservices from Monolithic Software Architectures. In 2017 IEEE International Conference on Web Services (ICWS). 524--531. https://doi.org/10.1109/ICWS.2017.61Google ScholarCross Ref
- Manishankar Mondal, Banani Roy, Chanchal K Roy, and Kevin A Schneider. 2019. Investigating context adaptation bugs in code clones. In 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, 157--168.Google ScholarCross Ref
- Manishankar Mondal, Chanchal K Roy, and Kevin A Schneider. 2015. A comparative study on the bug-proneness of different types of code clones. In 2015 IEEE International conference on software maintenance and evolution (ICSME). IEEE, 91--100. Google ScholarDigital Library
- Manishankar Mondal, Chanchal K Roy, and Kevin A Schneider. 2017. Does cloned code increase maintenance effort?. In 2017 IEEE 11th International Workshop on Software Clones (IWSC). IEEE, 1--7.Google ScholarCross Ref
- Golam Mostaeen, Jeffrey Svajlenko, Banani Roy, Chanchal K Roy, and Kevin A Schneider. 2019. CloneCognition: machine learning based code clone validation tool. In Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 1105--1109. Google ScholarDigital Library
- Sam Newman. 2015. O'Reilly Media, Inc.Google ScholarDigital Library
- Neha Saini, Sukhdip Singh, et al. 2018. Code clones: Detection and management. Procedia computer science 132 (2018), 718--727.Google Scholar
- Hitesh Sajnani, Vaibhav Saini, and Cristina V Lopes. 2014. A comparative study of bug patterns in java cloned and non-cloned code. In 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation. IEEE, 21--30. Google ScholarDigital Library
- Heyuan Shi, Runzhe Wang, Ying Fu, Yu Jiang, Jian Dong, Kun Tang, and Jiaguang Sun. 2019. Vulnerable Code Clone Detection for Operating System Through Correlation-Induced Learning. IEEE Transactions on Industrial Informatics 15, 12 (2019), 6551--6559.Google ScholarCross Ref
- Jeffrey Svajlenko and Chanchal K Roy. 2014. Evaluating modern clone detection tools. In 2014 IEEE International Conference on Software Maintenance and Evolution. IEEE, 321--330. Google ScholarDigital Library
- Radhika D Venkatasubramanyam, Shrinath Gupta, and Himanshu Kumar Singh. 2013. Prioritizing code clone detection results for clone management. In 2013 7th International Workshop on Software Clones (IWSC). IEEE, 30--36. Google ScholarDigital Library
- Andrew Walker and Tomas Cerny. 2020. On cloud computing infrastructure for existing code-clone detection algorithms. ACM SIGAPP Applied Computing Review 20, 1 (2020), 5--14. Google ScholarDigital Library
- Andrew Walker, Tomas Cerny, and Eungee Song. 2020. Open-source tools and benchmarks for code-clone detection: past, present, and future trends. ACM SIGAPP Applied Computing Review 19, 4 (2020), 28--39. Google ScholarDigital Library
- Andrew Walker, Dipta Das, and Tomas Cerny. 2020. Automated code-smell detection in microservices through static analysis: A case study. Applied Sciences 10, 21 (2020), 7800.Google ScholarCross Ref
- Xiaoyin Wang, Yingnong Dang, Lu Zhang, Dongmei Zhang, Erica Lan, and Hong Mei. 2012. Can I clone this piece of code here?. In Proceedings of the 27th IEEE/ACM international conference on automated software engineering. 170--179. Google ScholarDigital Library
- Jiachen Yang, Keisuke Hotta, Yoshiki Higo, Hiroshi Igaki, and Shinji Kusumoto. 2015. Classification model for code clones based on machine learning. Empirical Software Engineering 20, 4 (2015), 1095--1125. Google ScholarDigital Library
- Fanlong Zhang, Siau-Cheng Khoo, and Xiaohong Su. 2020. Improving Maintenance-Consistency Prediction During Code Clone Creation. IEEE Access 8 (2020), 82085--82099.Google ScholarCross Ref
Index Terms
- The Existence and Co-Modifications of Code Clones within or across Microservices
Recommendations
Exploring and understanding cross-service code clones in microservice projects
ICPC '22: Proceedings of the 30th IEEE/ACM International Conference on Program ComprehensionMicroservice is an architecture style that decomposes complex software into loosely coupled services, which could be developed, maintained, and deployed independently. In recent years, the microservice architecture has been drawing more and more ...
Problematic Code Clones Identification Using Multiple Detection Results
APSEC '09: Proceedings of the 2009 16th Asia-Pacific Software Engineering ConferenceMost code clones are generated by copy-and paste programming. Copy-and-paste programming shortens a time required for implementation because pasted code is a template of the required functionality. However, it sometimes brings on new bugs to the source ...
Extracting code clones for refactoring using combinations of clone metrics
IWSC '11: Proceedings of the 5th International Workshop on Software ClonesCode clone detection tools may report a large number of code clones, while software developers are interested in only a subset of code clones that are relevant to software development tasks such as refactoring. Our research group has supported many ...
Comments