Cumulative Code Churn: Impact on Maintainability


It is a well-known phenomena that the source code of software systems erodes during development, which results in higher maintenance costs in the long term. But can we somehow narrow down where exactly this erosion happens? Is it possible to infer the future erosion based on past code changes? Do modifications performed on frequently changing code have worse effect on software maintainability than those affecting less frequently modified code? In this study we investigated these questions and the results indicate that code churn indeed increases the pace of code erosion. We calculated cumulative code churn values and maintainability changes for every version control commit operation of three open-source and one proprietary software system. With the help of Wilcoxon rank test we compared the cumulative code churn values of the files in commits resulting maintainability increase with those of decreasing the maintainability. In the case of three systems the test showed very strong significance and in one case it resulted in strong significance (p-values 0.00235, 0.00436, 0.00018 and 0.03616). These results support our preliminary assumption that modifying high-churn code is more likely to decrease the overall maintainability of a software system, which can be thought of as the generalization of the already known phenomena that code churn results in higher number of defects.

Proceedings of the 15th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2015), Bremen, Germany, Pages 141–150


    author    = {Farag\'{o}, Csaba and Heged\H{u}s, P\'{e}ter and Ferenc, Rudolf},
    title     = {Cumulative Code Churn: Impact on Maintainability},
    booktitle = {Proceedings of the 15th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2015)},
    year      = {2015},
    pages     = {141--150},
    address   = {Bremen, Germany},
    month     = sep,
    publisher = {IEEE Computer Society},
    doi       = {10.1109/SCAM.2015.7335410},
    keywords  = {Wilcoxon test, code churn, ISO/IEC 25010, source code maintainability},
    url       = {},