EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

A novel code representation for detecting Java code clones using high-level and abstract compiled code representations

Fahmi H Quradaa iD, Sara Shahzad, Rashad Saeed iD, Mubarak M Sufyan iD

PLOS ONE · 2024

DOI: 10.1371/journal.pone.0302333 ↗

Kurz gefasst

Fachartikel in der Zeitschrift PLOS ONE, 2024. Verfasst von Fahmi H Quradaa und 3 weiteren Autor:innen. Beteiligte Einrichtung: Department of Computer Science, University of Peshawar, Peshawar, Pakistan. Hauptthemen laut MEDLINE: Semantics, Software. Die Arbeit wurde bisher 5-mal zitiert (Crossref) und nennt 79 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractSchlagwörterBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

In software development, it’s common to reuse existing source code by copying and pasting, resulting in the proliferation of numerous code clones—similar or identical code fragments—that detrimentally affect software quality and maintainability. Although several techniques for code clone detection exist, many encounter challenges in effectively identifying semantic clones due to their inability to extract syntax and semantics information. Fewer techniques leverage low-level source code representations like bytecode or assembly for clone detection. This work introduces a novel code representation for identifying syntactic and semantic clones in Java source code. It integrates high-level features extracted from the Abstract Syntax Tree with low-level features derived from intermediate representations generated by static analysis tools, like the Soot framework. Leveraging this combined representation, fifteen machine-learning models are trained to effectively detect code clones. Evaluation on a large dataset demonstrates the models’ efficacy in accurately identifying semantic clones. Among these classifiers, ensemble classifiers, such as the LightGBM classifier, exhibit exceptional accuracy. Linearly combining features enhances the effectiveness of the models compared to multiplication and distance combination techniques. The experimental findings indicate that the proposed method can outperform the current clone detection techniques in detecting semantic clones.

Schlagwörter

MeSH-Schlagwörter (MEDLINE)

SemanticsSoftwareProgramming LanguagesMachine LearningAlgorithms

Autor:innen und Institutionen

  • Department of Computer Science, University of Peshawar, Peshawar, Pakistan.
  • Department of Computer Science, Aden Community College, Aden, Yemen.
  • Department of Networks and Cyber Security, AlJanad University Of Science and Technology, Taiz, Yemen.

ORCID-Profile: Fahmi H Quradaa, Rashad Saeed, Mubarak M Sufyan

Zitieren

APA

Quradaa, F. H., Shahzad, S., Saeed, R., & Sufyan, M. M. (2024). A novel code representation for detecting Java code clones using high-level and abstract compiled code representations. PLOS ONE. https://doi.org/10.1371/journal.pone.0302333

Vancouver

Quradaa FH, Shahzad S, Saeed R, Sufyan MM. A novel code representation for detecting Java code clones using high-level and abstract compiled code representations. PLOS ONE. 2024. doi:10.1371/journal.pone.0302333

BibTeX
@article{Quradaa2024,
  author = {Quradaa, Fahmi H and Shahzad, Sara and Saeed, Rashad and Sufyan, Mubarak M},
  title = {A novel code representation for detecting Java code clones using high-level and abstract compiled code representations},
  journal = {PLOS ONE},
  year = {2024},
  doi = {10.1371/journal.pone.0302333}
}
Kostenlos starten →