ENHANCEMENT OF GENERIC CODE CLONE DETECTION MODEL FOR PYTHON APPLICATION
DOI:
https://doi.org/10.15282/ijsecs.8.1.2022.1.0091Keywords:
Code Clone Detection, Python Languages, Computational IntelligenceAbstract
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.
References
B. Van Bladel, S. Demeyer, “Clone Detection in Test Code: An Empirical Evaluation.,” in SANER 2020 - Proceedings of the
IEEE 27th International Conference on Software Analysis, Evolution, and Reengineering, 2020.
M. S. Rahman & C. K. Roy, “On the Relationships between Stability and Bug-Proneness of Code Clones: An Empirical
Study,” in Proceedings - 2017 IEEE 17th International Working Conference on Source Code Analysis and Manipulation,
SCAM 2017, 2017.
M. Mondal, Is cloned code really stable?, vol. 23, Springer New York LLC, 2018, pp. 693-770.
A. Sheneamer and J. Kalita, “A Survey of Software Clone Detection Techniques”, International Journal of Computer
Applications, vol. 137, pp. 1-21, 7 2016.
T. Kamiya, S. Kusumoto and K. Inoue, “CCFinder: A multilinguistic token-based code clone detection system for large scale
source code,” IEEE Transactions on Software Engineering, vol. 28, no. 7, pp. 654-670, 7 2002.
I. Baxter, “Clone detection using abstract syntax trees,” Conference on Software Maintenance, pp. 368-377, 1998.
B. Lague, D. Proulx, J. Mayrand and J. Hudepohl, “Assessing the Benefits of Incorporating Function Clone Detection in a
Development Process”, 1997 Proceedings International Conference on Software Maintenance, 1997, pp. 314-321, doi:
1109/ICSM.1997.624264.
C. K. Roy, J. R. Cordy and R. Koschke, “Comparison and Evaluation of Code Clone Detection Techniques and Tools: A
Qualitative Approach,” Science of Computer Programming, Volume 74, Issue 7, Pages 470-495, 2009.
Y. Yuan and Y. Guo, “Boreas: An accurate and scalable token-based approach to code clone detection,” 2012 27th IEEE/ACM
International Conference on Automated Software Engineering, ASE 2012 - Proceedings, pp. 286-289, 2012.
Y. Higo and S. Kusumoto. “Code clone detection on specialized PDGs with heuristics,” Proceedings of the European
Conference on Software Maintenance and Reengineering, CSMR, pp. 75-84, 2011.
K. R. Srinath, “Python-The Fastest Growing Programming Language,” International Research Journal of Engineering and
Technology (IRJET) 4.12 (2017): 354-357, 2017.
P. Bulychev and M. Minea, “Duplicate code detection using anti-unification” (Whitepaper), Retrieved from
http://clonedigger.sourceforge.net/duplicate_code_detection_bulychev_minea.pdf. 2008.
M. M. Morshed, M. A. Rahman and S. U. Ahmed, “A Literature Review of Code Clone Analysis to Improve Software
Maintenance Process,” ArXiv, vol. abs/1205.5615, 2012.
C. K. Roy and R. C.James, “NICAD: Accurate Detection of Near-Miss Intentional Clones Using Flexible Pretty-Printing and
Code Normalization,” 2007.
M. Al-Fahim and S. Sulaiman, “Generic Code Clone Detection Model for Java Applications,” IOP Conference Series:
Materials Science and Engineering, vol. 769, no. 1, 6 2020.
S. Giesecke, “Generic modelling of code clones BTC Energy Process Management Architecture (EPM) View project Generic
modeling of code clones,” Internationales Begegnungs- und Forschungszentrum f{"u}r Informatik (IBFI), Schloss Dagstuhl,
Germany , Dagstuhl Seminar Proceedings, 2007.
B. Biegel and S. Diehl, “Highly configurable and extensible code clone detection,” Proceedings - Working Conference on
Reverse Engineering, WCRE, pp. 237-241, 2010.
C. Kapser and M. W. Godfrey, “Cloning considered harmful” considered harmful: patterns of cloning in software. Empir
Software Eng 13, 645 2008.
Y. Golubev, V. Poletansky, N. Povarov and T. Bryksin, "Multi-threshold token-based code clone detection," 2021 IEEE
International Conference on Software Analysis, Evolution and Reengineering (SANER), 2021, pp. 496-500, doi:
1109/SANER50967.2021.00053.
Y. Zhang and T. Wang, "CCEyes: An Effective Tool for Code Clone Detection on Large-Scale Open Source Repositories,"
IEEE International Conference on Information Communication and Software Engineering (ICICSE), 2021, pp. 61-70,
doi: 10.1109/ICICSE52190.2021.9404141.
V. Bandi, C. K. Roy and C. Gutwin, "Clone Swarm: A Cloud Based Code-Clone Analysis Tool," 2020 IEEE 14th International
Workshop on Software Clones (IWSC), 2020, pp. 52-56, doi: 10.1109/IWSC50091.2020.9047642.
M. J. I. Mostafa, "An Empirical Study on Clone Evolution by Analyzing Clone Lifetime," 2019 IEEE 13th International
Workshop on Software Clones (IWSC), 2019, pp. 20-26, doi: 10.1109/IWSC.2019.8665850.
M. S. Rahman and C. K. Roy, "A Change-Type Based Empirical Study on the Stability of Cloned Code," 2014 IEEE 14th
International Working Conference on Source Code Analysis and Manipulation, 2014, pp. 31-40, doi: 10.1109/SCAM.2014.13.
H. Zhang and K. Sakurai, "A Survey of Software Clone Detection From Security Perspective," in IEEE Access, vol. 9, pp.
-48173, 2021, doi: 10.1109/ACCESS.2021.3065872.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2022 Ilyana Najwa Aiza Asmad, Al-Fahim Mubarak Ali, Nik Intan Syahiddatul Ilani Jailani
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.