A Code Refactoring Dataset


Empirical Evaluation of Software Maintainability Based on a Manually Validated Refactoring Dataset.

Online appendix for the Information and Software Technology journal's special issue for the ACM PROMISE 2016 conference
(12th International Conference on Predictive Models and Data Analytics in Software Engineering).

Authors:

Péter Hegedűs, István Kádár, Rudolf Ferenc and Tibor Gyimóthy.

Abstract:

Context: Refactoring is a technique for improving the internal structure of software systems. It has a solid theoretical background while being used in development practice also. However, we lack empirical research results on the real effect of code refactoring and its application.
Objective: This paper presents a manually validated subset of a previously published dataset containing the refactorings extracted by the RefFinder tool, code metrics, and maintainability of 7 open-source systems. We found that RefFinder had around 27\% overall average precision on the subject systems, thus our manually validated subset has substantial added value. Using the dataset, we studied several aspects of the refactored and non-refactored source code elements (classes and methods), like the differences in their maintainability and source code metrics.
Method: We divided the source code elements into a group containing the refactored elements and a group with non-refactored elements. We analyzed the elements' characteristics in these groups using correlation analysis, Mann-Whitney U test and effect size measures.
Results: Source code elements subjected to refactorings had significantly lower maintainability than elements not affected by refactorings. Moreover, refactored elements had significantly higher size related metrics, complexity, and coupling. Also these metrics changed more significantly in the refactored elements. The results are mostly in line with our previous findings on the not validated dataset, with the difference that clone metrics had no strong connection with refactoring.
Conclusions: Compared to the preliminary analysis using a not validated dataset, the manually validated dataset led to more significant results, which suggest that developers find targets for refactorings based on some internal quality properties of the source code, like their size, complexity or coupling, but not clone related metrics as reported in our previous studies. They do not just use these properties for identifying targets, but also control them with refactorings.

Keywords:

code refactoring, manually validated empirical dataset, source code metrics, software maintainability, empirical study

Online appendix:

Download link for the detailed analysis results.


A Manually Validated Code Refactoring Dataset and Its Assessment Regarding Software Maintainability.

Online appendix for the ACM PROMISE 2016 conference paper
(12th International Conference on Predictive Models and Data Analytics in Software Engineering).

Authors:

István Kádár, Péter Hegedűs, Rudolf Ferenc and Tibor Gyimóthy.

Abstract:

Refactoring is a popular technique for improving the internal structure of software systems. It has a solid theoretical background while being used in development practice at the same time. However, we lack empirical research results on the real effect of code refactoring and its ways of application.
This paper presents a manually validated dataset of applied refactorings and source code metrics and maintainability of 7 open-source systems. It is a subset of our previously published dataset containing the refactoring instances automatically extracted by the RefFinder tool. We found that RefFinder had around 27% overall average precision on the subject systems, thus our new - manually validated - subset has substantial added value allowing researchers to perform more accurate empirical investigations.
Using this data, we were able to study whether refactorings were really triggered by poor maintainability of the code, or by other aspects. The results show that source code elements subject to refactorings had significantly lower maintainability values (approximated by source code metric aggregation) than elements not affected by refactorings between two releases.

Keywords:

Code refactoring, manually validated empirical dataset, empirical study, software maintainability

Online appendix:

Download link for the Manually Validated Refactoring DataSet.

Download links for the source codes: antlr4, junit, mapdb, mcMMO, mct, oryx, titan.


A Code Refactoring Dataset and Its Assessment Regarding Software Maintainability.

Online appendix for the IEEE SANER 2016 ERA track conference paper
(23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering).

Authors:

István Kádár, Péter Hegedűs, Rudolf Ferenc and Tibor Gyimóthy.

Abstract:

It is very common in various fields that there is a gap between theoretical results and their practical applications. This is true for code refactoring as well, which has a solid theoretical background while being used in development practice at the same time. However, more and more studies suggest that developers perform code refactoring entirely differently than the theory would suggest.
Our paper encourages the further investigation of code refactorings in practice by providing an excessive public dataset of source code metrics and applied refactorings through several releases of 7 open-source systems. As a first step of processing this dataset, we examined the quality attributes of the refactored source code classes and the values of source code metrics improved by those refactorings. Our early results show that lower maintainability indeed triggers more code refactorings in practice and these refactorings significantly decrease complexity, code lines, coupling and clone metrics. However, we observed a degradation in comment related metrics in the refactored code.

Keywords:

code refactoring, software maintainability, empirical study

Online appendix:

Download link for the Refactoring DataSet.

Download links for the source codes: antlr4, junit, mapdb, mcMMO, mct, oryx, titan.