z-logo
open-access-imgOpen Access
Computation of Program Source Code Similarity by Composition of Parse Tree and Call Graph
Author(s) -
Hyun-Je Song,
Seong-Bae Park,
Se Young Park
Publication year - 2015
Publication title -
mathematical problems in engineering
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.262
H-Index - 62
eISSN - 1026-7077
pISSN - 1024-123X
DOI - 10.1155/2015/429807
Subject(s) - computer science , parse tree , parsing , source code , call graph , abstract syntax tree , graph , kernel (algebra) , theoretical computer science , tree kernel , similarity (geometry) , computation , programming language , algorithm , artificial intelligence , polynomial kernel , kernel method , mathematics , discrete mathematics , support vector machine , image (mathematics)
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

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom