Open Access Open Access  Restricted Access Subscription or Fee Access

Automatic Method Level Code Clones Removal Using Refactoring

N. Kavitha, S. Suguna

Abstract


To improve the design of existing software code. Refactoring doesn‟t change the observable behavior of the software; it improves its internal structure. Software clones appear for a variety of reasons, among which the most obvious is the reuse of existing code (by copy and paste for example), logic or design. Several studies show that about 5% to 20% of software systems can contain duplicated code, which is basically the result of copying existing code fragments and using then by pasting with or without minor modifications. In this paper, we propose a clone removal by refactoring. The refactoring is done with the help of clone manager. It is designed to improve the understandability of the code or change its structure and design, and remove dead code, to make it easier for human maintenance in the future.

Keywords


Refactoring, Duplicated Code, Function Extraction, Generalisation, Renaming, Clone Pair, Clone Clusters.

Full Text:

PDF

References


Huiqing Li, Simon Thompson: “Clone Detection and Removal for Erlang/OTP within a Refactoring Environment”, January 19–20, 2009, Savannah, Georgia, USA.

M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley, 2000 Longman Publishing Co., Inc., Boston, MA, USA, 1999. ISBN 0-201-48567-2.

H. Li and S. Thompson. Tool Support for Refactoring Functional Programs. In Partial Evaluation and Program Manipulation, San Francisco, California, USA, January 2008.

Li, S. Thompson, and C. Reinke. The Haskell Refactorer, HaRe, and its API. Electr. Notes Theor. Comput. Sci., 141(4):29–34, 2005.

Y. Higo, T. Kamiya, S. Kusumoto, and K. Inoue. ARIES: Refactoring Support Environment Based on Code Clone Analysis. In IASTED Conf. on Software Engineering and Applications, pages 222–229, 2004.

Ira Baxter, Andrew Yahin, Leonardo Moura, Marcelo Sant Anna. Clone Detection Using Abstract Syntax Trees. In Proceedings of the 14th International Conference on Software Maintenance (ICSM'98), pp. 368-377, Bethesda, Maryland, November 1998.

Alejandra Garrido, Ralph Johnson “Challenges of Refactoring C Programs”.

http://www.refactoring.com.


Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.