Resolving Conflict in Code Refactoring

Resolving Conflict in Code Refactoring

Lakhwinder Kaur (Apeejay Institute of Management Technical Campus, India), Kuljit Kaur (Guru Nanak Dev University, India) and Ashu Gupta (Apeejay Institute of Management Technical Campus, India)
DOI: 10.4018/978-1-4666-4301-7.ch085
OnDemand PDF Download:
$30.00
List Price: $37.50

Abstract

Refactoring is a process that attempts to enhance software code quality by using small transforming functions and modifying the structure of the program through slightly different algorithm. It is important to analyze the design pattern of the software code as well as the impact and possibility of the application of some conflicting refactorings on it. The objective of this chapter is to present an approach for analyzing software design patterns in order to avoid the conflict in application of available refactoring techniques. This chapter discusses the mechanism to study software code or design patterns to automate the process of applying available refactorings while addressing the problem of conflict in their application.
Chapter Preview
Top

Background

Though the work of Opdyke (1992), and Johnson(1997), has been the pillar behind introducing refactoring techniques, the work by M.Fowler(1999) suggested various refactorings. Since then, a number of researchers are engaged in finding effective ways of applying refactorings in software codes. Refactoring techniques are applied at various levels starting from design level to various control structures in a program. R. Najjar, S. Counsell, G. Loizou, and K.Mannock(2003) proved that by replacing constructors with factory methods and making minor modifications to the interface provided by the class, the lines of code can be reduced and classes can provide better abstraction. They have shown the positive effect of refactoring on softwares by improving its quality and efficiency. Mens and Tourwe(2004), performed a comprehensive survey of the research in refactoring upto that time. They classified research according to Five criteria and presented that a tool or formal model for refactoring should be sufficiently abstract to be applicable to different programming languages, but it should also provide the necessary interface to add language-specific behaviour.

Tokuda and Batory(1995) proposed automated search for refactoring trends. They implemented 12 object oriented database refactorings described by Banerjee and Kim(1987). They were able to automate thousands of lines of changes with a general-purpose set of refactorings. They implemented the refactorings in C++ and expressed the difficulty in managing C++ preprocessor Information. Beck(2000) suggested that there is correlation between characteristics of the rapid software development and the need for frequent refactorings. In case of rapid software development, programmers do not bother about code simplicity, understandability and maintainability. M. Boger et al(2002) introduced refactoring browser integrated in a UML modeling tool. They discussed how Refactorings can be extended to static architecture as well as to dynamic behaviour.

Complete Chapter List

Search this Book:
Reset