Investigating Developers’ Prevalent Copy and Paste Activities and validating associated Cloning Patterns
Sarveshwar Bharti, Hardeep Singh · INTERNATIONAL JOURNAL OF NEXT-GENERATION COMPUTING · 2019
To reuse available functionality, software developers usually accomplish copy and pasting of the source code. Empirical evaluations have established this activity as a prevalent cloning activity that act as a main cause of presence of clones into the software system. Analysis of these software systems have revealed various frequent cloning patterns, mainly classified into four categories viz. templating, forking, customization and exact match. There are various tools that deal with clones proactively within the Integrated Development Environments. For a tool to be effective, requires the capturing of developers’ intentions. In this paper, we attempt to identify the hidden intentions of the software developers behind cloning practices via an online industrial survey involving professional software developers. This work will shed a light on what computer programmers are doing while reusing code and why. This study uncovers various intentions, extent, source etc. of the copy and paste activity done by the software developer. The observational determinations from this survey were then employed to validate different cloning patterns based on the developers’ perspective. Finally, based on the survey results, solution to these cloning practices is discussed. Results depicted in this paper suggest the incorporation of these developers’ behavioral inference into the existing IDE based clone management systems.