skip to main content
10.1145/1370750.1370759acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

On the relation of refactorings and software defect prediction

Published: 10 May 2008 Publication History

Abstract

This paper analyzes the influence of evolution activities such as refactoring on software defects. In a case study of five open source projects we used attributes of software evolution to predict defects in time periods of six months. We use versioning and issue tracking systems to extract 110 data mining features, which are separated into refactoring and non-refactoring related features. These features are used as input into classification algorithms that create prediction models for software defects. We found out that refactoring related features as well as non-refactoring related features lead to high quality prediction models. Additionally, we discovered that refactorings and defects have an inverse correlation: The number of software defects decreases, if the number of refactorings increased in the preceding time period. As a result, refactoring should be a significant part of both bug fixes and other evolutionary changes to reduce software defects.

References

[1]
N. E. Fenton and M. Neil. A critique of software defect prediction models. IEEE Transactions on Software Engineering, 25(5):675--689, September 1999.
[2]
B. Fluri, H. C. Gall, and M. Pinzger. Fine-grained analysis of change couplings. In Proceedings of the Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05), 2005.
[3]
B. Fluri, M. W¨ursch, M. Pinzger, and H. C. Gall. Change distilling-tree differencing for fine-grained source code change extraction. Transactions on Software Engineering, 33(11):725--743, November 2007.
[4]
T. M. Khoshgoftaar, X. Yuan, E. B. Allen, W. D. Jones, and J. P. Hudepohl. Uncertain classification of fault-prone software modules. Empirical Software Engineering, 7(4):297--318, December 2002.
[5]
S. Kim, T. Zimmermann, E. J. Whitehead, Jr., and A. Zeller. Predicting faults from cached history. In Proceedings of the International Conference on Software Engineering, May 2007.
[6]
N. Nagappan and T. Ball. Static analysis tools as early indicators of pre-release defect density. In Proceedings of the International Conference on Software Engineering, May 2005.
[7]
J. Ratzinger. sPACE -- Software Project Assessment in the Course of Evolution. PhD thesis, Vienna University of Technology, Austria, October 2007.
[8]
J. Ratzinger, T. Sigmund, P. Vorburger, and H. Gall. Mining software evolution to predict refactoring. In Proceedings of the International Symposium on Empirical Software Engineering and Measurement (ESEM), September 2007.
[9]
F. Van Rysselberghe. Studying Historic Change Operations: Techniques and Observations. PhD thesis, Universiteit Antwerpen, 2008.
[10]
P. Weißgerber and S. Diehl. Are refactorings less error-prone than other changes? In Proceedings of the International Workshop on Mining Software Repositories (MSR '06). ACM, 2006.
[11]
I. H. Witten and E. Frank. Data Mining: Practical machine learning tools and techniques. Morgan Kaufmann, 2005.

Cited By

View all
  • (2025)Deciphering refactoring branch dynamics in modern code reviewInformation and Software Technology10.1016/j.infsof.2024.107596177:COnline publication date: 1-Jan-2025
  • (2024)How to refactor this code? An exploratory study on developer-ChatGPT refactoring conversationsProceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3645081(202-206)Online publication date: 15-Apr-2024
  • (2024)Test code refactoring unveiled: where and how does it affect test code quality and effectiveness?Empirical Software Engineering10.1007/s10664-024-10577-y30:1Online publication date: 16-Nov-2024
  • Show More Cited By

Index Terms

  1. On the relation of refactorings and software defect prediction

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    MSR '08: Proceedings of the 2008 international working conference on Mining software repositories
    May 2008
    162 pages
    ISBN:9781605580241
    DOI:10.1145/1370750
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 10 May 2008

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. mining
    2. software analysis
    3. software evolution

    Qualifiers

    • Research-article

    Conference

    ICSE '08
    Sponsor:

    Upcoming Conference

    ICSE 2025

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)11
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 13 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2025)Deciphering refactoring branch dynamics in modern code reviewInformation and Software Technology10.1016/j.infsof.2024.107596177:COnline publication date: 1-Jan-2025
    • (2024)How to refactor this code? An exploratory study on developer-ChatGPT refactoring conversationsProceedings of the 21st International Conference on Mining Software Repositories10.1145/3643991.3645081(202-206)Online publication date: 15-Apr-2024
    • (2024)Test code refactoring unveiled: where and how does it affect test code quality and effectiveness?Empirical Software Engineering10.1007/s10664-024-10577-y30:1Online publication date: 16-Nov-2024
    • (2023)RefactorScore: Evaluating Refactor Prone CodeIEEE Transactions on Software Engineering10.1109/TSE.2023.332461349:11(5008-5026)Online publication date: Nov-2023
    • (2023)Change Pattern Detection for Optimising Incremental Static Analysis2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM59687.2023.00016(49-60)Online publication date: 2-Oct-2023
    • (2023)On the impact of single and co-occurrent refactorings on quality attributes in android applicationsJournal of Systems and Software10.1016/j.jss.2023.111817205(111817)Online publication date: Nov-2023
    • (2022)Software Quality: How Much Does It Matter?Electronics10.3390/electronics1116248511:16(2485)Online publication date: 10-Aug-2022
    • (2022)Code review practices for refactoring changesProceedings of the 19th International Conference on Mining Software Repositories10.1145/3524842.3527932(689-701)Online publication date: 23-May-2022
    • (2022)Software Defect Prediction: A Comparative Analysis of Machine Learning Techniques2022 International Conference on Machine Learning, Computer Systems and Security (MLCSS)10.1109/MLCSS57186.2022.00016(38-47)Online publication date: Aug-2022
    • (2022)What Refactoring Topics Do Developers Discuss? A Large Scale Empirical Study Using Stack OverflowIEEE Access10.1109/ACCESS.2021.314003610(56362-56374)Online publication date: 2022
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media