skip to main content
10.1145/3475716.3475784acmconferencesArticle/Chapter ViewAbstractPublication PagesesemConference Proceedingsconference-collections
research-article

The Existence and Co-Modifications of Code Clones within or across Microservices

Authors Info & Claims
Published:11 October 2021Publication History

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.

References

  1. 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 ScholarGoogle ScholarCross RefCross Ref
  2. 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 ScholarGoogle ScholarCross RefCross Ref
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarCross RefCross Ref
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarCross RefCross Ref
  8. 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 ScholarGoogle Scholar
  9. 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 ScholarGoogle ScholarCross RefCross Ref
  10. 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 ScholarGoogle Scholar
  11. 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 ScholarGoogle ScholarCross RefCross Ref
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarCross RefCross Ref
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarCross RefCross Ref
  19. 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 ScholarGoogle ScholarCross RefCross Ref
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarCross RefCross Ref
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. Sam Newman. 2015. O'Reilly Media, Inc.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Neha Saini, Sukhdip Singh, et al. 2018. Code clones: Detection and management. Procedia computer science 132 (2018), 718--727.Google ScholarGoogle Scholar
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarCross RefCross Ref
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarCross RefCross Ref
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. Fanlong Zhang, Siau-Cheng Khoo, and Xiaohong Su. 2020. Improving Maintenance-Consistency Prediction During Code Clone Creation. IEEE Access 8 (2020), 82085--82099.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. The Existence and Co-Modifications of Code Clones within or across Microservices

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ESEM '21: Proceedings of the 15th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)
      October 2021
      368 pages
      ISBN:9781450386654
      DOI:10.1145/3475716

      Copyright © 2021 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 October 2021

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      ESEM '21 Paper Acceptance Rate24of124submissions,19%Overall Acceptance Rate130of594submissions,22%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader