Enhancing Confidence in Software Refactoring by Tracking Dataflows in Code Property Graphs
Name
Xiao_2.pdf
Size
206.59 KB
Format
Adobe PDF
Checksum (MD5)
82e4b05be42d23cf096dc73a1d94fa8f
Author(s) •
Xiao, Jimmy
Mohindra, Sanjeev
Date Issued
August 20, 2026
Abstract
Software refactoring is an essential practice for reducing and managing technical debt in software projects, but it carries the inherent risk of inadvertently altering a program's external behavior. This paper introduces a novel approach to enhance refactoring confidence b y t racking d ataflows within Code Property Graphs. By defining software boundaries through internal and external function calls, our algorithm serializes dataflows between external sources and sinks before a refactoring operation and verifies t heir p ersistence a fterward. T o handle the complexity of real-world applications, we detail several algorithmic refinements, i ncluding c ompiler-aided e xternal function identification, d iff-based fi ltering, an d pa rallel pr ocessing. We evaluate our approach against the SWE-refactor benchmark, achieving an 86.5 percent successful verification r ate across 602 real-world Java refactoring operations. Additionally, an in-depth case study on the SQLite codebase demonstrated 95 percent accuracy in distinguishing between valid and intentionally broken refactorings generated by large language models. Our findings s uggest t hat t racking d ataflows vi a Co de Property Graphs provides a highly effective heuristic for human engineers and automated agents to ensure behavioral consistency during refactoring operations.
Subjects
refactoring
technical-debt
code property graph
software
source code
dataflow a nalysis
p rogram verification
MIT Department
Lincoln Laboratory
Terms of Use
All rights reserved
Persistent DSpace Link