What Strokes to Modify in the Painting? Code Changes Prediction for Object-Oriented Software
Software systems shall evolve to fulfill users’ increasingly various and sophisticated needs. As they become larger and more complex, the corresponding testing and maintenance have become a practical research challenge. In this paper, we employ an approach that can identify the change-proneness in the source code of new object-oriented software releases and predict the corresponding change sizes. We first define two metrics, namely Class Change Metric and Change Size Metric, to describe the features and sizes of code changes. A new software release may be based on several previous releases. Thus, we employ an Entropy Weight Method to calculate the best window size for determining the number of previous releases to use in the prediction of change-proneness in the new release. Based on a series of change evolution matrices, a code change prediction approach is proposed based on the Gauss Process Regression (GPR) algorithm. Experiments are conducted on 17 software systems collected from GitHub to evaluate our prediction approach. The results show that our approach outperforms three existing state-of-the-art approaches with significantly higher prediction accuracy.
KeywordsChange histories Software evolution Object-oriented software Software metrics Change-prone source code
This work is supported by the National Natural Science Foundation of China grants 61572350 and the National Key R&D Program of China grant NO.2017YF-B1401201.
- 3.Chidamber, S.R., Kemerer, C.F.: Towards a metrics suite for object oriented design, vol. 26. ACM (1991)Google Scholar
- 5.D’Ambros, M., Lanza, M., Robbes, R.: On the relationship between change coupling and software defects. In: 16th Working Conference on Reverse Engineering, WCRE 2009, pp. 135–144. IEEE (2009)Google Scholar
- 7.Eski, S., Buzluca, F.: An empirical study on object-oriented metrics and software evolution in order to reduce testing costs by predicting change-prone classes. In: 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 566–571. IEEE (2011)Google Scholar
- 8.Giger, E., Pinzger, M., Gall, H.C.: Can we predict types of code changes? An empirical analysis. In: 2012 9th IEEE Working Conference on Mining Software Repositories (MSR), pp. 217–226. IEEE (2012)Google Scholar
- 9.Girba, T., Ducasse, S., Lanza, M.: Yesterday’s weather: guiding early reverse engineering efforts by summarizing the evolution of changes. In: Proceedings of 20th IEEE International Conference on Software Maintenance, pp. 40–49. IEEE (2004)Google Scholar
- 11.Henderson-Sellers, B.: Object-Oriented Metrics: Measures of Complexity. Prentice-Hall, Inc., Upper Saddle River (1995)Google Scholar
- 15.Malhotra, R., Khanna, M.: Inter project validation for change proneness prediction using object-oriented metrics. Softw. Eng.: Int. J. 3(1), 21–31 (2013)Google Scholar
- 19.Martin, R.C.: Agile Software Development: Principles, Patterns, and Practices. Prentice Hall, Upper Saddle River (2002)Google Scholar
- 21.Zhou, B., Neamtiu, I., Gupta, R.: A cross-platform analysis of bugs and bug-fixing in open source projects: desktop vs. android vs. iOS. In: Proceedings of the 19th International Conference on Evaluation and Assessment in Software Engineering, p. 7. ACM (2015)Google Scholar