Skip to content
Open access

AST GRAPH FEATURES FOR CODE SIMILARITY SCREENING IN A CONTROLLED SYNTHETIC STUDY

Oct 2026 · International Journal of Cyber Engineering · Vol 2, pp. 24-33 · 0 citations · 20 references

TL;DR

These findings identify representation and threshold trade-offs rather than demonstrating general superiority of graph methods.

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.

Read PDF

Similar papers

Review Open access Oct 2026

Revisiting Graph Representations for ML-Based Binary Code Similarity Detection: A Systematic Study

A systematic study of graph representations for ML-based BCSD is presented, finding that no single representation is universally dominant, that distinct topologies exhibit unique strengths depending on the evaluation scenario, and that their rankings are largely backbone-stable despite varying absolute performance.

Teng-Teng Yang, Yi-Kun Hu, Ji-Can Zhang et al. · 0 citations
Sep 2026

Detecting Argument-Swap Bugs Using Context-Enhanced Code Representations

Names of source code elements convey rich semantic information and have been widely used in software engineering tasks such as bug detection, code completion, type prediction, and code classification. Prior studies exploit lexical similarity between method arguments and formal parameter names to detect bugs caused by i...

Subrata Das, Ali Aman, Muhammad Asaduzzaman et al. · 0 citations
#natural language process... Preprint Oct 2026

Keyword Harnesses Fail Open: A Cheap Diagnostic Ladder for Tool-Use Claims in Small Language Models

Keyword-matching benchmarks can credit small models for tool use they never perform. We document such a false positive in a matched-architecture pair of Spanish security language models and propose a ladder of strict, cheap diagnostics. A 661.6M parameter model (approx. 65% code/technical text; no dedicated SFT) and a...

Juan S. Santillana · 0 citations
Review Oct 2026

OneCodeReviewBench: Typed Decisions for Code Review and Search

This work presents OneCodeReviewBench, 1,968 synthetic cases across 12 programming languages and YAML, with Boolean, categorical, and ordered answers, and compares ten model--adapter systems on the same cases and contracts.

Mohamad Mohebifar, A. Bit · 0 citations
Conference Open access Sep 2026

Annotation Light Requirements-to-Test Traceability with Hybrid Retrieval and LLM Validation

Software projects often maintain large requirement and test repositories, yet explicit trace links between them are incomplete or inconsistently maintained. This paper presents a requirements-to-test traceability pipeline that ranks candidate links for natural-language requirements using hybrid retrieval and optional L...

Arda Barış Özten, Eren Tarak, H. Kilinc · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.