Research Article | Open Access | Download PDF
Volume 13 | Issue 10 | Year 2026 | Article Id. IJECE-V13I10P108 | DOI : https://doi.org/10.14445/23488549/IJECE-V13I10P108A CNN-LSTM-based Hybrid Deep Learning Model Enhanced with PSO-GA Optimization for Accurate Code Clone Detection
Tanvi, Geetika
| Received | Revised | Accepted | Published |
|---|---|---|---|
| 21 Aug 2026 | 15 Sep 2026 | 24 Sep 2026 | 28 Oct 2026 |
Citation :
Tanvi, Geetika, "A CNN-LSTM-based Hybrid Deep Learning Model Enhanced with PSO-GA Optimization for Accurate Code Clone Detection," International Journal of Electronics and Communication Engineering, vol. 13, no. 10, pp. 131-143, 2026. Crossref, https://doi.org/10.14445/23488549/IJECE-V13I10P108
Abstract
Code clone analysis is needed when software repositories contain multiple implementations of the same or closely related functionality. Such duplication can make later maintenance harder because a change made in one fragment may not be reflected in another. This paper presents a hybrid CNN–LSTM framework in which PSO and GA are used to refine the feature representation before classification. The workflow consists of source-code preparation, feature construction, optimization, and clone classification. CNN is used to learn local patterns from the code representation, whereas LSTM models dependencies that extend across the sequence. The optimized representation is evaluated on BigCloneBench, Google Code Jam, and a Java repository. The reported experiments show that the combined model provides higher recall, accuracy, and precision than the comparison models. The findings indicate that optimization-assisted deep learning can provide a practical route toward more reliable clone analysis in software repositories.
Keywords
Clone detection accuracy, CNN-LSTM, Feature set optimization, Learning-based software engineering, PSO-GA.
References
- B.S. Baker, “On Finding Duplication and Near-Duplication in Large Software Systems,” Proceedings of the 2nd Working Conference on Reverse Engineering (WCRE), Toronto, ON, Canada, pp. 86-95, 1995.
[CrossRef] [Google Scholar] [Publisher Link] - Chanchal Kumar Roy, and James R. Cordy, “A Survey on Software Clone Detection Research,” Queen's School of Computing, Technical Report 2007-541, pp. 1-109, 2007.
[Google Scholar] - Dhavleesh Rattan, Rajesh Bhatia, and Maninder Singh, “Software Clone Detection: A Systematic Review,” Information and Software Technology, vol. 55, no. 7, pp. 1165-1199, 2013.
[CrossRef] [Google Scholar] [Publisher Link] - Manpreet Kaur, and Dhavleesh Rattan, “A Systematic Literature Review on the Use of Machine Learning in Code Clone Research,” Computer Science Review, vol. 47, 2023.
[CrossRef] [Google Scholar] [Publisher Link] - 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, 2002.
[CrossRef] [Google Scholar] [Publisher Link] - Martin White et al., “Deep Learning Code Fragments for Code Clone Detection,” Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 87-98, 2016.
[CrossRef] [Google Scholar] [Publisher Link] - Liuqing Li et al., “CCLearner: A Deep Learning-Based Clone Detection Approach,” 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME), Shanghai, China, pp. 249-260, 2017.
[CrossRef] [Google Scholar] [Publisher Link] - Geetika, Navdeep Kaur, and Amandeep Kaur, “An Optimized Hybrid Deep Learning Model for Code Clone Detection,” International Journal of Information Technology, vol. 17, no. 3, pp. 1589-1595, 2025.
[CrossRef] [Google Scholar] [Publisher Link] - Wenhan Wang et al., “Detecting Code Clones with Graph Neural Network and Flow-Augmented Abstract Syntax Tree,” 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER), London, ON, Canada, pp. 261-271, 2020.
[CrossRef] [Google Scholar] [Publisher Link] - Chanchal K. Roy, James R. Cordy, and Rainer Koschke, “Comparison and Evaluation of Code Clone Detection Techniques and Tools: A Qualitative Approach,” Science of Computer Programming, vol. 74, no. 7, pp. 470-495, 2009.
[CrossRef] [Google Scholar] [Publisher Link] - Mohammed El Arnaoty, and Francisco Servant, “OneSpace: Detecting Cross-Language Clones by Learning a Common Embedding Space,” Journal of Systems and Software, vol. 208, pp. 1-31, 2024.
[CrossRef] [Google Scholar] [Publisher Link] - Aiping Zhang et al., “Learn to Align: A Code Alignment Network for Code Clone Detection,” 2021 28th Asia-Pacific Software Engineering Conference (APSEC), Taipei, Taiwan, pp. 1-11, 2021.
[CrossRef] [Google Scholar] [Publisher Link] - Triet H. M. Le, Hao Chen, and Muhammad Ali Babar, “Deep Learning for Source Code Modeling and Generation: Models, Applications, and Challenges,” ACM Computing Surveys, vol. 53, no. 3, pp. 1-38, 2020.
[CrossRef] [Google Scholar] [Publisher Link] - Abdullah Sheneamer, Swarup Roy, and Jugal Kalita et al., “A Detection Framework for Semantic Code Clones and Obfuscated Code,” Expert Systems with Applications, vol. 97, pp. 405-420, 2018.
[CrossRef] [Google Scholar] [Publisher Link] - Stefan Bellon et al., “Comparison and Evaluation of Clone Detection Tools,” IEEE Transactions on Software Engineering, vol. 33, no. 9, pp. 577-591, 2007.
[CrossRef] [Google Scholar] [Publisher Link] - Huihui Wei, and Ming Li, “Supervised Deep Features for Software Functional Clone Detection by Exploiting Lexical and Syntactical Information in Source Code,” Proceedings of the 26th International Joint Conference on Artificial Intelligence (IJCAI), pp. 3034-3040, 2017.
[CrossRef] [Google Scholar] [Publisher Link] - Maggie Lei et al., “Deep Learning Application on Code Clone Detection: A Review of Current Knowledge,” Journal of Systems and Software, vol. 184, 2022.
[CrossRef] [Google Scholar] [Publisher Link] - Qurat Ul Ain et al., “A Systematic Review on Code Clone Detection,” IEEE Access, vol. 7, pp. 86121-86144, 2019.
[CrossRef] [Google Scholar] [Publisher Link] - I.D. Baxter et al., “Clone Detection using Abstract Syntax Trees,” Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272), Bethesda, MD, USA, pp. 368-377, 1998.
[CrossRef] [Google Scholar] [Publisher Link] - Eclipse JDT Core, Eclipse Foundation, 2026. [Online]. Available: https://download.eclipse.org/releases/2026-09/202609091000/buildInfo/archive/download.eclipse.org/releases/2026-09/202609091000/index/org.eclipse.jdt.core.source_3.47.0.v20260828-1141.html
- Juraj Petrik, and Daniela Chuda, “The Effect of Time Drift in Source Code Authorship Attribution: Time Drifting in Source Code – Stylochrnometry,” Proceedings of the 22nd International Conference on Computer Systems and Technologies (CompSysTech), Ruse Bulgaria, pp. 87-92, 2021.
[CrossRef] [Google Scholar] [Publisher Link] - Wei Hua et al., “FCCA: Hybrid Code Representation for Functional Clone Detection Using Attention Networks,” IEEE Transactions on Reliability, vol. 70, no. 1, pp. 304-318, 2021.
[CrossRef] [Google Scholar] [Publisher Link] - J. Krinke, “Identifying Similar Code with Program Dependence Graphs,” Proceedings of the 8th Working Conference on Reverse Engineering (WCRE), Stuttgart, Germany, pp. 301-309, 2001.
[CrossRef] [Google Scholar] [Publisher Link] - Z. Li et al., “CP-Miner: Finding Copy-Paste and Related Bugs in Large-Scale Software Code,” IEEE Transactions on Software Engineering, vol. 32, no. 3, pp. 176-192, 2006.
[CrossRef] [Google Scholar] [Publisher Link] - Gang Zhao, and Jeff Huang, “DeepSim: Deep Learning Code Functional Similarity,” Proceedings of the 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), Lake Buena Vista FL USA, pp. 141-151, 2018.
[CrossRef] [Google Scholar] [Publisher Link] - Chunrong Fang et al., “Functional Code Clone Detection with Syntax and Semantics Fusion Learning,” Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA), Virtual Event USA, pp. 516-527, 2020.
[CrossRef] [Google Scholar] [Publisher Link] - Dongjin Yu et al., “Graph-based Code Semantics Learning for Efficient Semantic Code Clone Detection,” Information and Software Technology, vol. 156, pp. 1-13, 2023.
[CrossRef] [Google Scholar] [Publisher Link] - J.I. Maletic, and A. Marcus, “Supporting Program Comprehension using Semantic and Structural Information,” Proceedings of the 23rd International Conference on Software Engineering (ICSE), Toronto, ON, Canada, pp. 103-112, 2001.
[CrossRef] [Google Scholar] [Publisher Link] - A. Marcus, and J. I. Maletic, “Identification of High-Level Concept Clones in Source Code,” Proceedings of the 16th IEEE International Conference on Automated Software Engineering (ASE), San Diego, CA, USA, pp. 107-114, 2001.
[CrossRef] [Google Scholar] [Publisher Link] - Collin McMillan et al., “Portfolio: Finding Relevant Functions and Their Usage,” Proceedings of the 33rd International Conference on Software Engineering (ICSE), Waikiki, Honolulu HI USA, pp. 111-120, 2011.
[CrossRef] [Google Scholar] [Publisher Link] - Lili Mou et al., “Convolutional Neural Networks over Tree Structures for Programming Language Processing,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 30, no. 1, pp. 1287-1293, 2016.
[CrossRef] [Google Scholar] [Publisher Link] - Hoan Anh Nguyen et al., “Clone Management for Evolving Software,” IEEE Transactions on Software Engineering, vol. 38, no. 5, pp. 1008-1026, 2012.
[CrossRef] [Google Scholar] [Publisher Link] - Daya Guo et al., “GraphCodeBERT: Pre-Training Code Representations with Data Flow,” International Conference on Learning Representations (ICLR), pp. 1-18, 2021.
[CrossRef] [Google Scholar] [Publisher Link] - J. Kennedy, and R. Eberhart, “Particle Swarm Optimization,” Proceedings of ICNN'95 - International Conference on Neural Networks, Perth, WA, Australia, pp. 1942-1948, 1995.
[CrossRef] [Google Scholar] [Publisher Link] - Yoshiki Higo et al., “Incremental Code Clone Detection: A PDG-Based Approach,” 2011 18th Working Conference on Reverse Engineering, Limerick, Ireland, pp. 3-12, 2011.
[CrossRef] [Google Scholar] [Publisher Link] - Jeffrey Svajlenko, and Chanchal K. Roy, “Fast and Flexible Large-Scale Clone Detection with CloneWorks,” 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C), Buenos Aires, Argentina, pp. 27-30, 2017.
[CrossRef] [Google Scholar] [Publisher Link] - Vaibhav Saini et al., Oreo: Scaling Clone Detection Beyond Near-Miss Clones, Code Clone Analysis: Research, Tools, and Practices, Springer, pp. 63-74, 2021.
[CrossRef] [Google Scholar] [Publisher Link] - Jeremy R. Pate, Robert Tairas, and Nicholas A. Kraft, “Clone Evolution: A Systematic Review,” Journal of Software: Evolution and Process, vol. 25, no. 3, pp. 261-283, 2013.
[CrossRef] [Google Scholar] [Publisher Link] - Chanchal K. Roy, and James R. Cordy, “NICAD: Accurate Detection of Near-Miss Intentional Clones Using Flexible Pretty-Printing and Code Normalization,” Proceedings of the 16th IEEE International Conference on Program Comprehension (ICPC), Amsterdam, Netherlands, pp. 172-181, 2008.
[CrossRef] [Google Scholar] [Publisher Link] - Parham Moradi, and Mozhgan Gholampour, “A Hybrid Particle Swarm Optimization for Feature Subset Selection by Integrating a Novel Local Search Strategy,” Applied Soft Computing, vol. 43, pp. 117-130, 2016.
[CrossRef] [Google Scholar] [Publisher Link] - Hitesh Sajnani et al., “SourcererCC: Scaling Code Clone Detection to Big-Code,” Proceedings of the 38th International Conference on Software Engineering (ICSE), Austin Texas, pp. 1157-1168, 2016.
[CrossRef] [Google Scholar] [Publisher Link] - Jeffrey Svajlenko, and Chanchal K. Roy, “BigCloneEval: A Clone Detection Tool Evaluation Framework with BigCloneBench,” 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME), Raleigh, NC, USA, pp. 596-600, 2016.
[CrossRef] [Google Scholar] [Publisher Link] - M. Nazir, A. Majid-Mirza, and S. Ali-Khan, “PSO-GA Based Optimized Feature Selection Using Facial and Clothing Information for Gender Classification,” Journal of Applied Research and Technology, vol. 12, no. 1, pp. 145-152, 2014.
[CrossRef] [Google Scholar] [Publisher Link] - Youming Wang, Jiali Han, and Tianqi Zhang, “A Relief-PGS Algorithm for Feature Selection and Data Classification,” Intelligent Data Analysis: An International Journal, vol. 27, no. 2, pp. 399-415, 2023.
[CrossRef] [Google Scholar] [Publisher Link] - Jeffrey Svajlenko, and Chanchal K. Roy, “Evaluating Clone Detection Tools with BigCloneBench,” 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME), Bremen, Germany, pp. 131-140, 2015.
[CrossRef] [Google Scholar] [Publisher Link] - Yusuke Oda et al., “Learning to Generate Pseudo-Code from Source Code Using Statistical Machine Translation,” 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), Lincoln, NE, USA, pp. 574-584, 2015.
[CrossRef] [Google Scholar] [Publisher Link] - Suresh Thummalapenta, and Tao Xie, “Mining Exception-Handling Rules as Sequence Association Rules,” Proceedings of the 31st International Conference on Software Engineering (ICSE), Vancouver, BC, Canada, pp. 496-506, 2009.
[CrossRef] [Google Scholar] [Publisher Link] - Morteza Zakeri-Nasrabadi et al., “A Systematic Literature Review on Source Code Similarity Measurement and Clone Detection: Techniques, Applications, and Challenges,” Journal of Systems and Software, vol. 204, pp. 1-49, 2023.
[CrossRef] [Google Scholar] [Publisher Link] - Asra Sulaiman Alshabib, Sajjad Mahmood, and Mohammad Alshayeb, “A Systematic Literature Review on Cross-Language Source Code Clone Detection,” Computer Science Review, vol. 58, 2025.
[CrossRef] [Google Scholar] [Publisher Link] - Jia Li et al., “ZC3: Zero-Shot Cross-Language Code Clone Detection,” Proceedings of the 38th IEEE/ACM International Conference on Automated Software Engineering (ASE), Luxembourg, Luxembourg, pp. 875-887, 2023.
[CrossRef] [Google Scholar] [Publisher Link] - Saad Arshad, Shamsa Abid, and Shafay Shamail, “CodeBERT for Code Clone Detection: A Replication Study,” Proceedings of the IEEE 16th International Workshop on Software Clones (IWSC), Limassol, Cyprus, pp. 39-45, 2022.
[CrossRef] [Google Scholar] [Publisher Link] - Ripon K. Saha et al., “Understanding the Evolution of Type-3 Clones: An Exploratory Study,” 2013 10th Working Conference on Mining Software Repositories (MSR), San Francisco, CA, USA, pp. 139-148, 2013.
[CrossRef] [Google Scholar] [Publisher Link] - Fahmi H. Quradaa, Sara Shahzad, and Rashad S. Almoqbily, “A Systematic Literature Review on the Applications of Recurrent Neural Networks in Code Clone Research,” PLOS ONE, vol. 19, no. 2, pp. 1-40, 2024.
[CrossRef] [Google Scholar] [Publisher Link] - Jeffrey Svajlenko, and Chanchal K. Roy, “Evaluating Modern Clone Detection Tools,” 2014 IEEE International Conference on Software Maintenance and Evolution, Victoria, BC, Canada, pp. 321-330, 2014.
[CrossRef] [Google Scholar] [Publisher Link] - Miryung Kim et al., “An Empirical Study of Code Clone Genealogies,” Proceedings of the 10th European Software Engineering Conference Held Jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 187-196, 2005.
[CrossRef] [Google Scholar] [Publisher Link]