Reynaldy Nurcahyo
Unknown Affiliation

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

AST GRAPH FEATURES FOR CODE SIMILARITY SCREENING IN A CONTROLLED SYNTHETIC STUDY Reynaldy Nurcahyo; Anggi Rizky Windra Putri; Tasiu Abdullahi Yusuf
International Journal of Cyber Engineering Jil. 2 No. 1 (2026): International Journal of Cyber Engineering - June Edtition
Publisher : PT Baramedia Literasi Digital

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.68404/ijce.v2i1.25

Abstract

Source-code similarity screening must distinguish lexical resemblance, structural similarity, behavioural agreement, and evidence of plagiarism. This study evaluates how identifier normalisation and abstract syntax tree (AST) graph features respond to controlled code transformations. A reproducible synthetic corpus contains 140 Python programs derived from 20 algorithm roots and 160 labelled pairs. Ten roots supply 80 validation pairs for threshold selection, while ten disjoint roots supply 80 test pairs. Positive pairs agree on 200 bounded input cases, whereas each negative pair has a recorded behavioural counterexample. Five deterministic representations are compared using cosine similarity: raw token trigrams, normalised token trigrams, an AST node histogram, and two graph-refinement variants with or without literal values. Normalised tokens achieved the highest test F1-score of 0.857, compared with 0.655 for raw tokens, 0.659 for the node histogram, and 0.667 for each graph-refinement variant. The identical graph F1-scores concealed opposite failure modes: the literal-preserving representation missed 20 positive pairs, whereas the literal-blind representation accepted all 40 negative pairs. Removing literal values therefore made behaviour-changing mutations indistinguishable from their source graphs. These findings identify representation and threshold trade-offs rather than demonstrating general superiority of graph methods. The contribution is an auditable pilot protocol and a transformation-level analysis of structural similarity failures.