Puls Dane publiczne, aktualizowane automatycznie
arXiv – nowe publikacje publikacja

Retrofitting Code Using LLMs to Support Exceptional Behavior

[Inżynieria oprogramowania] Autorzy: Linghan Zhong, Jiyang Zhang, Jayanth Srinivasa i 2 więcej

Exception Related Code (ERC), which includes throw statements, conditions (if statements) that guard those throw statements, and try/catch blocks, is an essential component of software systems, allowing developers to detect and handle exceptional states that deviate from the expected program behavior. However, manually writing ERC across large codebases is tedious. We propose a novel task: retrofitting existing code with ERC. Namely, given code (without ERC) and Exceptional Behavior Tests (EBTs) (e.g., check if method throws InvalidArgumentException if null is given as the value to the argument) we aim to automatically generate missing ERC, such that the given tests pass. We design and implement Exception Coder (EXCODER) that performs context engineering to help Large Language Models (LLMs) tackle this task. EXCODER integrates static and dynamic program analysis with LLMs by providing t…

Kategoria arxiv
cs.SE
Kategoria
Inżynieria oprogramowania
Pdf
https://arxiv.org/pdf/2609.10397v1

Otwórz oryginał w źródle ↗

Więcej z tego źródła

Wszystkie