Toward an Implementation of the "Form Template Method" Refactoring (original) (raw)

An automated refactoring approach to design pattern-based program transformations in Java programs

Ninth Asia-Pacific Software Engineering Conference, 2002., 2002

Software often needs to be modified for accommodating requirements changes through the software life cycle. To deal with several accidental requirements changes related to software maintenance, a systematic and safe approach to modifying softwares is needed. The design patterns provide a high degree of design flexibility for such accidental requirements changes. In this paper, we propose an automated approach to refactoring based on design patterns in Java programs. In our approach, for a particular design pattern, we define an inference rule to automatically identify a set of candidate spots and a refactoring strategy to transform one of the set of candidate spots into the desired design pattern structure. A candidate spot may be a class or a set of classes to which the design patterns can be applied. We believe that our approach would be helpful to the maintainers in the sense that much of manual analysis on source code can be reduced, and the fashion of automated program transformation preserves the behavior of the original program by means of the refactoring technique.

Method-Level Code Clone Modification using Refactoring Techniques for Clone Maintenance

Advanced Computing: An International Journal, 2013

Researchers focused on activities such as clone maintenance to assist the programmers. Refactoring is a well-known process to improve the maintainability of the software. Program refactoring is a technique to improve readability, structure, performance, abstraction, maintainability, or other characteristics by transforming a program. This paper contributes to a more unified approach for the phases of clone maintenance with a focus on clone modification. This approach uses the refactoring technique for clone modification. To detect the clones 'CloneManager' tool has been used. This approach is implemented as an enhancement to the existing tool CloneManager. The enhanced tool is tested with the open source projects and the results are compared with the performance of other three existing tools.

Composite refactorings for Java programs

2000

There has been much interest in refactoring recently, but little work has been done on tool support for refactoring or on demonstrating that a refactoring does indeed preserve program behaviour. We propose a method for developing composite refactorings for Java programs in such a way that a rigorous demonstration of behaviour preservation is possible.

JDeodorant: identification and application of extract class refactorings

2011

Evolutionary changes in object-oriented systems can result in large, complex classes, known as "God Classes". In this paper, we present a tool, developed as part of the JDeodorant Eclipse plugin, that can recognize opportunities for extracting cohesive classes from "God Classes" and automatically apply the refactoring chosen by the developer.

A case study for program refactoring

2008

Abstract. This paper proposes a case for the GraBaTs' 08 tool contest. The graph transformation system to be implemented shall (i) import a graph-based representation of models of Java programs in a Gxl-based format,(ii) allow these models to be transformed interactively with three well-known program refactorings Encapsulate Field, Move Method, and Pull-up Method, and (iii) export the resulting models in the same Gxlformat.

A Comprehensive Review of Refactoring Techniques

Refactoring is a crucial process to improve the quality of software. Refactoring is part of software engineering that improves more readability of program and maintainability of the software. Refactoring is a most widely used technique that gives the code simpler, cleaner, reusable, extendable, maintainable or other characteristics by transforming a program. In programming languages, bad smell or code smell is a code or design problem that makes the software hard to understand and maintain the code. Basically, bad smells are structured characteristics of software that indicate a problem, may be need it refactoring of code. In this paper some refactoring techniques discussed that are used to remove code smells from code or program. Simulation has been done for some refactoring techniques like Rename method, Extract method, Move method, Pull up method using Eclipse tool. Eclipse refactoring tool supports the java development language. It has been observed that pull up method is better as compared to other refactoring methods because pull up method dispose the complexity and duplicate code from program.

FOOD: An Intermediate Model for Automated Refactoring

New Trends in Software Methodologies, Tools and Techniques, 2006

As big software projects grow, there is an increasing need of cleaning up or restructuring the existing code. This problem can be addressed by using refactorings, which are small semantics-preserving code transformations. Many refactorings have been automated in existing development environments to help the developer in this process. Most implementations are currently based on the abstract syntax tree. Unfortunately, this model, which was first designed for the compilation process, does not provide all the abstractions that are required for complex refactorings such as extracting a method. In this paper, the FOOD model is introduced and described. Based entirely on graphs, this model is targeted to the implementation of complex code transformations by providing the necessary abstractions. The "extract method" refactoring is applied on the FOOD model as a concrete example. Then a comparison with existing models such as abstract syntax trees is made.

Advanced Clone-Analysis to Support Object-Oriented System Refactoring

2000

Manual source code copy and modification is often used by programniers as an easy means for functionality reuse. Nevertheless, such practice produces duplicatcd pieces of code or clones whose consistent maintenance might be difficult to achieve. It also creates implicit links between classes sharing a functionality. Cloncs are therefore good candidates for system redesign.

Refactoring in automatically generated programs

Proceedings of the Symposium on Search Based Software Engineering, 2010

Abstract—Refactoring aims at improving the design of ex-isting code by introducing structural modifications without changing its behaviour. It is used to adjust a system's design in order to facilitate its maintenance and extendability. Since deciding which refactoring to apply and where it should be applied is not a straightforward decision, search-based approaches to automating the task of software refactoring have been proposed recently. So far, these approaches have been applied only to human-written code. Despite many years ...

The role of constructors in the context of refactoring object-oriented systems

Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings.

Refactoring is a very important technology to improve the reusability and maintainability of existing code, and it is widely used in software development. In order to extract the code segment into a new method easily and cover the shortage of Eclipse in refactoring, the method of Context-Aware Automatic Code Segment Extraction and Refactoring (CAACSER) is proposed. By analyzing the context of the code, the input parameter class, and the output parameter class are introduced to handle complex code segments. The experimental results show that the CAACSER effectively solves some problems and drawbacks of many existing tools in code segment extraction, which acts as a basic step for realizing automatic and semi-automatic refactoring methods. The visualization tool of CAACSER can also carry out reasonable optimizations of the code without changing the systems' behaviors.