Professional Documents
Culture Documents
1st Manu Singh 2nd Kriti Priya Gupta 3rd Vidushi Sharma
Computer Science and Engineering (of Aff.) SCMS School of ICT
Krishna Engineering College (AKTU) Symbiosis International University (SIU) Gautam buddha university
Ghaziabad, India Noida, India Greater Noida, India
manu.singh@krishnacollege.ac.in kriti.gupta@scmsnoida.ac.in vidushi@gbu.ac.in
Abstract—Code cloning is a common practice which is adopted reasons of code cloning on various dimensions of software
by software developers. Although the practice is not generally quality and maintainability. The remaining paper is organized
harmful, however too much code cloning can be harmful for as follows: Section 2 presents the review of prior research
software quality. The present study deals with software devel-
opers’ perspectives to understand their reasons of using code done to understand the effects of code cloning. The employed
clones. The reasons of using code clone are categorized into three research methodology is discussed in section 3 and the data
categories namely ‘technical’, organizational’ and ‘personal’. The analysis and results are presented in section 4. Section 5
study uses survey method to obtain primary data pertaining concludes the paper and sections 6 respectively discuss the
to the perceptions of software developers working with various limitations and implications of the research.
software development companies in NOIDA. The data obtained
is statistically analyzed using one-sample t-tests and one-way II. L ITERATURE R EVIEW
ANOVA. The findings indicate that software developers generally
do code cloning because of ‘technical’ and ‘organizational’ Software engineering researchers have mixed arguments
reasons. regarding the impact of code cloning on software quality.
Index Terms—Code cloning, Software developers. Cloning can happen at several levels of abstraction (Singh M.
et al. 2017). Code cloning can increase unnecessary code in
I. I NTRODUCTION size. Code clones that are not well understood can introduce
In the modern world, every business depends on software. new bugs in the software system. Maintenance cost and
In the light of this reality, software quality is one of the most efforts can be increased when problems or bugs must be
crucial aspects for a software development company. One of fixed multiple times. Models for estimating software costs
the factors, which affect software quality, is code cloning. are summarized by researchers (Keim, Y. et al.) Cloning
Code cloning refers to copying or modifying a block of code code can lead to idle, or unused, code in the system (Singh
in software program and is the most elementary technique M. et al. 2015). Some researchers fare in favour of code
of software reuse. There are various categories available in cloning and conclude that clones are not harmful (Kim et al.,
clones and High-Level cloning is extensively used by software 2005; Krinke, 2007; Aversano, 2007; Hotta et al., 2010; Saha
developers for various reasons (Singh M. et al. 2013). High- et al., 2010). Instead, clones can be helpful from different
level clones are said to be composed of multiple simple clones perspectives (Kapser et al., 2008). On the other hand, some
(Oumaziz M., 2020). Code cloning may cause long-term risks researchers have showed that clones have negative effects
to software quality. Baker (1999) has considered cloning to on software quality as cloning increases maintenance costs
be harmful to the quality of the source code. If a piece of (Lozano and Wermelinger, 2008; Juergens et al., 2009; Lozano
code consisting of bugs is cloned, then the bugs are also and Wermelinger,2010). Although the effects of code cloning
cloned thereby deteriorating the software quality. Although the have been widely studied by various researchers, there is a
impact of code cloning has been extensively studied by various dearth of work on systematically understanding the perspec-
researchers, there is a lack of research on understanding the tives of software developers as to why they do code cloning
opinions of software developers regarding the issue. Since while developing a software system (Zhang et al., 2012)
software developers play a key role in the design, installation, and what is the effect of code cloning on software quality
testing and maintenance of software, hence it is important to and maintainability. In few studies, the developers’ intentions
understand their reasons of code cloning. This paper attempts behind cloning practices have been identified as development
to understand the software developers’ perspectives on the strategies, maintenance benefits, language limitations, and
developer’s capabilities (Kim et al., 2004; Kapser and Godfrey,
Identify applicable funding agency here. If none, delete this. 2006; Roy and Cordy, 2007). Zhang et al. (2012) in their
industrial study have investigated reasons of cloning practices
in from technical, personal, and organizational perspectives.