ChatPaper.aiChatPaper

研究テーマ:LLMベースのマルチエージェントを用いたコードにおける例外処理の強化

Seeker: Enhancing Exception Handling in Code with LLM-based Multi-Agent Approach

October 9, 2024
著者: Xuanming Zhang, Yuxuan Chen, Yuan Yuan, Minlie Huang
cs.AI

要旨

現実世界のソフトウェア開発において、不適切または不足した例外処理はコードの堅牢性と信頼性に深刻な影響を与える可能性があります。例外処理メカニズムは、開発者が高い基準に従って例外を検出、キャプチャし、管理する必要がありますが、多くの開発者がこれらのタスクに苦労しており、脆弱なコードを生み出しています。この問題はオープンソースプロジェクトに特に顕著であり、ソフトウェアエコシステム全体の品質に影響を与えています。この課題に対処するために、私たちは大規模言語モデル(LLMs)の活用を通じてコードの例外処理を改善することを探求しています。包括的な分析を通じて、以下の3つの主要な問題を特定しました:脆弱なコードの感知の不適切さ、例外タイプの不正確なキャプチャ、および歪んだ処理解決策。これらの問題は現実世界のリポジトリ全体に広く見られ、堅牢な例外処理の実践がしばしば見落とされたり誤って取り扱われたりしていることを示唆しています。これに対応するために、私たちは例外処理のための専門開発者の戦略に着想を得たマルチエージェントフレームワークであるSeekerを提案します。Seekerは、スキャナ、ディテクタ、プレデタ、ランカー、ハンドラというエージェントを使用して、LLMsが例外をより効果的に検出、キャプチャ、解決するのを支援します。私たちの研究は、LLMsを活用して例外処理の実践を向上させる初めての体系的な研究であり、コードの信頼性の将来の改善に向けた貴重な示唆を提供しています。
English
In real world software development, improper or missing exception handling can severely impact the robustness and reliability of code. Exception handling mechanisms require developers to detect, capture, and manage exceptions according to high standards, but many developers struggle with these tasks, leading to fragile code. This problem is particularly evident in open source projects and impacts the overall quality of the software ecosystem. To address this challenge, we explore the use of large language models (LLMs) to improve exception handling in code. Through extensive analysis, we identify three key issues: Insensitive Detection of Fragile Code, Inaccurate Capture of Exception Types, and Distorted Handling Solutions. These problems are widespread across real world repositories, suggesting that robust exception handling practices are often overlooked or mishandled. In response, we propose Seeker, a multi agent framework inspired by expert developer strategies for exception handling. Seeker uses agents: Scanner, Detector, Predator, Ranker, and Handler to assist LLMs in detecting, capturing, and resolving exceptions more effectively. Our work is the first systematic study on leveraging LLMs to enhance exception handling practices, providing valuable insights for future improvements in code reliability.

Summary

AI-Generated Summary

PDF53November 16, 2024