重複性程式碼(Duplicate Code/Clone Code)係指在原始碼中某一段與其他相異片段具有相同結構或功能的程式碼,有時亦被稱作複製程式碼(Code Clone)或是克隆(Clone);重複性程式碼時常出現在應用程式開發至一定程度或某個階段時。根據Deissenboeck等人的研究中發現,在一個軟體系統中可能包含10~50%以上的重複性程式碼,由此可知在程式設計的領域中普遍地存在重複性程式碼的問題。然而,在一個設計結構不良的軟體系統當中,最為人所詬病的部份就是重複性程式碼,若原始碼中含有過多的重複性程式碼勢必將造成整個系統架構的呈現相當凌亂且難以維護修改;因此,要如何消除重複性程式碼成為改良程式設計的一個重要課題。 軟體工程發展迄今,消除重複性程式碼的重要性已日益顯著,目前已有許多研究提出檢測重複性程式碼的方法並發展成許多良好的工具,如CCFinder、CloneDR或CodeRush外掛模組(Plug-In)中的Duplicate Code…等;此外,微軟也在開發工具Visual Studio 2010開始內建尋找重複性程式碼的功能。 儘管消除重複性程式碼與過去相較已漸受程式開發人員所重視,但檢測工具的發展時至今日對程式開發人員而言,仍無較完善好用的工具;因此,本研究將提出一個方法並實作一個整合開發環境的外掛套件來協助程式開發人員們可以快速找到他們所關注的程式是否有包含重複性程式碼及其所在位置與相關資訊,藉此以減少程式開發人員在大量程式碼中找尋重複性程式碼的所需投入的時間成本。 ;Duplicate code (Clone code; Clone) is a fragmental code that occurs more than once in the source code. Existing research suggests that a considerable fraction (10-50%) of the source code of large-scale software system is duplicate code. Inappropriate code duplication may increase maintenance costs. Therefore clone detection is one of the fundamental issues in software engineering. It can be widely applied in many areas, such as software quality, refactoring, patent, plagiarism, and so on. In order to improve the maintainability of software and reduce code clones, many code clone detection tools have been proposed. These tools are implemented into different platform, and also have some issues under user interface. Thus, in this paper we propose a new detection tool that implement as a plug-in lay on the Eclipse platform to improve user interface. Besides, user can use this tool to detect code clones more convenient and easier. In addition, this tool can help programmers to trace clone code directly and modify the clone code so that it can increase the efficiency of software.