Introducing CC-SeDE: Code Clone Semantic Difficulty Estimator for Effective Type-Wise Classification of Similar Source Code Fragments
Research Article  ·  Published: 20 November 2026
Issue cover
Intelligent Computing for Engineering
Volume 1, Issue 1, 2026: 30-42
Research Article Open Access

Introducing CC-SeDE: Code Clone Semantic Difficulty Estimator for Effective Type-Wise Classification of Similar Source Code Fragments

1 Department of Computer Engineering, Jamia Millia Islamia, New Delhi 110025, India
* Corresponding Author: Mohd Zeeshan Ansari, [email protected]
Volume 1, Issue 1
You have full access to this open access article · CC BY 4.0 License

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

Introducing CC-SeDE: Code Clone Semantic Difficulty Estimator for Effective Type-Wise Classification of Similar Source Code Fragments

Keywords

code clone detection code clone classification semantic similarity difficulty-aware learning

Data Availability Statement

The dataset used in this study is publicly available. The CodeXGLUE version of BigCloneBench can be obtained from the Hugging Face repository (https://huggingface.co/datasets/google/code_x_glue_cc_clone_detection_big_clone_bench), and the formulas used to compute token overlap, length difference ratio and CC-SeDE are given in Section 4.

Funding

This work was supported without any funding.

Conflicts of Interest

The authors declare no conflicts of interest.

AI Use Statement

The authors declare that ChatGPT (OpenAI) was used for language editing and rephrasing of selected portions of the manuscript. The authors have carefully reviewed, revised, and verified the AI-assisted output and take full responsibility for the content of the manuscript.

Ethical Approval and Consent to Participate

Not applicable. This study analyzed only a publicly available source-code benchmark and involved no human participants or animals.

References

  1. 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]
  2. 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]
  3. 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]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. Zhang, Z., & Saber, T. (2025). Machine learning approaches to code similarity measurement: A systematic review. IEEE Access, 13, 51729-51764.
    [CrossRef] [Google Scholar]
  9. 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]
  10. 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]
  11. 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]
  12. 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]
  13. 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]
  14. 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]
  15. 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]
  16. 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]
  17. 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]
  18. 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]
  19. 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]
  20. 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]
  21. 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]
  22. Rattan, D., Bhatia, R., & Singh, M. (2013). Software clone detection: A systematic review. Information and Software Technology, 55(7), 1165-1199.
    [CrossRef] [Google Scholar]
  23. 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]
  24. 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

APA Style
Bano, Z., & Ansari, M. Z. (2026). Introducing CC-SeDE: Code Clone Semantic Difficulty Estimator for Effective Type-Wise Classification of Similar Source Code Fragments. Intelligent Computing for Engineering, 1(1), 30-42. https://doi.org/10.62762/ICE.2026.187437
Export Citation
RIS Format
Compatible with EndNote, Zotero, Mendeley, and other reference managers
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  - 
BibTeX Format
Compatible with LaTeX, BibTeX, and other reference managers
@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

Citations
Crossref
0
Scopus
0
Views
4
PDF Downloads
0

Publisher's Note

ICCK stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and Permissions

CC BY 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.
Intelligent Computing for Engineering
Intelligent Computing for Engineering
ISSN: 5 Articles Required (Online)
Portico
Preserved at
Portico