Copy and Paste Behavior: A Systematic Mapping Study

Both novice and experienced developers rely more and more in external sources of code to include into their programs by copying and pasting code snippets. This behavior differs from the traditional software design approach where cohesion was achieved via a conscious design effort. Due to this fact, it is essential to know how this copy and paste programming practices are actually carried out, so that IDEs and code recommenders can be designed to fit with developer expectations and habits. Our objective is to identify the role of copy and paste programming or code clone in current development practices. A Systematic Mapping Study (SMS) has been conducted, searching the main scientific databases. The search retrieved 1271 citations and 39 articles were retained as primary studies. The primary studies were categorized according to eight areas: General information of clone usage, developer behavior, techniques and tools for clone detection, techniques and tools for clone reuse, patterns of cloning, clone evolution, effects of code cloning in software maintenance and development, and tools for clone visualization. The areas, techniques and tools of clone detection and developer behavior are strongly represented in the sample. The areas that have been least studied in the literature found in the SMS are tools of clone visualization and patterns of cloning. Keywords— Copy and Paste; Systematic Mapping Study

[1]  Muhammad Salman Khan,et al.  A Topic Modeling Approach for Code Clone Detection , 2018, SEKE.

[2]  Jeffrey C. Carver,et al.  Cloning: The need to understand developer intent , 2013, 2013 7th International Workshop on Software Clones (IWSC).

[3]  Manishankar Mondal,et al.  SPCP-Miner: A tool for mining code clones that are important for refactoring or tracking , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[4]  Manishankar Mondal,et al.  Bug Replication in Code Clones: An Empirical Study , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[5]  Tudor Gîrba,et al.  How Developers Copy , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[6]  Shinji Kusumoto,et al.  On the level of code suggestion for reuse , 2015, 2015 IEEE 9th International Workshop on Software Clones (IWSC).

[7]  Muhammad Murtaza Yousaf,et al.  Cloning in Popular Server Side Technologies using Agile Development: An Empirical Study , 2018 .

[8]  Julia L. Lawall,et al.  Cleaning up copy–paste clones with interactive merging , 2018, Automated Software Engineering.

[9]  Michael W. Godfrey,et al.  "Cloning Considered Harmful" Considered Harmful , 2006, 2006 13th Working Conference on Reverse Engineering.

[10]  Gregg Rothermel,et al.  Revealing the copy and paste habits of end users , 2009, 2009 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[11]  Bikash Joshi,et al.  Software Clone Detection Using Clustering Approach , 2015, ICONIP.

[12]  Nicholas A. Kraft,et al.  Clone evolution: a systematic review , 2011, J. Softw. Evol. Process..

[13]  Nicholas A. Kraft,et al.  Detecting and Characterizing Developer Behavior Following Opportunistic Reuse of Code Snippets from the Web , 2018, 2018 IEEE/ACM 15th International Conference on Mining Software Repositories (MSR).

[14]  Pearl Brereton,et al.  Performing systematic literature reviews in software engineering , 2006, ICSE.

[15]  Baishakhi Ray,et al.  Cross-project code clones in GitHub , 2018, Empirical Software Engineering.

[16]  Shinji Kusumoto,et al.  ClonePacker: A tool for clone set visualization , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[17]  Stefan Wagner,et al.  On the Relationship of Inconsistent Software Clones and Faults: An Empirical Study , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[18]  Gavriel Yarmish,et al.  Revisiting novice programmer errors , 2007, SGCS.

[19]  Miryung Kim,et al.  An ethnographic study of copy and paste programming practices in OOPL , 2004, Proceedings. 2004 International Symposium on Empirical Software Engineering, 2004. ISESE '04..

[20]  Farooque Azam,et al.  A Systematic Review on Code Clone Detection , 2019, IEEE Access.

[21]  Hardeep Singh,et al.  An Industrial Study on Developers' Prevalent Copy and Paste Activities , 2017, 2017 International Conference on Next Generation Computing and Information Systems (ICNGCIS).

[22]  Myoungkyu Song,et al.  An Empirical Study on Similar Changes in Evolving Software , 2018, 2018 IEEE International Conference on Electro/Information Technology (EIT).

[23]  Suleman Shahid,et al.  Codeease: harnessing method clone structures for reuse , 2017, 2017 IEEE 11th International Workshop on Software Clones (IWSC).

[24]  Thomas D. LaToza,et al.  Maintaining mental models: a study of developer work habits , 2006, ICSE.

[25]  Chanchal Kumar Roy,et al.  Fast and Flexible Large-Scale Clone Detection with CloneWorks , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C).

[26]  Suman,et al.  Code Clones: Detection and Management , 2018 .

[27]  Manishankar Mondal,et al.  Towards Visualizing Large Scale Evolving Clones , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering: Companion Proceedings (ICSE-Companion).

[28]  Jeffrey C. Carver,et al.  Claims and beliefs about code clones: Do we agree as a community? A survey , 2012, 2012 6th International Workshop on Software Clones (IWSC).

[29]  Manishankar Mondal,et al.  Bug-proneness and late propagation tendency of code clones: A Comparative study on different clone types , 2018, J. Syst. Softw..

[30]  Xiaohong Su,et al.  An Empirical Study of Code Clone Clustering Based on Clone Evolution , 2017 .

[31]  Richard N. Taylor,et al.  Software architecture: foundations, theory, and practice , 2009, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[32]  Serge Demeyer,et al.  An empirical study of clone density evolution and developer cloning tendency , 2017, 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER).

[33]  Ke Wang,et al.  A study on code clone evolution analysis , 2017, 2017 8th IEEE International Conference on Software Engineering and Service Science (ICSESS).

[34]  Katsuro Inoue,et al.  Refactoring patterns study in code clones during software evolution , 2017, 2017 IEEE 11th International Workshop on Software Clones (IWSC).

[35]  Chaman Wijesiriwardana,et al.  Component-based experimental testbed to faciltiate code clone detection research , 2017, 2017 8th IEEE International Conference on Software Engineering and Service Science (ICSESS).

[36]  Jagdeep Kaur,et al.  Systematic Mapping Study of Metrics based Clone Detection Techniques , 2016 .

[37]  Miryung Kim,et al.  Poster: Grafter: Transplantation and Differential Testing for Clones , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion).

[38]  Mehmet S. Aktas,et al.  Structural Code Clone Detection Methodology Using Software Metrics , 2016, Int. J. Softw. Eng. Knowl. Eng..

[39]  Lerina Aversano,et al.  Investigating on the Impact of Software Clones on Technical Debt , 2019, 2019 IEEE/ACM International Conference on Technical Debt (TechDebt).

[40]  Jacques Klein,et al.  FaCoY – A Code-to-Code Search Engine , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[41]  Zhenchang Xing,et al.  Code clone detection and analysis in open source applications , 2014 .

[42]  Andy Podgurski,et al.  Rethinking dependence clones , 2017, 2017 IEEE 11th International Workshop on Software Clones (IWSC).

[43]  Toshihiro Kamiya An execution-semantic and content-and-context-based code-clone detection and analysis , 2015, 2015 IEEE 9th International Workshop on Software Clones (IWSC).

[44]  Jeffrey C. Carver,et al.  Code clones and developer behavior: results of two surveys of the clone research community , 2015, Empirical Software Engineering.

[45]  Hamid Abdul Basit,et al.  Structural clones: An evolution perspective , 2018, 2018 IEEE 12th International Workshop on Software Clones (IWSC).

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

[47]  Lalitha Rangarajan,et al.  Code similarity detection through control statement and program features , 2019, Expert Syst. Appl..

[48]  Bayu Priyambadha,et al.  Behavioral Analysis for Detecting Code Clones , 2018 .

[49]  Manishankar Mondal,et al.  Does cloned code increase maintenance effort? , 2017, 2017 IEEE 11th International Workshop on Software Clones (IWSC).

[50]  Ahmed E. Hassan,et al.  An Empirical Study of the Copy and Paste Behavior during Development , 2015, 2015 IEEE/ACM 12th Working Conference on Mining Software Repositories.

[51]  Shinji Kusumoto,et al.  Source code reuse evaluation by using real/potential copy and paste , 2015, 2015 IEEE 9th International Workshop on Software Clones (IWSC).

[52]  Clarisse Sieckenius de Souza,et al.  Do I Know What My Code is "Saying"?: A study on novice programmers' perceptions of what reused source code may mean , 2018, IHC.

[53]  Cristina V. Lopes,et al.  SourcererCC and SourcererCC-I: Tools to Detect Clones in Batch Mode and during Software Development , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[54]  Zhenchang Xing,et al.  Clone-based and interactive recommendation for modifying pasted code , 2015, ESEC/SIGSOFT FSE.

[55]  Kamna Solanki,et al.  Comparative study of software clone detection techniques , 2016, 2016 Management and Innovation Technology International Conference (MITicon).

[56]  Foutse Khomh,et al.  Why reinventing the wheels? An empirical study on library reuse and re-implementation , 2019, Empirical Software Engineering.