Automating Zero-Shot Patch Porting for Hard Forks
Shengyi Pan, You Wang, Zhongxin Liu, Xing Hu, Xin Xia, Shanping Li

TL;DR
This paper introduces PPatHF, a novel LLM-based approach that automates patch porting for hard forks, demonstrated by successfully porting 42.3% of patches from Vim to Neovim, reducing manual effort significantly.
Contribution
It proposes the first zero-shot patch porting method for hard forks using large language models, with an empirical study and a specialized approach for function-wise patch adaptation.
Findings
PPatHF correctly ports 42.3% of patches from Vim to Neovim.
Automates 57% of manual patch porting efforts.
Outperforms baseline methods significantly.
Abstract
Forking is a typical way of code reuse, which provides a simple way for developers to create a variant software (denoted as hard fork) by copying and modifying an existing codebase. Despite of the benefits, forking also leads to duplicate efforts in software maintenance. Developers need to port patches across the hard forks to address similar bugs or implement similar features. Due to the divergence between the source project and the hard fork, patch porting is complicated, which requires an adaption regarding different implementations of the same functionality. In this work, we take the first step to automate patch porting for hard forks under a zero-shot setting. We first conduct an empirical study of the patches ported from Vim to Neovim over the last ten years to investigate the necessities of patch porting and the potential flaws in the current practice. We then propose a large…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvancements in Photolithography Techniques
