AILGSEApr 14, 2025

AI-Driven Code Refactoring: Using Graph Neural Networks to Enhance Software Maintainability

arXiv:2504.10412v17 citationsh-index: 2
Originality Incremental advance
AI Analysis

It addresses software maintainability issues for software engineers by providing a scalable AI-driven approach, though it is incremental as it builds on existing GNN methods.

This study tackled the problem of code refactoring to enhance software maintainability by using Graph Neural Networks (GNNs) on abstract syntax trees, achieving 92% accuracy and reducing cyclomatic complexity by 35% and coupling by 33%.

This study explores Graph Neural Networks (GNNs) as a transformative tool for code refactoring, using abstract syntax trees (ASTs) to boost software maintainability. It analyzes a dataset of 2 million snippets from CodeSearchNet and a custom 75000-file GitHub Python corpus, comparing GNNs against rule-based SonarQube and decision trees. Metrics include cyclomatic complexity (target below 10), coupling (target below 5), and refactoring precision. GNNs achieve 92% accuracy, reducing complexity by 35% and coupling by 33%, outperforming SonarQube (78%, 16%) and decision trees (85%, 25%). Preprocessing fixed 60% of syntax errors. Bar graphs, tables, and AST visuals clarify results. This offers a scalable AI-driven path to cleaner codebases, which is crucial for software engineering.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes