REFACTORING PREDICTION USING CLASS COMPLEXITY METRICS

Yasemin Köşker, Burak Turhan, Ayşe Bener

2008

Abstract

In the lifetime of a software product, development costs are only the tip of the iceberg. Nearly 90% of the cost is maintenance due to error correction, adoptation and mainly enhancements. As Belady and Lehman (Lehman and Belady, 1985) state that software will become increasingly unstructured as it is changed. One way to overcome this problem is refactoring. Refactoring is an approach which reduces the software complexity by incrementally improving internal software quality. Our motivation in this research is to detect the classes that need to be rafactored by analyzing the code complexity. We propose a machine learning based model to predict classes to be refactored. We use Weighted Naïve Bayes with InfoGain heuristic as the learner and we conducted experiments with metric data that we collected from the largest GSM operator in Turkey. Our results showed that we can predict 82% of the classes that need refactoring with 13% of manual inspection effort on the average.

References

  1. Simon, F. S., F., Lewerentz, C., 2001. Metrics based refactoring. Proc. European Conf. Software Maintenance and Reengineering.
  2. Fowler, M., Beck, K., Brant,J., Opdyke,W., Roberts,D., 2001. Refactoring: Improving the Design of Existing Code, Addison-Wesley.
  3. Lewis, D., 1998. Naive (Bayes) at Forty: The Independence Assumption in Information Retrieval. Proceedings of ECML-98, 10th European Conference on Machine Learning.
  4. Zhao, L., Hayes,J.H., 2006. Predicting Classes in Need of Refactoring: An Application of Static Metrics. In Proceedings of the Workshop on Predictive Models of Software Engineering (PROMISE), associated with ICSM 2006.
  5. Welker, K., Oman, P.W., 1995. Software maintainability metrics models in practice. Journal of Defense Software Engineering.
  6. Mens, T., Tourwé, T., Muñoz, F., 2003. Beyond the Refactoring Browser: Advanced Tool Support for Software Refactoring. Proceedings of the International Workshop on Principles of Software Evolution.
  7. Fowler, M., Beck, K., Brant,J., Opdyke,W., Roberts,D., 2001. Refactoring: Improving the Design of Existing Code, Addison-Wesley.
  8. Menzies, T., Greenwald, J., Frank, A., 2007. Data mining static code attributes to learn defect predictors. IEEE Transactions on Software Engineering.
  9. Turhan, B., Bener, A.B., 2007. Software Defect Prediction: Heuristics for Weighted Naive Bayes. ICSOFT 2007
  10. Alpaydin, E., 2004. Introduction to Machine Learning, MIT Press.
  11. Lehman, M.M., Belady, L.A., 1985. Program evolution: processes of software change, Academic Press Professional.
  12. Turhan, B., Oral, A.D., Bener, A.B., 2007. Prest- A tool for pre-test defect prediction. Bogaziçi University Technical Report.
  13. Ferreira, J.T.A.S., Denison, D.G.T., Hand, D.J., 2001. Weighted naive Bayes modelling for data mining.
  14. Mitchell, M., Jolley, J., 2001. Research Design Explained, New York:Harcourt.
Download


Paper Citation


in Harvard Style

Köşker Y., Turhan B. and Bener A. (2008). REFACTORING PREDICTION USING CLASS COMPLEXITY METRICS . In Proceedings of the Third International Conference on Software and Data Technologies - Volume 2: ICSOFT, ISBN 978-989-8111-52-4, pages 289-292. DOI: 10.5220/0001893802890292


in Bibtex Style

@conference{icsoft08,
author={Yasemin Köşker and Burak Turhan and Ayşe Bener},
title={REFACTORING PREDICTION USING CLASS COMPLEXITY METRICS},
booktitle={Proceedings of the Third International Conference on Software and Data Technologies - Volume 2: ICSOFT,},
year={2008},
pages={289-292},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0001893802890292},
isbn={978-989-8111-52-4},
}


in EndNote Style

TY - CONF
JO - Proceedings of the Third International Conference on Software and Data Technologies - Volume 2: ICSOFT,
TI - REFACTORING PREDICTION USING CLASS COMPLEXITY METRICS
SN - 978-989-8111-52-4
AU - Köşker Y.
AU - Turhan B.
AU - Bener A.
PY - 2008
SP - 289
EP - 292
DO - 10.5220/0001893802890292