탐색자: 중간 언어 에이전트 프레임워크를 활용한 예외 안전 코드 생성을 향하여
Seeker: Towards Exception Safety Code Generation with Intermediate Language Agents Framework
December 16, 2024
저자: Xuanming Zhang, Yuxuan Chen, Yiming Zheng, Zhexin Zhang, Yuan Yuan, Minlie Huang
cs.AI
초록
실제 소프트웨어 개발에서 부적절하거나 누락된 예외 처리는 코드의 견고성과 신뢰성에 심각한 영향을 미칠 수 있습니다. 예외 처리 메커니즘은 개발자가 고수준 표준에 따라 예외를 감지, 포착 및 관리해야 하지만, 많은 개발자들이 이러한 작업에 어려움을 겪어 취약한 코드를 만들어내곤 합니다. 이 문제는 오픈 소스 프로젝트에서 특히 두드러지며 소프트웨어 생태계 전반에 영향을 미칩니다. 이러한 도전에 대처하기 위해, 우리는 코드 내 예외 처리를 개선하기 위해 대규모 언어 모델(LLMs)의 활용을 탐구합니다. 철저한 분석을 통해 우리는 세 가지 주요 문제를 식별했습니다: 취약한 코드의 민감하지 않은 감지, 예외 블록의 부정확한 포착, 그리고 왜곡된 처리 해결책. 이러한 문제들은 실제 저장소 전반에 널리 퍼져 있으며, 견고한 예외 처리 관행이 종종 간과되거나 잘못 다뤄진다는 것을 시사합니다. 이에 대응하여, 우리는 예외 처리에 대한 전문 개발자 전략에서 영감을 받은 다중 에이전트 프레임워크인 Seeker를 제안합니다. Seeker는 Scanner, Detector, Predator, Ranker 및 Handler라는 에이전트를 사용하여 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
Block, and Distorted Handling Solution. 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 in real development scenarios, providing
valuable insights for future improvements in code reliability.