Introducing CC-SeDE: Code Clone Semantic Difficulty Estimator for Effective Type-Wise Classification of Similar Source Code Fragments
Article Information
Abstract
Code clone detection aims to identify duplicate code fragments within source code repositories. Existing models give every code pair in a dataset the same learning weight and ignore the fact that pairs differ in semantic complexity. This work introduces a parameter, the Code Clone Semantic Difficulty Estimator (CC-SeDE), to quantify the degree of semantic divergence between the two fragments of a code pair. Rather than treating semantic divergence as a direct proxy for classification difficulty, the approach provides a continuous measure that allows clone pairs to be characterized and stratified across the divergence spectrum. In the validation protocol the parameter is computed from token overlap and relative code-length difference, so that it does not depend on pretrained embedding representations. Experiments on the BigCloneBench benchmark examine the distribution of the parameter, its variation across clone categories, clone density across parameter intervals, and its relationship with lexical and structural characteristics. Higher values of the parameter are associated with greater lexical and structural divergence. These findings suggest that the parameter is useful as an interpretable indicator for identifying and analyzing highly divergent clone pairs, which are hypothesized to be harder to detect. The parameter is introduced and evaluated as a conceptual and descriptive measure of code divergence, not as an empirically validated estimator of semantic complexity or of model-specific classification difficulty. The work provides a basis for difficulty-aware learning in code clone detection.
Graphical Abstract
Keywords
Data Availability Statement
Funding
Conflicts of Interest
AI Use Statement
Ethical Approval and Consent to Participate
References
- Ain, Q. U., Butt, W. H., Anwar, M. W., Azam, F., & Maqbool, B. (2019). A systematic review on code clone detection. IEEE Access, 7, 86121-86144.
[CrossRef] [Google Scholar] - Lei, M., Li, H., Li, J., Aundhkar, N., & Kim, D.-K. (2022). Deep learning application on code clone detection: A review of current knowledge. Journal of Systems and Software, 184, 111141.
[CrossRef] [Google Scholar] - Bano, Z., & Ansari, M. Z. (2024). Code clone detection using machine learning: Brief overview and latest developments. In 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT) (pp. 1-6). IEEE.
[CrossRef] [Google Scholar] - Kamiya, T., Kusumoto, S., & Inoue, K. (2002). CCFinder: A multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering, 28(7), 654-670.
[CrossRef] [Google Scholar] - Sajnani, H., Saini, V., Svajlenko, J., Roy, C. K., & Lopes, C. V. (2016, May). SourcererCC: Scaling code clone detection to big-code. In Proceedings of the 38th International Conference on Software Engineering (pp. 1157-1168).
[CrossRef] [Google Scholar] - Roy, C. K., & Cordy, J. R. (2008, June). NICAD: Accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization. In 2008 16th IEEE International Conference on Program Comprehension (pp. 172-181). IEEE.
[CrossRef] [Google Scholar] - Jiang, L., Misherghi, G., Su, Z., & Glondu, S. (2007, May). Deckard: Scalable and accurate tree-based detection of code clones. In 29th International Conference on Software Engineering (ICSE'07) (pp. 96-105). IEEE.
[CrossRef] [Google Scholar] - Zhang, Z., & Saber, T. (2025). Machine learning approaches to code similarity measurement: A systematic review. IEEE Access, 13, 51729-51764.
[CrossRef] [Google Scholar] - Alon, U., Zilberstein, M., Levy, O., & Yahav, E. (2019). code2vec: Learning distributed representations of code. Proceedings of the ACM on Programming Languages, 3(POPL), 1-29.
[CrossRef] [Google Scholar] - Zhang, J., Wang, X., Zhang, H., Sun, H., Wang, K., & Liu, X. (2019, May). A novel neural source code representation based on abstract syntax tree. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) (pp. 783-794). IEEE.
[CrossRef] [Google Scholar] - Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., & Zhou, M. (2020, November). CodeBERT: A pre-trained model for programming and natural languages. In Findings of the Association for Computational Linguistics: EMNLP 2020 (pp. 1536-1547).
[CrossRef] [Google Scholar] - Guo, D., Ren, S., Lu, S., Feng, Z., Tang, D., Liu, S., ... & Zhou, M. (2020). Graphcodebert: Pre-training code representations with data flow. arXiv preprint arXiv:2009.08366.
[CrossRef] [Google Scholar] - Bengio, Y., Louradour, J., Collobert, R., & Weston, J. (2009). Curriculum learning. In Proceedings of the 26th Annual International Conference on Machine Learning (pp. 41-48).
[CrossRef] [Google Scholar] - Yeung, C. Y., Lee, J. S., & Tsou, B. K. (2019). Difficulty-aware distractor generation for gap-fill items. In Proceedings of the 17th Annual Workshop of the Australasian Language Technology Association (pp. 159-164). https://aclanthology.org/U19-1021.pdf
[Google Scholar] - Li, X., Liu, Z., Luo, P., Loy, C. C., & Tang, X. (2017). Not all pixels are equal: Difficulty-aware semantic segmentation via deep layer cascade. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 3193-3202).
[Google Scholar] - Xie, S., Feng, Z., Chen, Y., Sun, S., Ma, C., & Song, M. (2020, November). DEAL: Difficulty-aware active learning for semantic segmentation. In Asian Conference on Computer Vision (pp. 672-688). Cham: Springer International Publishing.
[CrossRef] [Google Scholar] - Zhang, Z., Han, J., Coutinho, E., & Schuller, B. (2019). Dynamic difficulty awareness training for continuous emotion prediction. IEEE Transactions on Multimedia, 21(5), 1289-1301.
[CrossRef] [Google Scholar] - Mahmoud, A., & Bradshaw, G. (2015). Estimating semantic relatedness in source code. ACM Transactions on Software Engineering and Methodology (TOSEM), 25(1), 1-35.
[CrossRef] [Google Scholar] - Cer, D., Diab, M., Agirre, E., Lopez-Gazpio, I., & Specia, L. (2017, August). SemEval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017) (pp. 1-14).
[CrossRef] [Google Scholar] - Khant, K. S., Lin, H. Y., & Thongtanunam, P. (2025, April). Should Code Models Learn Pedagogically? A Preliminary Evaluation of Curriculum Learning for Real-World Software Engineering Tasks. In 2025 IEEE/ACM 22nd International Conference on Mining Software Repositories (MSR) (pp. 249-254). IEEE.
[CrossRef] [Google Scholar] - Svajlenko, J., Islam, J. F., Keivanloo, I., Roy, C. K., & Mia, M. M. (2014, September). Towards a big data curated benchmark of inter-project code clones. In 2014 IEEE International Conference on Software Maintenance and Evolution (pp. 476-480). IEEE.
[CrossRef] [Google Scholar] - Rattan, D., Bhatia, R., & Singh, M. (2013). Software clone detection: A systematic review. Information and Software Technology, 55(7), 1165-1199.
[CrossRef] [Google Scholar] - Lu, S., Guo, D., Ren, S., Huang, J., Svyatkovskiy, A., Blanco, A., ... & Liu, S. (2021). Codexglue: A machine learning benchmark dataset for code understanding and generation. arXiv preprint arXiv:2102.04664.
[CrossRef] [Google Scholar] - Krinke, J., & Ragkhitwetsagul, C. (2022, October). BigCloneBench considered harmful for machine learning. In 2022 IEEE 16th International Workshop on Software Clones (IWSC) (pp. 1-7). IEEE.
[CrossRef] [Google Scholar]
Cite This Article
TY - JOUR AU - Bano, Zaira AU - Ansari, Mohd Zeeshan PY - 2026 DA - 2026/11/20 TI - Introducing CC-SeDE: Code Clone Semantic Difficulty Estimator for Effective Type-Wise Classification of Similar Source Code Fragments JO - Intelligent Computing for Engineering T2 - Intelligent Computing for Engineering JF - Intelligent Computing for Engineering VL - 1 IS - 1 SP - 30 EP - 42 DO - 10.62762/ICE.2026.187437 UR - https://www.icck.org/article/abs/ice.2026.187437 KW - code clone detection KW - code clone classification KW - semantic similarity KW - difficulty-aware learning AB - Code clone detection aims to identify duplicate code fragments within source code repositories. Existing models give every code pair in a dataset the same learning weight and ignore the fact that pairs differ in semantic complexity. This work introduces a parameter, the Code Clone Semantic Difficulty Estimator (CC-SeDE), to quantify the degree of semantic divergence between the two fragments of a code pair. Rather than treating semantic divergence as a direct proxy for classification difficulty, the approach provides a continuous measure that allows clone pairs to be characterized and stratified across the divergence spectrum. In the validation protocol the parameter is computed from token overlap and relative code-length difference, so that it does not depend on pretrained embedding representations. Experiments on the BigCloneBench benchmark examine the distribution of the parameter, its variation across clone categories, clone density across parameter intervals, and its relationship with lexical and structural characteristics. Higher values of the parameter are associated with greater lexical and structural divergence. These findings suggest that the parameter is useful as an interpretable indicator for identifying and analyzing highly divergent clone pairs, which are hypothesized to be harder to detect. The parameter is introduced and evaluated as a conceptual and descriptive measure of code divergence, not as an empirically validated estimator of semantic complexity or of model-specific classification difficulty. The work provides a basis for difficulty-aware learning in code clone detection. SN - 5 Articles Required PB - Institute of Central Computation and Knowledge LA - English ER -
@article{Bano2026Introducin,
author = {Zaira Bano and Mohd Zeeshan Ansari},
title = {Introducing CC-SeDE: Code Clone Semantic Difficulty Estimator for Effective Type-Wise Classification of Similar Source Code Fragments},
journal = {Intelligent Computing for Engineering},
year = {2026},
volume = {1},
number = {1},
pages = {30-42},
doi = {10.62762/ICE.2026.187437},
url = {https://www.icck.org/article/abs/ice.2026.187437},
abstract = {Code clone detection aims to identify duplicate code fragments within source code repositories. Existing models give every code pair in a dataset the same learning weight and ignore the fact that pairs differ in semantic complexity. This work introduces a parameter, the Code Clone Semantic Difficulty Estimator (CC-SeDE), to quantify the degree of semantic divergence between the two fragments of a code pair. Rather than treating semantic divergence as a direct proxy for classification difficulty, the approach provides a continuous measure that allows clone pairs to be characterized and stratified across the divergence spectrum. In the validation protocol the parameter is computed from token overlap and relative code-length difference, so that it does not depend on pretrained embedding representations. Experiments on the BigCloneBench benchmark examine the distribution of the parameter, its variation across clone categories, clone density across parameter intervals, and its relationship with lexical and structural characteristics. Higher values of the parameter are associated with greater lexical and structural divergence. These findings suggest that the parameter is useful as an interpretable indicator for identifying and analyzing highly divergent clone pairs, which are hypothesized to be harder to detect. The parameter is introduced and evaluated as a conceptual and descriptive measure of code divergence, not as an empirically validated estimator of semantic complexity or of model-specific classification difficulty. The work provides a basis for difficulty-aware learning in code clone detection.},
keywords = {code clone detection, code clone classification, semantic similarity, difficulty-aware learning},
issn = {5 Articles Required},
publisher = {Institute of Central Computation and Knowledge}
}
Article Metrics
Publisher's Note
ICCK stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and Permissions
Copyright © 2026 by the Author(s). Published by Institute of Central Computation and Knowledge. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.
Portico