CoditT5: Pretraining for Source Code and Natural Language Editing

Jiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li, Milos Gligoric
8/10/2022
cs.SEcs.LG

No official code found. Best implementation: EngineeringSoftware/CoditT5 (29 stars, MIT, last commit 2025-01-16).

Abstract

Pretrained language models have been shown to be effective in many software-related generation tasks; however, they are not well-suited for editing tasks as they are not designed to reason about edits. To address this, we propose a novel pretraining objective which explicitly models edits and use it to build CoditT5, a large language model for software-related editing tasks that is pretrained on large amounts of source code and natural language comments. We fine-tune it on various downstream editing tasks, including comment updating, bug fixing, and automated code review. By outperforming standard generation-based models, we demonstrate the generalizability of our approach and its suitability for editing tasks. We also show how a standard generation model and our edit-based model can complement one another through simple reranking strategies, with which we achieve state-of-the-art performance for the three downstream editing tasks.

View on arXivView PDF

Code Implementations(1)

MIT

CoditT5: Pretraining for Source Code and Natural Language Editing

293Shell, PythonAug 22, 20221 years agoMIT
machine-learningpretrained-language-modelsoftware-engineering

Similar Papers

Cite this paper

@article{zhang2022coditt,
  title  = {CoditT5: Pretraining for Source Code and Natural Language Editing},
  author = {Jiyang Zhang and Sheena Panthaplackel and Pengyu Nie and Junyi Jessy Li and Milos Gligoric},
  year   = {2022},
  eprint = {2208.05446},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2208.05446v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.05446.svg)](https://codeofpaper.com/paper/2208.05446)

Discussion