Exploring and Understanding Cross-service Code Clones in Microservice Projects
Microservice 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 attention from both industrial and academic communities. Many companies, such as Google, Netflix, Amazon, and IBM have applied microservice architecture in their projects. Researchers have also studied microservices in different directions, such as microservices extraction, fault localization, and code quality analysis. The recent work has presented cross-service code clones are prevalent in microservice projects and have caused considerable co-modifications among different services, which undermines the independence of microservices. But there is no systematic study to reveal the underlying reasons for the emergence of such clones. In this paper, we first build a dataset consisting of 2,722 pairs of cross-service clones from 22 open-source microservice projects. Then we manually inspect the implementations of files and methods involved in cross-service clones to understand why the clones are introduced. In the file-level analysis, we categorize files into three types: DPFile (Data-processing File), DRFile (Data-related File), and DIFile (Data-irrelevant File), and have presented that DRFiles are more likely to encounter cross-service clones. For each type of files, we further classify them into specific cases. Each case describes the characteristics of involved files and why the clones happen. In the method-level analysis, we dig information from the code of involved methods. On this basis, we propose a catalog containing 4 categories with 10 subcategories of method-level implementations that result in cross-service clones. We believe our analyses have provided the fundamental knowledge of cross-service clones, which can help developers better manage and resolve such clones in microservice projects.
Mon 16 MayDisplayed time zone: Eastern Time (US & Canada) change
22:00 - 22:50 | Session 10: Code ClonesResearch / Early Research Achievements (ERA) at ICPC room Chair(s): Chaiyong Ragkhitwetsagul Mahidol University, Thailand | ||
22:00 7mTalk | C4: Contrastive Cross-Language Code Clone Detection Research Chenning Tao Zhejiang University, Qi Zhan Zhejiang University, Xing Hu Zhejiang University, Xin Xia Huawei Software Engineering Application Technology Lab DOI Pre-print Media Attached | ||
22:07 7mTalk | Predicting Change Propagation between Code Clone Instances by Graph-based Deep Learning Research Bin Hu Fudan University, Yijian Wu Fudan University, Xin Peng Fudan University, Chaofeng Sha Fudan University, Xiaocheng Wang Fudan University, Baiqiang Fu Fudan University, Wenyun Zhao Fudan University, China Media Attached File Attached | ||
22:14 4mTalk | An Exploratory Study of Analyzing JavaScript Online Code Clones Early Research Achievements (ERA) DOI Pre-print Media Attached | ||
22:18 7mTalk | Exploring and Understanding Cross-service Code Clones in Microservice Projects Research Yang Zhao Central China Normal University, Ran Mo Central China Normal University, Yao Zhang Central China Normal University, Siyuan Zhang Central China Normal University, Pu Xiong Central China Normal University Media Attached | ||
22:25 7mTalk | MSCCD: Grammar Pluggable Clone Detection Based on ANTLR Parser Generation Research Wenqing ZHU Nagoya University, Norihiro Yoshida Ritsumeikan University, Toshihiro Kamiya Shimane University, Eunjong Choi Kyoto Institute of Technology, Hiroaki Takada Nagoya University Pre-print Media Attached | ||
22:32 7mTalk | Algorithm Identification in Programming Assignments Research Pranshu Chourasia Indian Institute of technology - Bombay, Ganesh Ramakrishnan Indian Institute of technology - Bombay, Varsha Apte Indian Institute of technology - Bombay, Suraj Kumar Indian Institute of technology - Bombay Media Attached | ||
22:39 11mLive Q&A | Q&A-Paper Session 10 Research |