Skip to main navigation Skip to search Skip to main content

Code Property Graph Meets Typestate: A Scalable Framework to Behavioral Bug Detection

  • Beihang University
  • Huawei Technologies Co., Ltd.

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Behavioral bugs caused by incorrect state changes are particularly challenging to identify because they depend on specific code execution paths. While code property graph (CPG) combine multiple code views through abstract syntax trees (AST), their built-in redundancy from syntax details and fixed connection rules make them hard to scale-a major problem when analyzing large software systems. We introduce QVoG, a new framework that improves CPG by combining graphbased code analysis with state behavior checking. Our main innovation lies in simplifying the CPG at the statement level by consolidating control and data flows into meaningful code blocks and optimizing the edges. This approach reduces the graph size by more than 10 times compared to AST-based methods while maintaining accuracy. This lightweight design allows easy integration of state tracking, where we match object lifecycle rules to simplified CPG connections using replaceable patterns. The combination of streamlined graphs and state-aware analysis helps QVoG effectively find difficult-to-identify behavioral bugs, successfully detecting 25 issues (including 17 confirmed cases and 2 official CVE) in real-world projects. Importantly, QVoG analyzes raw source code without requiring compilation and supports projects exceeding 1 million lines of code.

Original languageEnglish
Title of host publicationProceedings - 2025 IEEE International Conference on Software Maintenance and Evolution, ICSME 2025
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages98-109
Number of pages12
ISBN (Electronic)9798331595876
DOIs
StatePublished - 2025
Event41st IEEE International Conference on Software Maintenance and Evolution, ICSME 2025 - Auckland, New Zealand
Duration: 7 Sep 202512 Sep 2025

Publication series

NameProceedings - 2025 IEEE International Conference on Software Maintenance and Evolution, ICSME 2025

Conference

Conference41st IEEE International Conference on Software Maintenance and Evolution, ICSME 2025
Country/TerritoryNew Zealand
CityAuckland
Period7/09/2512/09/25

Keywords

  • Bug Detection
  • Code Property Graph
  • Typestate Analysis

Fingerprint

Dive into the research topics of 'Code Property Graph Meets Typestate: A Scalable Framework to Behavioral Bug Detection'. Together they form a unique fingerprint.

Cite this