Code clone detection method and system based on byte code and neural network

The invention belongs to the technical field of code clone detection, and particularly relates to a code clone detection method and system based on byte codes and a neural network. The method comprises the steps: obtaining to-be-detected code data, inputting the to-be-detected code data into a train...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: QIAN YING, DONG SHUANG, HUANG JIANGPING, WAN BANGRUI
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention belongs to the technical field of code clone detection, and particularly relates to a code clone detection method and system based on byte codes and a neural network. The method comprises the steps: obtaining to-be-detected code data, inputting the to-be-detected code data into a trained code clone detection model, and obtaining a detection result, marking and storing the detection result; according to the method, source codes are replaced with byte codes, compared with an existing detection method based on texts and lexical methods, the method has the advantages that code semantic information is fully considered, and the detection effect on type 3 clone and type 4 clone can be improved from the aspects of accuracy, the recall rate, the F1 metric value and the like. 本发明属于代码克隆检测技术领域,具体涉及一种基于字节码和神经网络的代码克隆检测方法及系统,该方法包括:获取待检测的代码数据,将待检测的代码数据输入到训练好的代码克隆检测模型中,得到检测结果,将检测结果进行标记保存;本发明以字节码代替源代码,相较于现有的基于文本和词法的检测方法而言,具有充分考虑代码语义信息的特点,能够从准确率、召回率、F1度量值等方面提升对类型3、类型4克隆的检测效果。