An Empirical Study on Copy and Paste of Code in Software Development.

In order to improve productivity etc. copy and paste programming is performed. It is known that not only source code but bugs are also copied between file in copy and paste programming. Therefore, code clone detection tools which extract the identical or similar code fragments (called code clone) in a source code are proposed. On the other hand, it is also known that code clone detection tools detect lots of code clones which include the source code which is not generated by copy and paste. In this paper, we analyzed the difference between the code fragments generated by copy and paste, and the code clone detection result, through actual software development project. As a result, a conventional code clone detection tool did not detect 74.6% of the code fragments generated by copy and paste, and 95.7% of the result detected by the tool are not generated by copy and paste.

[1]  Mario Gleirscher,et al.  On the Extent and Nature of Software Reuse in Open Source Java Projects , 2011, ICSR.

[2]  M S Waterman,et al.  Identification of common molecular subsequences. , 1981, Journal of molecular biology.

[3]  Katsuro Inoue,et al.  Detection of Software Clones Written in Multiple Programming Languages , 2016 .

[4]  Foutse Khomh,et al.  Late propagation in software clones , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[5]  Giuliano Antoniol,et al.  Comparison and Evaluation of Clone Detection Tools , 2007, IEEE Transactions on Software Engineering.

[6]  C. Roy,et al.  The Road to Software Clone Management: A Survey , 2012 .

[7]  Zhenchang Xing,et al.  Cloning practices: Why developers clone and what can be changed , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[8]  Rainer Koschke,et al.  Frequency and risks of changes to clones , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[9]  Shinji Kusumoto,et al.  Gapped code clone detection with lightweight source code analysis , 2013, 2013 21st International Conference on Program Comprehension (ICPC).

[10]  Nils Göde,et al.  Cloned code: stable code , 2013, J. Softw. Evol. Process..