<p>Type-4 code clone detection is difficult because a lot of conventional approaches based only on superficial syntactic and textual analysis, usually fail to achieve good performance for clones with similar meaning but with different syntax. To address this issue, a novel hybrid approach is proposed which aids in capturing the semantic relationships that exist within code by combining abstract syntax tree (AST) analysis with program dependency graph (PDG) representations. The code is initially pre-processed by partitioning data sets and classifying pairs with low similarity after applying semantic signatures. Then, AST and PDG are obtained to extract features from the code. It is followed by integration of graph neural networks (GNNs) which seamlessly carry node information aggregation in PDGs for providing sufficient control and data dependencies through message-passing mechanism. Through experiments performed on public datasets, the proposed approach shows better results thereby demonstrating the high effectiveness of the proposed framework for detecting large scale complex semantic clones in software systems.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A Semantic-driven approach to detect Type-4 code clones by using AST and PDG

  • Geetika,
  • Navdeep Kaur,
  • Amandeep Kaur

摘要

Type-4 code clone detection is difficult because a lot of conventional approaches based only on superficial syntactic and textual analysis, usually fail to achieve good performance for clones with similar meaning but with different syntax. To address this issue, a novel hybrid approach is proposed which aids in capturing the semantic relationships that exist within code by combining abstract syntax tree (AST) analysis with program dependency graph (PDG) representations. The code is initially pre-processed by partitioning data sets and classifying pairs with low similarity after applying semantic signatures. Then, AST and PDG are obtained to extract features from the code. It is followed by integration of graph neural networks (GNNs) which seamlessly carry node information aggregation in PDGs for providing sufficient control and data dependencies through message-passing mechanism. Through experiments performed on public datasets, the proposed approach shows better results thereby demonstrating the high effectiveness of the proposed framework for detecting large scale complex semantic clones in software systems.