Defect Identification, Categorization, and Repair: Better Together

04/11/2022
by   Chao Ni, et al.
0

Just-In-Time defect prediction (JIT-DP) models can identify defect-inducing commits at check-in time. Even though previous studies have achieved a great progress, these studies still have the following limitations: 1) useful information (e.g., semantic information and structure information) are not fully used; 2) existing work can only predict a commit as buggy one or clean one without more information about what type of defect it is; 3) a commit may involve changes in many files, which cause difficulty in locating the defect; 4) prior studies treat defect identification and defect repair as separate tasks, none aims to handle both tasks simultaneously. In this paper, to handle aforementioned limitations, we propose a comprehensive defect prediction and repair framework named CompDefect, which can identify whether a changed function (a more fine-grained level) is defect-prone, categorize the type of defect, and repair such a defect automatically if it falls into several scenarios, e.g., defects with single statement fixes, or those that match a small set of defect templates. Generally, the first two tasks in CompDefect are treated as a multiclass classification task, while the last one is treated as a sequence generation task. The whole input of CompDefect consists of three parts (exampled with positive functions): the clean version of a function (i.e., the version before defect introduced), the buggy version of a function and the fixed version of a function. In multiclass classification task, CompDefect categorizes the type of defect via multiclass classification with the information in both the clean version and the buggy version. In code sequence generation task, CompDefect repairs the defect once identified or keeps it unchanged.

READ FULL TEXT
research
10/15/2020

Tokenization Repair in the Presence of Spelling Errors

We consider the following tokenization repair problem: Given a natural l...
research
05/28/2020

MACER: A Modular Framework for Accelerated Compilation Error Repair

Automated compilation error repair, the problem of suggesting fixes to b...
research
04/16/2018

ClaiRE at SemEval-2018 Task 7 - Extended Version

In this paper we describe our post-evaluation results for SemEval-2018 T...
research
03/12/2020

CC2Vec: Distributed Representations of Code Changes

Existing work on software patches often use features specific to a singl...
research
09/02/2019

Targeted Example Generation for Compilation Errors

We present TEGCER, an automated feedback tool for novice programmers. TE...
research
10/02/2020

Proof Repair Across Type Equivalences

We describe a new approach to automatically repairing broken proofs in t...

Please sign up or login with your details

Forgot password? Click here to reset