5 research outputs found
ContrastRepair: Enhancing Conversation-Based Automated Program Repair via Contrastive Test Case Pairs
Automated Program Repair (APR) aims to automatically generate patches for
rectifying software bugs. Recent strides in Large Language Models (LLM), such
as ChatGPT, have yielded encouraging outcomes in APR, especially within the
conversation-driven APR framework. Nevertheless, the efficacy of
conversation-driven APR is contingent on the quality of the feedback
information. In this paper, we propose ContrastRepair, a novel
conversation-based APR approach that augments conversation-driven APR by
providing LLMs with contrastive test pairs. A test pair consists of a failing
test and a passing test, which offer contrastive feedback to the LLM. Our key
insight is to minimize the difference between the generated passing test and
the given failing test, which can better isolate the root causes of bugs. By
providing informative and specific feedback, ContrastRepair enables the LLM to
produce effective bug fixes. The implementation of ContrastRepair is based on
the state-of-the-art LLM, ChatGPT, and it iteratively interacts with ChatGPT
until plausible patches are generated. We evaluate ContrastRepair on multiple
benchmark datasets, including Defects4j, QuixBugs, and HumanEval-Java. The
results demonstrate that ContrastRepair significantly outperforms existing
methods, achieving a new state-of-the-art in program repair. For instance,
among Defects4j 1.2 and 2.0, ContrastRepair correctly repairs 143 out of all
337 bug cases, while the best-performing baseline fixes 124 bugs
Quantitative Analysis of Leakage Consequences of LNG Ship-to-Ship Bunkering Based on CFD
Leakage incidents on LNG bunker vessels will result in a serious degree of hazard. This paper investigates typical high-risk scenarios such as hose ruptures and valve joint leakages. The consequences of an LNG leakage accident during the simultaneous operation of a bunker vessel and a container carrier are simulated using the FLACS software, and the dispersion range of the combustible vapor cloud is quantitatively analyzed under both ballast and laden conditions. Under the ballast condition, the diffusion range of the combustible vapor cloud on the side of the bunker vessel is 58 × 15.5 m from the front wall of the cargo equipment room to the bow of the vessel, and 35 × 9.5 m between the cargo equipment room and the transom of the vessel. Under the laden condition, the diffusion range on the side of the bunker vessel is 58 × 15.5 m from the front wall of the cargo equipment room to the bow of the vessel, and 15 × 4 m between the rear end wall of the cargo equipment room and the front wall of the stern of the vessel. These results provide important technical guidance and reference values for the safe operation of LNG bunker vessels