The Best of Both Worlds: Combining Learned Embeddings with Engineered Features for Accurate Prediction of Correct Patches
Not on the map. Why?
Abstract (arXiv)
A large body of the literature on automated program repair develops approaches where patches are automatically generated to be validated against an oracle (e.g., a test suite). Because such an oracle can be imperfect, the generated patches, although validated by the oracle, may actually be incorrect. Our empirical work investigates different representation learning approaches for code changes to derive embeddings that are amenable to similarity computations of patch correctness identification, and assess the possibility of accurate classification of correct patch by combining learned embeddings with engineered features. Experimental results demonstrate the potential of learned embeddings to empower Leopard (a patch correctness predicting framework implemented in this work) with learning algorithms in reasoning about patch correctness: a machine learning predictor with BERT transformer-based learned embeddings associated with XGBoost achieves an AUC value of about 0.803 in the prediction of patch correctness on a new dataset of 2,147 labeled patches that we collected for the experiments. Our investigations show that deep learned embeddings can lead to complementary/better performance when comparing against the state-of-the-art, PATCH-SIM, which relies on dynamic information. By combining deep learned embeddings and engineered features, Panther (the upgraded version of Leopard implemented in this work) outperforms Leopard with higher scores in terms of AUC, +Recall and -Recall, and can accurately identify more (in)correct patches that cannot be predicted by the classifiers only with learned embeddings or engineered features. Finally, we use an explainable ML technique, SHAP, to empirically interpret how the learned embeddings and engineered features are contributed to the patch correctness prediction.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). First posted on arXiv 16 Mar 2022.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 2; 2023: 2; 2024: 2; 2025: 2; 2026: 1.
9 papers.
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024How secure is AI-generated Code: A Large-Scale Comparison of Large Language Modelscited by 23
- 2023Exploring ChatGPT's Capabilities on Vulnerability Managementcited by 19
- 2022Is this Change the Answer to that Problem? Correlating Descriptions of Bug and Code Changes for Evaluating Patch Correctnesscited by 7
- 2022MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learningcited by 6
- 2025From LLMs to Agents: A Comparative Evaluation of LLMs and LLM-based Agents in Security Patch Detectioncited by 1
- 2024In-Context Code-Text Learning for Bimodal Software Engineeringcited by 0
- 2025Software Vulnerability Management in the Era of Artificial Intelligence: An Industry Perspectivecited by 0
- 2026LogicEval: A Systematic Framework for Evaluating Automated Repair Techniques for Logical Vulnerabilities in Real-World Softwarecited by 0
- 2026LogicEval: A Systematic Framework for Evaluating Automated Repair Techniques for Logical Vulnerabilities in Real-World Software14 Apr 2026
- 2025Software Vulnerability Management in the Era of Artificial Intelligence: An Industry Perspective20 Dec 2025
- 2025From LLMs to Agents: A Comparative Evaluation of LLMs and LLM-based Agents in Security Patch Detection11 Nov 2025
- 2024In-Context Code-Text Learning for Bimodal Software Engineering8 Oct 2024
- 2024How secure is AI-generated Code: A Large-Scale Comparison of Large Language Models29 Apr 2024
- 2023Exploring ChatGPT's Capabilities on Vulnerability Management11 Nov 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2022Is this Change the Answer to that Problem? Correlating Descriptions of Bug and Code Changes for Evaluating Patch Correctness8 Aug 2022
- 2022MetaTPTrans: A Meta Learning Approach for Multilingual Code Representation Learning13 Jun 2022