Refactoring Support Based on Code Clone Analysis

Refactoring Support Based on Code Clone Analysis
复制标题

DOI:
10.1007/978-3-540-24659-6_16
复制
发表时间:
2004-04
期刊:
--
影响因子:
--
通讯作者:
Yoshiki Higo;Toshihiro Kamiya;S. Kusumoto;Katsuro Inoue
Yoshiki Higo;Toshihiro Kamiya;S. Kusumoto;Katsuro Inoue
中科院分区:
其他
文献类型:
--
作者:
Yoshiki Higo;Toshihiro Kamiya;S. Kusumoto;Katsuro Inoue

文献摘要

相似文献

软件维护是软件开发中最昂贵的活动。许多软件公司花费了大量的成本来维护现有的软件系统。在完善维护中,重构经常被应用到软件中,以提高软件的可理解性和复杂性。重构的目标之一是代码克隆。代码克隆是源代码中与另一个源代码相同或相似的代码片段。在实际的软件开发过程中,由于“复制粘贴”等多种原因,代码克隆被引入软件开发中,代码克隆是造成软件维护困难的因素之一。本文利用现有的重构模式,特别是“抽取法”和“上拉法”,提出了一种从面向对象软件中去除代码克隆的方法。然后,我们已经实现了一个重构支持工具的基础上提出的方法。最后,我们将该工具应用于一个开源程序,并实际执行重构。
Software maintenance is the most expensive activity in software development. Many software companies spent a large amount of cost to maintain the existing software systems. In perfective maintenance, refactoring has often been applied to the software to improve the understandability and complexity. One of the targets of refactoring is code clone. A code clone is a code fragment in a source code that is identical or similar to another. In an actual software development process, code clones are introduced because of various reasons such as reusing code by ‘copy-and-paste’and so on. Code clones are one of the factors that make software maintenance difficult. In this paper, we propose a method which removes code clones from object oriented software by using existing refactoring patterns, especially “Extract Method” and “Pull Up Method”. Then, we have implemented a refactoring supporting tool based on the proposed method. Finally, we have applied the tool to an open source program and actually perform refactoring.