arrow
Return

Java Code Clone Detection by Exploiting Semantic and Syntax Information From Intermediate Code-Based Graph

delete2023-06-01
delete11
PRE
AI
D
Dawei Yuan
S
Sen Fang
T
Tao Zhang *
周旭 cover
周旭 (Zhou Xu)
X
Xiapu Luo
DOI:10.1109/TR.2022.3176922delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code clone detection plays a critical role in the field of software engineering. To achieve this goal, developers are required to have rich development experience for finding the functional clone code. However, this is unfriendly to novice developers. Although many approaches were proposed to automatically detect code clones, the results are not satisfactory. A major reason is that it is difficult to extract syntax and semantic information from the source code. To resolve this problem, in this article, we develop a novel graph representation approach based on intermediate code to detect the functional code clones. This graph representation is built based on intermediate code compiled from the source code. By using it, we can easily utilize graph embedding techniques to extract syntactic and semantic features from abstract syntax tree, control flow graph, and DFG generated from intermediate code. After that, we use the Softmax classifier to detect functional code clone pairs. We evaluate the performance of the proposed graph representation approach based on intermediate code for the code clone detection task on the BigCloneBench dataset. In order to improve performance, the embedded representation of intermediate code is initialized based on pretrained vectors learned from the collected LLVM IR dataset in advance. The experimental results show that our proposed intermediate code-based graph approach performs better than existing functional code clone detection approaches. Especially for the type-4 code clone detection, our approach outperforms the baseline approaches by an average of 33.49% in the term of F1 score.
Keywords:
Codes
Cloning
Syntactics
Semantics
Data mining
Task analysis
Feature extraction
Abstract syntax tree (AST)
clone code detection
control flow graph (CFG)
data flow graph (DFG)
graph embedding
intermediate code
errShare
errSave
Graph-based code semantics learning for efficient semantic code clone detection
err2023-04-01
err12
PREAI
errYu, Dongjin; Yang, Quanxin; Chen, Xin; Chen, Jie; Xu, Yihang
errShare
errSave
Goner: Building Tree-Based N-Gram-Like Model for Semantic Code Clone Detection
err2024-06-01
err2
PREAI
errWu, Yueming; Feng, Siyue; Suo, Wenqi; Zou, Deqing; Jin, Hai
errShare
errSave
Fast Code Clone Detection Based on Weighted Recursive Autoencoders
err2019-01-01
err31
errOAAI
errZeng, Jie; Ben, Kerong; Li, Xiaowei; Zhang, Xian
errShare
errSave
A detection framework for semantic code clones and obfuscated code
err2018-05-01
err28
PREAI
errSheneamer, Abdullah; Roy, Swarup; Kalita, Jugal
errShare
errSave
errShare
errSave

Journal

IEEE Transactions on Reliability cover
IEEE Transactions on Reliability
IF:
5.7
Papers:
2.8K
Citations:
1.1W

Organization

chongqing university cover
chongqing university
Scholars:
7.1K
Papers: 2.2K
Citations: 3.7W
H
Hong Kong Polytechnic University
Scholars:
2.2K
Papers: 1.1K
Citations: 4.1W
Cited Papers

Cited Papers

errShare
errSave
Single-transverse-mode InGaAsP-InP edge-emitting bipolar cascade laser
err2005-11-01
err0
PREAI
errF. Dross; F. van Dijk; O. Parillaud; B. Vinter; N. Vodjdani
errShare
errSave
Sustainability of the community-based ecotourism development in the Aksu-Zhabagly nature reserve, Kazakhstan
err2022-03-07
err0
errOAAI
errImanaly Akbar; Sergeyeva Aigul Maksatovna; Myrzaliyeva Zabira Kazbekkyzy; Tazhekova Akmaral Zhaksybekkyzy; Saulembaev Altynbai Tagabayevich; Mominov Serik Abdukarimovich
errShare
errSave
Choices, Values, and Frames
err
IF0
err2019-02-01
err0
PREAI
err
errShare
errSave
researcher View more