Code Inspection Support for Recurring Changes with Deep Learning in Evolving Software

2020 
Developers often make recurring changes, similar but different changes across multiple locations. They inspect such code changes per source file (i.e., a diff patch) during code reviews; however, diff patches represent low-level code modification without summarizing recurring changes, leading to tedious and error-prone code inspection. To address this problem, we propose a novel code review approach, Recurring Code Changes Inspection with Deep Learning (RIDL) that leverages change patterns of an edit script by learning code clones, identical or nearly similar code fragments. To train a classifier, RIDL learns 13,940 clones with four different clone types (e.g., Type-1, Type-2, Type-3, and Type-4 clones) from a clone database mined from 25,000 subject programs. Our approach then leverages the classifier to (1) interactively summarize recurring changes and (2) detect change mistakes, potential anomalies in a given codebase. In the evaluation, after 2 hours of training, RIDL analyzes code changes in four open source projects. It summarizes recurring changes with 95.1% accuracy and detects change anomalies with 93.1% accuracy. Our results show that RIDL should help developers effectively inspect recurring changes during code reviews.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    7
    References
    0
    Citations
    NaN
    KQI
    []