Code Clone Detection Using Machine Learning Techniques: A Systematic Literature Review

Code Clone Detection Using Machine Learning Techniques: A Systematic Literature Review

Amandeep Kaur, Sandeep Sharma, Munish Saini
Copyright: © 2020 |Pages: 27
DOI: 10.4018/IJOSSP.2020040104
OnDemand:
(Individual Articles)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

Code clone refers to code snippets that are copied and pasted with or without modifications. In recent years, traditional approaches for clone detection combine with other domains for better detection of a clone. This paper discusses the systematic literature review of machine learning techniques used in code clone detection. This study provides insights into various tools and techniques developed for clone detection by implementing machine learning approaches and how effectively those tools and techniques to identify clones. The authors perform a systematic literature review on studies selected from popular computer science-related digital online databases from January 2004 to January 2020. The software system and datasets used for analyzing tools and techniques are mentioned. A neural network machine learning technique is primarily used for the identification of the clone. Clone detection based on a program dependency graph must be explored in the future because it carries semantic information of code fragments.
Article Preview
Top

Introduction

Software cloning is the recurrence of code fragments with or without modifications. Due to technological advancement; the software cloning concept becomes more highlighted. Roy and Cordy (2007) and Koschke (2006) are the first to provide detailed information on software clones in the form of review. Various researchers concluded through the experiment that 5-20 percent of clone present in the source code (Baker, 1995; Mayrand et al., 1996; Baxter et al., 1998). According to Ducasse et al. (1999), the percentage of duplication in source code ranges from 5-70 percent. There are four types of clones (Roy and Cordy, 2007). Out of four types, three types deal with syntax of the code fragment, and one remaining type deals with the semantic of a code fragment.

  • Exact clone/Type-1: Two code fragments similar to each other with little transformation in comments, layout, or whitespaces.

  • Parameterized clone/Type-2: Changes made in names of variables, keywords, identifiers, or bypassing parameter during function call in code fragments, result in this clone.

  • Near-miss clone/Type-3: Near-miss clone occurs by adding, deleting statements in code fragments of type 2 clones.

  • Semantic clone/Type-4: The code snippets have different syntax but with alike functionality results in this clone.

Due to development in the field of software engineering, the identification of software clones is rapidly increasing. Management of clone is necessary for clone refactoring and cost-benefit evaluation of software (Roy et al., 2014). The maintenance cost of software is more than its development cost in the existence of software clones (Mayrand et al., 1996). According to Komondoor and Horwitz (2001), 90 percent development cost of software depends on its maintenance. Clone that contains the bug is tough to remove by the developer if disseminate in software that contains thousands or millions of lines of code (Johnson, 1994). Nowadays, traditional approaches are combined with other software domains for better identification of code clones. The survey of traditional approaches for clone detection is done by various researchers (Rattan et al., 2013; Sheneamer and Jugal, 2016; Ain et al., 2019).In these surveys, the authors discussed the traditional approaches that are textual, token, tree, graph, metrics, and hybrid. The main focus of the researchers is to describe the various technologies and tools using tokens, metrics, abstract syntax trees, and program dependency graphs extracted from the code. Only in a few hybrid techniques, the machine learning approaches are discussed to identify the clone. These surveys provide the review in terms of traditional approaches but in our survey, we provide a review in the terms of machine learning techniques.

No systematic literature review is performed on studies of clone detection in the context of machine learning techniques. Therefore, we are first to perform a systematic literature review on code clone detection using machine learning domain. In this, we presented different machine learning approaches are used along with the traditional method to identify the software clones. The way through which a systematic literature review performed in the software engineering domain is proposed by numerous researchers (Budgen and Brereton, 2006; Brereton et al., 2007; Charters and Kitchenham, 2007). According to Kitchenham (2004), Systematic literature review is the process of assessing and simplifying the research topic through the fair methodology. The main contributions of this study are:

  • 1.

    Discuss different machine learning techniques used for code clone detection;

  • 2.

    To present a set of tools and techniques used for the detection of various types of clones in software;

  • 3.

    The software and benchmark datasets used in the experiment for the validation of the techniques and tools.

Complete Article List

Search this Journal:
Reset
Volume 15: 1 Issue (2024): Forthcoming, Available for Pre-Order
Volume 14: 1 Issue (2023)
Volume 13: 4 Issues (2022): 1 Released, 3 Forthcoming
Volume 12: 4 Issues (2021)
Volume 11: 4 Issues (2020)
Volume 10: 4 Issues (2019)
Volume 9: 4 Issues (2018)
Volume 8: 4 Issues (2017)
Volume 7: 4 Issues (2016)
Volume 6: 1 Issue (2015)
Volume 5: 3 Issues (2014)
Volume 4: 4 Issues (2012)
Volume 3: 4 Issues (2011)
Volume 2: 4 Issues (2010)
Volume 1: 4 Issues (2009)
View Complete Journal Contents Listing