EUVIMEDEUVIMED entdecken
Crossref

KnowJIT: Knowledge-Augmented Just-in-Time Defect Prediction and Repair via In-Context Learning

Di Wu, Wenke Li, Gaojian Lv, Xianming Zhao, Yanzhao Yang, Zhenjiang Dong

IEEE Transactions on Reliability · 2026 · 75 · 3861-3875

DOI: 10.1109/tr.2026.3744216 ↗

Kurz gefasst

Fachartikel in der Zeitschrift IEEE Transactions on Reliability, 2026. Verfasst von Di Wu und 5 weiteren Autor:innen. Die Arbeit nennt 79 Literaturangaben. Gefördert von: National Natural Science Foundation of China, Primary Research & Development Plan of Jiangsu Province, Qing Lan Project of Jiangsu Province.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Just-In-Time (JIT) defect prediction aims to identify defect-introducing modifications at check-in time. Based on predicted defects, JIT defect repair can automatically generate corresponding fixes. Accomplishing JIT defect prediction and repair tasks simultaneously can effectively improve software quality. However, existing work typically focuses on either JIT defect prediction or repair. Prediction approaches mainly rely on code changes as JIT defect knowledge, while repair approaches presuppose that the defect has already been identified. Even when both tasks are combined, the predicted defect category is not effectively leveraged to guide repair, affecting the repair performance. In-context learning enables large language models to leverage their understanding of code semantics to adapt to new tasks given a small set of demonstrations. In this article, we propose KnowJIT, a novel approach that leverages in-context learning to capture comprehensive JIT defect knowledge for predicting, categorizing, and repairing JIT defects. More specifically, KnowJIT first employs a semantic retrieval strategy to retrieve JIT defect knowledge that reflects the semantics of the complete code and its code changes. Then, we design a two-stage in-context learning framework. The first stage leverages the retrieved JIT defect knowledge to predict whether the code is defective and identify its defect category. The second stage uses the predicted defect category to guide a category-specific repair strategy. We evaluate KnowJIT on a substantial dataset comprising 21 047 function-level instances. The experimental results show that KnowJIT is effective and outperforms the state-of-the-art approaches in JIT defect prediction, categorization, and repair tasks.

Förderung

  • National Natural Science Foundation of China
  • Primary Research & Development Plan of Jiangsu Province
  • Qing Lan Project of Jiangsu Province
  • Natural Science Research Start-up Foundation of Recruiting Talents of Nanjing University of Posts and Telecommunications

Zitieren

APA

Wu, D., Li, W., Lv, G., Zhao, X., Yang, Y., & Dong, Z. (2026). KnowJIT: Knowledge-Augmented Just-in-Time Defect Prediction and Repair via In-Context Learning. IEEE Transactions on Reliability, 75, 3861-3875. https://doi.org/10.1109/tr.2026.3744216

Vancouver

Wu D, Li W, Lv G, Zhao X, Yang Y, Dong Z. KnowJIT: Knowledge-Augmented Just-in-Time Defect Prediction and Repair via In-Context Learning. IEEE Transactions on Reliability. 2026;75:3861-3875. doi:10.1109/tr.2026.3744216

BibTeX
@article{Wu2026,
  author = {Wu, Di and Li, Wenke and Lv, Gaojian and Zhao, Xianming and Yang, Yanzhao and Dong, Zhenjiang},
  title = {KnowJIT: Knowledge-Augmented Just-in-Time Defect Prediction and Repair via In-Context Learning},
  journal = {IEEE Transactions on Reliability},
  year = {2026},
  volume = {75},
  pages = {3861--3875},
  doi = {10.1109/tr.2026.3744216}
}
Kostenlos starten →