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

要約

この研究では、グラフニューラルネットワーク(GNNS)をコードリファクタリングの変革ツールとして調査します。抽象的構文ツリー(AST)を使用して、ソフトウェアの保守性を高めます。
CodeSearchNetから200万個のスニペットのデータセットとカスタム75000ファイルのGithub Python Corpusを分析し、GNNをルールベースのSonarqubeとDecision Treesと比較します。
メトリックには、環状複雑さ(10未満のターゲット)、カップリング(5未満のターゲット)、およびリファクタリング精度が含まれます。
GNNSは92%の精度を達成し、複雑さを35%減らし、33%減少し、Sonarqube(78%、16%)と決定木(85%、25%)を上回ります。
前処理は、構文エラーの60%を固定しました。
棒グラフ、テーブル、およびASTビジュアルは結果を明確にします。
これにより、ソフトウェアエンジニアリングに不可欠なクリーンなコードベースへのスケーラブルなAI駆動型パスが提供されます。

要約(オリジナル)

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.

arxiv情報

著者 Gopichand Bandarupalli
発行日 2025-04-14 16:58:54+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.LG, cs.SE パーマリンク