ABSTRACT
Refactoring, as a software engineering discipline has emerged over recent years to become an important aspect of maintaining software. Refactoring refers to the restructuring of software according to specific mechanics and principles. In this paper, we describe an analysis of the results from a tool whose purpose was to identify and extract refactorings from seven open-source Java systems. In particular, we analyzed the mechanics of the most commonly and least commonly applied refactorings to try and account for their frequency. Results showed the most common refactorings of the fifteen coined a 'Gang of Six', to be generally those with a high in-degree and low out-degree when mapped on a dependency graph; the same refactorings also featured strongly in the remedying of bad code smells. Remarkably and surprisingly, inheritance and encapsulationbased refactorings were found to have been applied relatively infrequently - we offer explanations for why this may be the case. The paper thus identifies 'core' refactorings central to many of the changes made by developers on open-source systems. While we can not guarantee that developers consciously undertake refactoring in any sense, the empirical results demonstrate that simple renaming and moving fields/methods between classes are common components of open-source system re-engineering. From a wider software engineering perspective, knowledge of what a modification will incur in likely sub-tasks is of value to developers whether working on open-source or other forms of software.
- D. Arsenovski. Refactoring--elixir of youth for legacy VB code. Available at: www.codeproject.com/vb/net/Refactoring_elixir.asp.Google Scholar
- L. Briand, C. Bunse and J. Daly. A controlled experiment for evaluating quality guidelines on the maintainability of objectoriented designs. IEEE Trans. on Software Engineering, 27(6), 2001, pages 513--530. Google ScholarDigital Library
- D. Advani, Y. Hassoun and S. Counsell. Extracting Refactoring Trends from Open-source Software and a Possible Solution to the 'Related Refactoring' Conundrum. To appear in the Proceedings of ACM Symposium on Applied Computing, Dijon, France, April 2006. Google ScholarDigital Library
- S. Counsell, P. Newson and E. Mendes, Architectural Level Hypothesis Testing through Reverse Engineering of Object-Oriented Software, Proceedings of IEEE international Workshop on Program Comprehension, Limerick, Ireland, 2000. Google ScholarDigital Library
- S. Counsell, Y. Hassoun, R. Johnson, K. Mannock and E. Mendes. Trends in Java code changes: the key identification of refactorings, ACM 2nd International Conference on the Principles and Practice of Programming in Java, Kilkenny, Ireland, June 2003. Google ScholarDigital Library
- S. Demeyer, S. Ducasse and O. Nierstrasz, Finding refactorings via change metrics, ACM Conference on Object Oriented Prog. Systems Languages and Applications (OOPSLA), Minneapolis, USA. pp. 166--177, 2000. Google ScholarDigital Library
- T. Dinh-Trong and J. Bieman. Open Source Software Development: A Case Study of FreeBSD. Proceedings of 10th IEEE International Symposium on Software Metrics, Chicago, USA, 2004, pages 96--105. Google ScholarDigital Library
- R. Ferenc, I. Siket, T. Gyimothy. Extracting Facts from Open Source Software. Proceedings of 20th International Conference on Software Maintenance (ICSM 2004), Chicago, USA, pages 60--69. Google ScholarDigital Library
- B. Foote and W. Opdyke, Life Cycle and Refactoring Patterns that Support Evolution and Reuse. Pattern Languages of Programs (James O. Coplien and Douglas C. Schmidt, editors), Addison-Wesley, May, 1995. Google ScholarDigital Library
- M. Fowler. Refactoring (Improving the Design of Existing Code). Addison Wesley, 1999. Google ScholarDigital Library
- M. Godfrey and Q. Tu. Evolution in open-source software: A case study. Proceedings of International Conference on Software Maintenance (ICSM 2000), San Jose, USA. pages 131--142. Google ScholarDigital Library
- R. Harrison, S. Counsell and R. Nithi. Experimental assessment of the effect of inheritance on the maintainability of object-oriented systems, Journal of Systems and Software, 52, 2000, pages 173--179. Google ScholarDigital Library
- JavaCC, JavaCC Parser, Available {ONLINE} from {https://javacc.dev.java.net/}.Google Scholar
- JDOM, JDOM API, Available {ONLINE} from {http://www.jdom.org}.Google Scholar
- R. Johnson and B. Foote. Designing Reusable Classes, Journal of Object-Oriented Programming 1(2), pages 22--35. June/July 1988.Google Scholar
- J. Kerievsky, Refactoring to Patterns, Addison Wesley, 2004. Google ScholarDigital Library
- T. Mens and T. Tourwe, A Survey of Software Refactoring, IEEE Transactions on Software Engineering 30(2): 126--139 (2004). Google ScholarDigital Library
- A. Mockus, T. Fielding and D. Herbsleb. Two case studies of open source software development: Apache and Mozilla. ACM Transactions on Software Engineering and Methodology, Vol. 11, No. 3, pages 309--346. 2002 Google ScholarDigital Library
- R. Najjar, S. Counsell, G. Loizou and K. Mannock. The role of constructors in the context of refactoring object-oriented software. Seventh European Conference on Software Maintenance and Reengineering (CSMR '03). Benevento, Italy, March 26-28, 2003. pages 111--120. Google ScholarDigital Library
- R. Najjar, S. Counsell and G. Loizou. Encapsulation and the vagaries of a simple refactoring: an empirical study. Proceedings Intl. Conference on Soft. Systems Engineering and its Applications, Paris, France, December 2005.Google Scholar
- M. O'Cinneide and P. Nixon. Composite Refactorings for Java Programs. Proceedings of the Workshop on Formal Techniques for Java Programs. ECOOP Workshops 1998.Google Scholar
- W. Opdyke. Refactoring object-oriented frameworks, Ph.D. Thesis, University of Illinois. 1992. Google ScholarDigital Library
- D. Perry. Laws and Principles of Evolution, Panel Paper, International Conference on Software Maintenance, Montreal, Canada, pages 70--71, 2002. Google ScholarDigital Library
- Recoder, Recoder API, Available {ONLINE} from {http://recoder.sourceforge.net/}.Google Scholar
- L. Tokuda and D. Batory. Evolving object-oriented designs with refactorings. Automated Software Engineering, 8:89--120, 2001. Google ScholarDigital Library
- T. Tourwe and T. Mens. Identifying Refactoring Opportunities Using Logic Meta Programming, Proc. 7th European Conference on Software Maintenance and Re-Engineering, Benevento, Italy, 2003, pages 91--100. Google ScholarDigital Library
- M. Wu and Y. Lin. Open source software development. IEEE Computer, Volume 46, No. 6, pages 33--38. 2001.Google Scholar
Index Terms
- Common refactorings, a dependency graph and some code smells: an empirical study of Java OSS
Recommendations
An interactive ambient visualization for code smells
SOFTVIS '10: Proceedings of the 5th international symposium on Software visualizationCode smells are characteristics of software that indicate that code may have a design problem. Code smells have been proposed as a way for programmers to recognize the need for restructuring their software. Because code smells can go unnoticed while ...
On experimenting refactoring tools to remove code smells
XP '15 workshops: Scientific Workshop Proceedings of the XP2015When we develop a software project of a certain complexity, source code maintainability could become a problem, in particular if developers do not use a consolidate development process that simplifies the management of the entire project. When source ...
An ontology-based taxonomy of bad code smells
ACST'07: Proceedings of the third conference on IASTED International Conference: Advances in Computer Science and Technology"Bad code smell" or "spaghetti code" is a jargon used among programmers to refer to source code that is difficult to maintain, evolve, and change. We consider them as symptoms of poor software engineering practice. This paper presents an application of ...
Comments