Abstract

Identical code fragments in different locations are recognized as code clones. There are four native terminologies of code clones concluded as Type-1, Type-2, Type-3 and Type-4. Code clones can be identified using various approaches and models. Generic Code Clone Detection (GCCD) model was created to detect all four terminologies of code clones through five processes. A prototype has been developed to detect code clones in Java programming language that starts with Pre-processing Transformation, Parameterization, Categorization and ends with the Match Detection process. Hence, this work targeted to enhance the prototype using a GCCD model to identify all clone types in Python language. Enhancements are done in the Pre-processing process and parameterization process of the GCCD model to fit the Python language criteria. Results are improved by finding the best constant value and suitable weightage according to Python language. Proposed enhancement results of the Python language clone detection in GCCD model imply that Public as the weightage indicator and def as the best constant value.

Highlights

  • Repeated usability of a source in a software system is known as code clone [1]

  • This section will continue with the result of clones that have been found in two Python open source applications which are the Biopython and Natural Language Toolkit (NLTK) project

  • Among the 1667 clone pairs detected in the Biopython, 610 of the total clone pairs are detected as Type-1 and the remaining 1057 clone pairs are detected as Type-2

Read more

Summary

INTRODUCTION

Repeated usability of a source in a software system is known as code clone [1]. On the bright side, this practice is proven to speed up code writing in the development phase [2]. Clone detection varies within six major comparison approaches at different granularity to transform and identify code clones. Text-based approaches compare strings in source codes using the ‘AND’ statement. The last approach which is hybrid based is a combination of two or more different approaches used to detect clones. An experiment was conducted to ensure the clone's existence in Python applications. It is necessary to create a suitable clone detector for Python programming language that covers clone detection until Type-4 by enhancing the pre-processing and the transformation of the source codes that can improve the representation of the source units for code clone detection for Python language. Mubarak et al │ International Journal of Software Engineering and Computer Systems │ Vol 8, Issue 1 (2022)

RELATED WORK
EXPERIMENTAL RESULTS
DISCUSSION
CONCLUSION

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.