Validating and Detecting User-Specific Code Clones: An AI Framework Leveraging Metric-Based Feature Vectors

Authors

DOI:

https://doi.org/10.35870/ijsecs.v5i2.4431

Keywords:

Feature Vectors, RESTful API, Artificial Intelligence, User-Specific Code, Clone Pairs

Abstract

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

Download data is not yet available.

Author Biography

  • Asfa Praveen, Mustaqbal University

    Assistant Professor, Department of Computer Science, College of Engineering and Computer Science, Mustaqbal University, Buraidah, Al Qassim, Saudi Arabia

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

2025-08-01

How to Cite

Praveen, A. (2025). Validating and Detecting User-Specific Code Clones: An AI Framework Leveraging Metric-Based Feature Vectors. International Journal Software Engineering and Computer Science (IJSECS), 5(2), 599-611. https://doi.org/10.35870/ijsecs.v5i2.4431