Skip to main navigation Skip to search Skip to main content

Computation of program source code similarity by composition of parse tree and call graph

  • Hyun Je Song
  • , Seong Bae Park*
  • , Se Young Park
  • *Corresponding author for this work
  • Kyungpook National University

Research output: Contribution to journalJournal articlepeer-review

Abstract

This paper proposes a novel method to compute how similar two program source codes are. Since a program source code is represented as a structural form, the proposed method adopts convolution kernel functions as a similarity measure. Actually, a program source code has two kinds of structural information. One is syntactic information and the other is the dependencies of function calls lying on the program. Since the syntactic information of a program is expressed as its parse tree, the syntactic similarity between two programs is computed by a parse tree kernel. The function calls within a program provide a global structure of a program and can be represented as a graph. Therefore, the similarity of function calls is computed with a graph kernel. Then, both structural similarities are reflected simultaneously into comparing program source codes by composing the parse tree and the graph kernels based on a cyclomatic complexity. According to the experimental results on a real data set for program plagiarism detection, the proposed method is proved to be effective in capturing the similarity between programs. The experiments show that the plagiarized pairs of programs are found correctly and thoroughly by the proposed method.

Original languageEnglish
Article number429807
JournalMathematical Problems in Engineering
Volume2015
DOIs
StatePublished - 2015

Fingerprint

Dive into the research topics of 'Computation of program source code similarity by composition of parse tree and call graph'. Together they form a unique fingerprint.

Cite this