ABSTRACT
Refactoring is one means of improving the structure of existing software. Locations for the application of refactoring are often based on subjective perceptions such as "bad smells", which are vague suspicions of design shortcomings. We exploit historical data extracted from repositories such as CVS and focus on change couplings: if some software parts change at the same time very often over several releases, this data can be used to point to candidates for refactoring. We adopt the concept of bad smells and provide additional change smells. Such a smell is hardly visible in the code, but easy to spot when viewing the change history. Our approach enables the detection of such smells allowing an engineer to apply refactoring on these parts of the source code to improve the evolvability of the software. For that, we analyzed the history of a large industrial system for a period of 15 months, proposed spots for refactorings based on change couplings, and performed them with the developers. After observing the system for another 15 months we finally analyzed the effectiveness of our approach. Our results support our hypothesis that the combination of change dependency analysis and refactoring is applicable and effective.
- S. Demeyer, S. Ducasse, and O. Nierstrasz. Object-oriented Reengineering Patterns. Morgan Kaufmann Publishers, An Imprint of Elsevier Scienence: San Francisco CA, USA, July 2002. Google ScholarDigital Library
- S. Demeyer and T. Mens. Evolution metrics. Proc. of the 4th Int. Workshop on Principles of Software Evolution, pages 83--86, 2001. Session 4A: Principles. Google ScholarDigital Library
- M. Fischer, M. Pinzger, and H. Gall. Populating a release history database from version control and bug tracking systems. Proc. Int. Conf. on Software Maintenance, pages 23--32, September 2003. Google ScholarDigital Library
- M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, June 1999. Google ScholarDigital Library
- H. Gall, J. Krajewski, and M. Jazayeri. CVS Release History Data for Detecting Logical Couplings. In Proc. 6th Int. Workshop on Principles of Software Evolution, pages 13--23. IEEE Computer Society Press, September 2003. Google ScholarDigital Library
- D. M. German, A. Hindle, and N. Jordan. Visualizing the evolution of software using softchange. Proc. 16th Int. Conf. on Software Engineering and Knowledge Engineering, pages 336--341, June 2004.Google Scholar
- M. Godfrey, X. Dong, C. Kapser, and L. Zou. Four interesting ways in which history can teach us about software. Int. Workshop on Mining Software Repositories, May 2004.Google ScholarCross Ref
- C. F. Kemerer and S. A. Slaughter. An empirical approach to studying software evolution. IEEE Transactions on Software Engineering, 25(4):493--509, July-August 1999. Google ScholarDigital Library
- A. Mockus and D. M. Weiss. Predicting risk of software changes. Bell Labs Technical Journal, 5(2):169--180, April-June 2000.Google ScholarCross Ref
- T. J. Ostrand, E. J. Weyuker, and R. M. Bell. Where the bugs are. Proc. on the Int. Symposium on Software Testing and Analysis, pages 86--96, July 2004. Google ScholarDigital Library
- J. Ratzinger, M. Fischer, and H. Gall. Evolens: Lens-view visualizations of evolution data. Technical Report: Vienna University of Technology, December 2004.Google Scholar
- F. Simon, F. Steinbrückner, and C. Lewernetz. Metrics based refactoring. Proc. European Conf. on Software Maintenance and Reengineering, pages 30--38, March 2001. Google ScholarDigital Library
- W. P. Stevens, G. J. Myers, and L. L. Constantine. Structured design. IBM Systems Journal, 13(2):115--139, May 1974.Google ScholarDigital Library
- E. van Emden and L. Moonen. Java quality assurance by detecting code smells. Proc. of the 9th Working Conf. on Reverse Engineering, pages 97--108, October 2002. Google ScholarDigital Library
- T. Zimmermann, P. Weißgerber, S. Diehl, and A. Zeller. Mining version histories to guide software changes. Proc. Int. Conf. on Software Engineering, pages 563--572, May 2004. Google ScholarDigital Library
Index Terms
- Improving evolvability through refactoring
Recommendations
Improving evolvability through refactoring
Refactoring is one means of improving the structure of existing software. Locations for the application of refactoring are often based on subjective perceptions such as "bad smells", which are vague suspicions of design shortcomings. We exploit ...
An approach to prioritize code smells for refactoring
Code smells are a popular mechanism to find structural design problems in software systems. Consequently, several tools have emerged to support the detection of code smells. However, the number of smells returned by current tools usually exceeds the ...
Prioritising Refactoring Using Code Bad Smells
ICSTW '11: Proceedings of the 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation WorkshopsWe investigated the relationship between six of Fowler et al.'s Code Bad Smells (Duplicated Code, Data Clumps, Switch Statements, Speculative Generality, Message Chains, and Middle Man) and software faults. In this paper we discuss how our results can ...
Comments