A Study of Repetitiveness of Code Changes in Software Evolution

By: Hoan Anh Nguyen, Anh Tuan Nguyen, Tung Thanh Nguyen, Tien N. Nguyen, and Hridesh Rajan

PDF Download Download Paper

Abstract

In this paper, we present a study of repetitiveness of code changes in software evolution. Repetitiveness is defined as the ratio of repeated changes over total changes. Focusing on fine-grained code changes, we model a change as a pair of old and new AST sub-trees within a method. A change is considered repeated within or cross-project if it matches another change having occurred in the history of the project or another project, respectively. We report the following important findings. First, repetitiveness of changes could be as high as 70-100% at small sizes and decreases exponentially as size increases. Second, repetitiveness is higher and more stable in cross-project setting than in within-project one. Third, fixing changes repeat similarly to general changes. Importantly, learning code changes and recommending them in software evolution is beneficial with accuracy for top-1 recommendation of over 30% and top-3 of nearly 35%. Repeated fixing changes could also be useful for automatic program repair.

ACM Reference

Nguyen, H.A. et al. 2013. A Study of Repetitiveness of Code Changes in Software Evolution. 28th IEEE/ACM International Conference on Automated Software Engineering, ASE, Silicon Valley, USA (2013), 180–190.

BibTeX Reference

@inproceedings{NguyenETAL2013,
  author = {Hoan Anh Nguyen and Anh Tuan Nguyen and Tung Thanh Nguyen and Tien N. Nguyen and Hridesh Rajan},
  title = {A Study of Repetitiveness of Code Changes in Software Evolution},
  booktitle = {28th IEEE/ACM International Conference on Automated Software Engineering, ASE, Silicon Valley, USA},
  pages = {180--190},
  year = {2013},
  publisher = {{IEEE}},
  editor = {Ewen Denney and Tevfik Bultan and Andreas Zeller},
  doi = {10.1109/ASE.2013.6693078},
  abstract = {
  In this paper, we present a study of repetitiveness of code changes in
  software evolution. Repetitiveness is defined as the ratio of repeated changes
  over total changes. Focusing on fine-grained code changes, we model a change
  as a pair of old and new AST sub-trees within a method. A change is considered
  repeated within or cross-project if it matches another change having occurred
  in the history of the project or another project, respectively. We report the
  following important findings. First, repetitiveness of changes could be as
  high as 70-100% at small sizes and decreases exponentially as size increases.
  Second, repetitiveness is higher and more stable in cross-project setting than
  in within-project one. Third, fixing changes repeat similarly to general
  changes. Importantly, learning code changes and recommending them in software
  evolution is beneficial with accuracy for top-1 recommendation of over 30% and
  top-3 of nearly 35%. Repeated fixing changes could also be useful for
  automatic program repair.},
}