Adaptive Segmented Block based Clone Detection and Refactoring using Divide and Conquer Method
Charnpreet Singh, Dhavleesh Rattan · International Journal of Advanced Research in Computer Science · 2016
The clone detection and refactoring methods are commonly utilized for the defragmentation of the source code of the software systems. The code cleaning is the process associated with writing the clean source code with minimum redundancy to achieve the higher performance. The code clone detection finds the regions with redundancy and the refactoring methods are utilized for the removal of the redundancy from the source code files. In this paper, the major focus has been kept at the clone detection with high accuracy by using the divide and conquer method, which is associated with the segmentation of the code blocks, which is followed by the template matching technique for the feature description from the given source code. The divide and conquer method will be capable to divide the code in the smaller blocks which would undergo the feature extraction for the dilution of the user declarations, which adds the uniqueness to the code segments. The user declarations are converted to the transparent entities by using the standard definition for the entities. The code cloning methods are usually categorized as the blind match detection algorithms, because they extract the training and testing data from the submitted source and do not hold any pre-determined source data. The proposed model will match each and every segment of code against every other segment. The exact matches would be extracted, notified and finally arranged in the cod clone database. The proposed model will track the code clones and perform the refactoring over the detected code clones. The refactoring method will utilize the segment level clone removal from the given source code. The segments extracted and marked under the code cloning methods would be evaluated, and the clones in the higher order classes will be preferred over the child classes. The proposed model is expected to solve the problems associated with the existing models in removal of the clones using the refactoring methods. Keywords: Adaptive clone detection, refactoring, blind clone detection, code cleaning.