EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Semantic code clone detection using hybrid intermediate representations and BiLSTM networks

M Shahbaz Ismail, Sara Shahzad iD, Fahmi H Quradaa iD

PLOS One · 20.01.2026 · 21 (1) · e0340971

DOI: 10.1371/journal.pone.0340971 ↗

Kurz gefasst

Fachartikel in der Zeitschrift PLOS One, online erschienen am 20.01.2026. Verfasst von M Shahbaz Ismail und 2 weiteren Autor:innen. Beteiligte Einrichtung: Department of Computer Science, University of Peshawar, Peshawar, Pakistan. Hauptthemen laut MEDLINE: Software, Semantics. Die Arbeit wurde bisher 2-mal zitiert (Crossref) und nennt 105 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractSchlagwörterBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Semantic code clone detection plays an essential role in software maintenance and quality assurance, as it helps uncover fragments of code that express the same logic even when their syntax has been altered or deliberately obfuscated. In this study, we propose a framework that combines hybrid representation learning with deep bidirectional LSTM networks. The model is applied to two intermediate forms of Java programs—Baf and Jimple—extracted through the Soot framework, which together provide both syntactic structure and semantic detail. This design allows the method to cope with difficult obfuscation strategies such as polymorphism and metamorphism. In our experiments, the framework showed strong and stable performance. Training accuracy reached about 98%, while validation accuracy stayed above 95%, with good generalization across the different clone categories described in the Twilight-Zone taxonomy. When compared with other recurrent models, the BiLSTM consistently performed better, especially when combined with multiple intermediate representations and attention mechanisms. On the BigCloneBench dataset, the approach matched or exceeded the results of state-of-the-art tools, achieving recall and F1-scores of up to 97% on challenging clone types. These findings confirm the practical applicability of hybrid intermediate representations for semantic clone detection and suggest promising directions for future research using transformer-based models and large-scale deployment.

Schlagwörter

MeSH-Schlagwörter (MEDLINE)

SoftwareSemanticsLong Short Term MemoryRepresentation Machine LearningAlgorithms

Autor:innen und Institutionen

  • Department of Computer Science, University of Peshawar, Peshawar, Pakistan.
  • Department of Computer Science, Aden Community College, Aden, Yemen.

ORCID-Profile: Sara Shahzad, Fahmi H Quradaa

Zitieren

APA

Shahbaz Ismail, M., Shahzad, S., & Quradaa, F. H. (2026). Semantic code clone detection using hybrid intermediate representations and BiLSTM networks. PLOS One, 21(1), e0340971. https://doi.org/10.1371/journal.pone.0340971

Vancouver

Shahbaz Ismail M, Shahzad S, Quradaa FH. Semantic code clone detection using hybrid intermediate representations and BiLSTM networks. PLOS One. 2026;21(1):e0340971. doi:10.1371/journal.pone.0340971

BibTeX
@article{ShahbazIsmail2026,
  author = {Shahbaz Ismail, M and Shahzad, Sara and Quradaa, Fahmi H},
  title = {Semantic code clone detection using hybrid intermediate representations and BiLSTM networks},
  journal = {PLOS One},
  year = {2026},
  volume = {21},
  number = {1},
  pages = {e0340971},
  doi = {10.1371/journal.pone.0340971}
}
Kostenlos starten →