Validating and Detecting User-Specific Code Clones: An AI Framework Leveraging Metric-Based Feature Vectors
DOI:
https://doi.org/10.35870/ijsecs.v5i2.4431Keywords:
Feature Vectors, RESTful API, Artificial Intelligence, User-Specific Code, Clone PairsAbstract
Like other verification aspects, code clone validation remains highly subjective and user-dependent. This research presents an AI-based approach utilizing fragment-specific metric-based feature vectors to identify and validate customized code clones. We derive classification feature vectors through appropriate code metrics, training various machine learning models for identifier classification. The resulting framework enables users to submit code clone pairs for cloud-based validation. Upon submission, the trained AI model analyzes pairs using their metric features, generating user-specific validation scores returned via a RESTful API. We describe the framework architecture encompassing metric extraction, model training, and cloud deployment. Experimental results demonstrate the framework's ability to adapt effectively to individual validation strategies, optimizing accuracy while significantly reducing inspection effort compared to non-customized clone detection systems. A prototype system demonstrates the feasibility of providing automatically computed AI-based validation scores integrated with existing validation tools.
Downloads
References
Kodhai, E., & Kanmani, S. (2014). Method-level code clone detection through LWH (Light Weight Hybrid) approach. Journal of Software Engineering Research and Development, 2(1), 1-29. https://doi.org/10.1186/s40411-014-0012-8
Walker, A., Cerny, T., & Song, E. (2020). Open-source tools and benchmarks for code-clone detection: Past, present, and future trends. ACM SIGAPP Applied Computing Review, 19(4), 28-39. https://doi.org/10.1145/3381307.3381310
Murakami, H., Hotta, K., Higo, Y., Igaki, H., & Kusumoto, S. (2012, September). Folding repeated instructions for improving token-based code clone detection. In 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation (pp. 64-73). IEEE. https://doi.org/10.1109/SCAM.2012.21
Xue, H., Venkataramani, G., & Lan, T. (2018, June). Clone-hunter: Accelerated bound checks elimination via binary code clone detection. In Proceedings of the 2nd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages (pp. 11-19). https://doi.org/10.1145/3211346.3211347
Tekchandani, R., Bhatia, R., & Singh, M. (2018). Semantic code clone detection for Internet of Things applications using reaching definition and liveness analysis. The Journal of Supercomputing, 74(9), 4199-4226. https://doi.org/10.1007/s11227-016-1832-6
Shobha, G., Rana, A., Kansal, V., & Tanwar, S. (2021). Code clone detection—a systematic review. Emerging Technologies in Data Mining and Information Security: Proceedings of IEMIS 2020, Volume 2, 645-655. https://doi.org/10.1007/978-981-33-4367-2_61.
Roy, C. K., & Cordy, J. R. (2009, April). A mutation/injection-based automatic framework for evaluating code clone detection tools. In 2009 International Conference on Software Testing, Verification, and Validation Workshops (pp. 157-166). IEEE. https://doi.org/10.1109/ICSTW.2009.18
Zhang, F., Khoo, S. C., & Su, X. (2020). Improving maintenance-consistency prediction during code clone creation. IEEE Access, 8, 82085-82099. https://doi.org/10.1109/ACCESS.2020.2990645.
Sargsyan, S., Kurmnagaleev, S., Belevantsev, A., Aslanyan, H., & Baloian, A. (2018). Scalable code clone detection tool based on semantic analysis. Proceedings of the Institute for System Programming of the RAS, 27(1), 39-50. https://doi.org/10.15514/ISPRAS-2015-27(1)-3
Praveen, A., Qamar, S., & Ahamad, S. (2015). Three levels analytical model for monolithic legacy program source code analysis. Journal of Information Engineering and Applications, 2224-5782.
Ahamad, S. (2022). System architecture for brain-computer interface based on machine learning and internet of things. International Journal of Advanced Computer Science and Applications, 13(3).
Gupta, D. N., Anand, R., Ahamad, S., Patil, T., Dhabliya, D., & Gupta, A. (2023, April). Phonocardiographic signal analysis for the detection of cardiovascular diseases. In International Conference on Frontiers of Intelligent Computing: Theory and Applications (pp. 529-538). Springer Nature Singapore. https://doi.org/10.1007/978-981-99-6706-3_47
Ahamad, S. (2022). Evolutionary computing driven extreme learning machine for objected oriented software aging prediction. International Journal of Computer Science & Network Security, 22(2), 232-240.
Dhamodaran, S., Ahamad, S., Ramesh, J. V., Muthugurunathan, G., Manikandan, K., Pramanik, S., & Pandey, D. (2023). Food quality assessment using image processing technique. In Handbook of Research on Thrust Technologies' Effect on Image Processing (pp. 295-309). IGI Global. https://doi.org/10.4018/978-1-6684-8618-4.ch018
Ahamad, S. (2016). Program aging and service crash. International Journal of Computer Applications Technology and Research, 5(7).
Bari, M. A., & Ahamad, D. S. (2011). Code cloning: The analysis, detection and removal. International Journal of Computer Applications, 20(7), 34-38.
Downloads
Published
License
Copyright (c) 2025 Asfa Praveen

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
1. Copyright Retention and Open Access License
Authors retain copyright of their work and grant the journal non-exclusive right of first publication under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
This license allows unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
2. Rights Granted Under CC BY 4.0
Under this license, readers are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, including commercial use
- No additional restrictions — the licensor cannot revoke these freedoms as long as license terms are followed
3. Attribution Requirements
All uses must include:
- Proper citation of the original work
- Link to the Creative Commons license
- Indication if changes were made to the original work
- No suggestion that the licensor endorses the user or their use
4. Additional Distribution Rights
Authors may:
- Deposit the published version in institutional repositories
- Share through academic social networks
- Include in books, monographs, or other publications
- Post on personal or institutional websites
Requirement: All additional distributions must maintain the CC BY 4.0 license and proper attribution.
5. Self-Archiving and Pre-Print Sharing
Authors are encouraged to:
- Share pre-prints and post-prints online
- Deposit in subject-specific repositories (e.g., arXiv, bioRxiv)
- Engage in scholarly communication throughout the publication process
6. Open Access Commitment
This journal provides immediate open access to all content, supporting the global exchange of knowledge without financial, legal, or technical barriers.
