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

An empirical investigation into the role of API-level refactorings during software evolution

Authors Info & Claims
Published:21 May 2011Publication History

ABSTRACT

It is widely believed that refactoring improves software quality and programmer productivity by making it easier to maintain and understand software systems. However, the role of refactorings has not been systematically investigated using fine-grained evolution history. We quantitatively and qualitatively studied API-level refactorings and bug fixes in three large open source projects, totaling 26523 revisions of evolution.

The study found several surprising results: One, there is an increase in the number of bug fixes after API-level refactorings. Two, the time taken to fix bugs is shorter after API-level refactorings than before. Three, a large number of refactoring revisions include bug fixes at the same time or are related to later bug fix revisions. Four, API-level refactorings occur more frequently before than after major software releases. These results call for re-thinking refactoring's true benefits. Furthermore, frequent floss refactoring mistakes observed in this study call for new software engineering tools to support safe application of refactoring and behavior modifying edits together.

References

  1. J. Aranda and G. Venolia. The secret life of bugs: Going past the errors and omissions in software repositories. In ICSE '09: Proceedings of the 31st International Conference on Software Engineering, pages 298--308, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. Bird, A. Bachmann, E. Aune, J. Duffy, A. Bernstein, V. Filkov, and P. Devanbu. Fair and balanced?: bias in bug-fix datasets. In ESEC/FSE '09: Proceedings of the the 7th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, pages 121--130, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Carriere, R. Kazman, and I. Ozkaya. A cost-benefit framework for making architectural decisions in a business context. In ICSE '10: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, pages 149--157, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. W. Cunningham. The wycash portfolio management system. In OOPSLA '92: Addendum to the proceedings on Object-oriented programming systems, languages, and applications (Addendum), pages 29--30, New York, NY, USA, 1992. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Dalgaard. Introductory statistics with R. Springer, New York, 2. ed. edition, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  6. B. Daniel, D. Dig, K. Garcia, and D. Marinov. Automated testing of refactoring engines. In ESEC-FSE '07: Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering, pages 185--194, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Dig and R. Johnson. The role of refactorings in api evolution. In ICSM '05: Proceedings of the 21st IEEE International Conference on Software Maintenance, pages 389--398, Washington, DC, USA, 2005. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Dig and R. Johnson. Automated detection of refactorings in evolving components. In ECOOP '06: Proceedings of European Conference on Object-Oriented Programming, pages 404--428. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Fischer, M. Pinzger, and H. Gall. Populating a release history database from version control and bug tracking systems. In ICSM '03: Proceedings of the International Conference on Software Maintenance, page 23, Washington, DC, USA, 2003. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Fluri, M. Würsch, M. Pinzger, and H. C. Gall. Change distilling: Tree differencing for fine-grained source code change extraction. IEEE Transactions on Software Engineering, 33(11):725--743, August 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, 2000.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. Görg and P. Weißgerber. Error detection by refactoring reconstruction. In MSR '05: Proceedings of the 2005 international workshop on Mining software repositories, pages 1--5, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. W. G. Griswold. Program Restructuring as an Aid to Software Maintenance. PhD thesis, University of Washington, WA, USA, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. A. Hindle, D. M. German, and R. Holt. What do large commits tell us?: a taxonomical study of large commits. In MSR '08: Proceedings of the 2008 international working conference on Mining software repositories, pages 99--108, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Kim and D. Notkin. Discovering and representing systematic code changes. In ICSE '09: Proceedings of the 2009 IEEE 31st International Conference on Software Engineering, pages 309--319, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Kim, D. Notkin, and D. Grossman. Automatic inference of structural changes for matching across program versions. In ICSE '07: Proceedings of the 29th International Conference on Software Engineering, pages 333--343, Washington, DC, USA, 2007. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Kim, T. Zimmermann, E. J. Whitehead, Jr., and A. Zeller. Predicting faults from cached history. In ICSE '07: Proceedings of the 29th international conference on Software Engineering, pages 489--498, Washington, DC, USA, 2007. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. M. Lehman. On understanding laws, evolution, and conservation in the large-program life cycle. Journal of Systems and Software, 1:213--221, 1980.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Mens and T. Tourwe. A survey of software refactoring. IEEE Transactions on Software Engineering, 30(2):126--139, February 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. E. Murphy-hill and A. P. Black. Why don't people use refactoring tools. In ECOOP '07: Proceedings of the 1st Workshop on Refactoring Tools, TU Berlin, Germany, 2007.Google ScholarGoogle Scholar
  21. E. Murphy-Hill, C. Parnin, and A. P. Black. How we refactor, and how we know it. In ICSE '09: Proceedings of the 31st International Conference on Software Engineering, pages 287--297, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. N. Nagappan and T. Ball. Use of relative code churn measures to predict system defect density. In ICSE '05: Proceedings of the 27th International Conference on Software Engineering, pages 284--292, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. H. A. Nguyen, T. T. Nguyen, G. Wilson, Jr., A. T. Nguyen, M. Kim, and T. N. Nguyen. A graph-based approach to api usage adaptation. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications, OOPSLA '10, pages 302--321, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. K. Prete, N. Rachatasumrit, N. Sudan, and M. Kim. Template-based reconstruction of complex refactorings. In Software Maintenance (ICSM), 2010 IEEE International Conference on, pages 1--10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Ratzinger, T. Sigmund, and H. C. Gall. On the relation of refactorings and software defect prediction. In MSR '08: Proceedings of the 2008 international working conference on Mining software repositories, pages 35--38, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. Reichenbach, D. Coughlin, and A. Diwan. Program metamorphosis. In Genoa: Proceedings of the 23rd European Conference on ECOOP 2009 Object-Oriented Programming, pages 394--418, Berlin, Heidelberg, 2009. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. D. Roberts, J. Brant, and R. Johnson. A refactoring tool for smalltalk. Theory and Practice of Object Systems, 3(4):253--263, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. Śliwerski, T. Zimmermann, and A. Zeller. When do changes induce fixes? In MSR '05: Proceedings of the 2005 international workshop on Mining software repositories, pages 1--5, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. D. Čubranić and G. C. Murphy. Hipikat: recommending pertinent software development artifacts. In ICSE '03: Proceedings of the 25th International Conference on Software Engineering, pages 408--418, Washington, DC, USA, 2003. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. Weißgerber and S. Diehl. Are refactorings less error-prone than other changes? In MSR '06: Proceedings of the 2006 international workshop on Mining software repositories, pages 112--118, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. W. Wu, Y.-G. Guéhéneuc, G. Antoniol, and M. Kim. Aura: a hybrid approach to identify framework evolution. In ICSE '10: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, pages 325--334, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Z. Xing and E. Stroulia. Umldiff: an algorithm for object-oriented design differencing. In ASE '05: Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering, pages 54--65, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Z. Xing and E. Stroulia. Refactoring practice: How it is and how it should be supported - an eclipse case study. In ICSM '06: Proceedings of the 22nd IEEE International Conference on Software Maintenance, pages 458--468, Washington, DC, USA, 2006. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An empirical investigation into the role of API-level refactorings during software evolution

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ICSE '11: Proceedings of the 33rd International Conference on Software Engineering
      May 2011
      1258 pages
      ISBN:9781450304450
      DOI:10.1145/1985793

      Copyright © 2011 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 21 May 2011

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate276of1,856submissions,15%

      Upcoming Conference

      ICSE 2025

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader