Object-Oriented Program Method Level Clone Detection Based on Similarity Measurement

于冬琦,吴毅坚,彭鑫,赵文耘
2010-01-01
Abstract:Code clone detection is important for refactoring and extraction of reusable assets.The present code clone detection method is on the basis of detection of similar code segments,which brings difficulty for further clone analysis and refactoring.Aiming at this problem,this paper offers a method level clone detection method for object-oriented program based on similarity measurement,which detects method level cloned code.Our method utilizes comments of the code,method signature and syntactic similarity to measure the degree of the clone.Based on the method mentioned above,further refactoring can be realized by combining similar methods of sub-classes into one method and pulling it up into super-class.Our method's effectiveness has been verified by analyzing the result of the experiment on the code of JDK.The initial experiment result shows that our method can help developer detect method level code clone both accurately and effectively.
What problem does this paper attempt to address?